Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

data.gauss

Gaussian mixture dataset


Description

Generate a random multidimentional gaussian mixture.

Usage

data.gauss(
  n = 1000,
  k = 2,
  prob = rep(1/k, k),
  mu = cbind(rep(0, k), seq(from = 0, by = 3, length.out = k)),
  cov = rep(list(matrix(c(6, 0.9, 0.9, 0.3), ncol = 2, nrow = 2)), k),
  levels = NULL,
  graph = TRUE,
  seed = NULL
)

Arguments

n

Number of observations.

k

The number of classes.

prob

The a priori probability of each class.

mu

The means of the gaussian distributions.

cov

The covariance of the gaussian distributions.

levels

Name of each class.

graph

A logical indicating whether or not a graphic should be plotted.

seed

A specified seed for random number generation.

Value

A randomly generated dataset.

See Also

Examples

data.gauss ()

fdm2id

Data Mining and R Programming for Beginners

v0.9.5
GPL-3
Authors
Alexandre Blansché [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.