40-generate.basic: Generate Examples for Testing

generate.basicR Documentation

Generate Examples for Testing

Description

This function will generate a small set of data for testing algorithms.

Usage

  generate.basic(N.allspmds, N.spmd, N.K.spmd, N, p, K)

Arguments

N.allspmds

a collection of sample sizes for all S processors, i.e. a vector of length S.

N.spmd

total sample size of given processor.

N.K.spmd

sample size of each clusters given processor, i.e. sum over N.K.spmd is N.spmd, a vector of length K.

N

total sample size across all S processors, i.e. sum over N.spmd is N.

p

dimension of data X.spmd, i.e. ncol(X.spmd).

K

number of clusters.

Details

For all S processors, this function will generate in total N observations from K clusters in p dimensions.

The clusters centers and dispersions are generated automatically inside the code. Currently, it is not allowed for users to change, but it is not difficult to specify them by mimicking this code.

Value

A set of simulated data and information will be returned in a list variable including:

K number of clusters, as the input
p dimension of data X.spmd, as the input
N total sample size, as the input
N.allspmds a collection of sample sizes for all S processors, as the input
N.spmd total sample size of given processor, as the input
N.K.spmd sample size of each clusters given processor, as the input
X.spmd generated data set with dimension with dimension N.spmd * p
CLASS.spmd true id of each data, a vector of length N.spmd and has values from 1 to K
N.CLASS.spmd true sample size of each clusters, a vector of length K

Author(s)

Wei-Chen Chen wccsnow@gmail.com and George Ostrouchov.

References

Programming with Big Data in R Website: https://pbdr.org/

See Also

generate.MixSim.

Examples

## Not run: 
# Examples can be found in the help pages of em.step(),
# aecm.step(), apecm.step(), and apecma.step().

## End(Not run)

snoweye/pmclust documentation built on Sept. 12, 2023, 5:42 a.m.