generate.sample0: Sample0 generator of synthetic data

generate.sample0R Documentation

Sample0 generator of synthetic data

Description

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.

Usage

generate.sample0(n = 5, m = 10, sigma = 1, dim = 2)

Arguments

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

Value

a matrix with dim rows (variables) and n*3 columns (examples)

Author(s)

Giorgio Valentini valentini@di.unimi.it

Examples

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)

clusterv documentation built on June 8, 2025, 10:21 a.m.