generate.sample0 | R Documentation |
Multivariate normally distributed data synthetic generator. Data sets with 3 clusters are randomly generated. n examples for each class are generated. All classes (each one of n examples) has dim components The first class (first n examples) has its components centered in 0 (of length dim) The second class (second n examples) has its components centered in m (of length dim) The third class (last n examples) has its components centered in -m (of length dim) For all classes the covariance matrix is diagonal with values sigma.
generate.sample0(n = 5, m = 10, sigma = 1, dim = 2)
n |
number of examples for each class |
m |
mean value for the second class |
sigma |
value of the diagonal elements of the covariance matrix |
dim |
dimension of the examples |
a matrix with dim rows (variables) and n*3 columns (examples)
Giorgio Valentini valentini@di.unimi.it
generate.sample0()
# Generation of a data set with 60 500-dimensional examples, with the examples
# of the first class centered in the 500-dimensional 0 vector, the second class
# is centered in the 1 vector, the third in -1. The covariance matrix is the
# matrix with all 2 values on the diagonal elements
generate.sample0(n = 20, m = 1, sigma = 2, dim = 500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.