pmclust (version 0.2-0)

get.N.CLASS: Obtain Total Elements for Every Clusters

Description

This function will collect the total elements for every clusters from all processors that the all reduced calls with the sum operation will be performed.

get.N.CLASS.dmat is a ddmatrix version of get.N.CLASS.

The get.CLASS returns class ids.

Usage

get.N.CLASS(K)

get.N.CLASS.dmat(K)

get.CLASS(PARAM)

Arguments

K

the total number of clusters.

PARAM

a set of parameters.

Value

K numbers will be returned that are the total elements for each cluster. Sum of these K numbers should be equal to N the total number of observations.

Details

The final results are distributed in all processors including the total elements for each cluster. The global variable CLASS.spmd stores the identification for each observation on each processors. This function will first summary CLASS.spmd in K categories, then use the all reduce function with the sum operation to add the numbers by clusters. The COMM.RANK 0 will be used to take care the printing.

References

Programming with Big Data in R Website: http://r-pbd.org/

See Also

em.step, aecm.step, apecm.step, apecma.step, kmeans.step. kmeans.step.dmat.

Examples

Run this code
# NOT RUN {
# Examples can be found in the help pages of em.step(),
# aecm.step(), apecm.step(), apecma.step(), and kmeans.step().

# Examples for ddmatrix version can be found in the help pages of
# kmeans.step.dmat().
# }

Run the code above in your browser using DataLab