Learn R Programming

Modalclust (version 0.2)

phmac: Main function for performing Modal Clusters either parallel or serial mode.

Description

Performing Modal Clustering

Usage

phmac(dat, length = 10, npart = 1, parallel = TRUE, sigmaselect = NULL,
G= NULL)
modalclust(dat, length = 10, npart = 1, parallel = TRUE, sigmaselect = NULL,
G= NULL)

Arguments

dat
Matrix of data points
length
number of smoothing levels. Default is 10
sigmaselect
Specified Smoothing levels. Default NULL will calculate the Sigma levels using concept of spectral degrees of freedom given in Lindsay et al (2008)
npart
Number of random partitions when using parallel computing. If using several processors of a machine one option is to choose the number of partitions equal to the number of processors
parallel
If TRUE uses parallel comptation using npart processors. Requires the package multicore to perform parallel computing
G
Specified values of modes. A matrix with number or rows equal to the number of modes and number of columns equal to the dimension of the data. Defualt value is NULL

Value

  • dataSame as the input Data
  • n.clusterNumber of clusters at each level.
  • levelLevels corresponding to each smoothing parameter.
  • sigmasSame as input sigmaselect if provided or dynamically calculated smoothing levels based on Spectral Degrees of Freedom criterion. Uses the function khat.inv
  • modeList of modes at each distinct levels.
  • membershipList of memmbership to modes at each distinct levels.

References

Li. J, Ray. S, Lindsay. B. G, "A nonparametric statistical approach to clustering via mode identification," Journal of Machine Learning Research , 8(8):1687-1723, 2007. Lindsay, B.G., Markatou M., Ray, S., Yang, K., Chen, S.C. "Quadratic distances on probabilities: the foundations," The Annals of Statistics Vol. 36, No. 2, page 983--1006, 2008.

See Also

soft.hmac for soft clustering at specified levels. hard.hmac for hard clustering at specified levels. See plot.hmac.

Examples

Run this code
data(disc2d)
disc2d.hmac=phmac(disc2d,npart=1)
plot.hmac(disc2d.hmac,level=2)

## For parallel implementation
disc2d.hmac.parallel=phmac(disc2d,npart=4,parallel=TRUE)

soft.hmac(disc2d.hmac,level=2)
soft.hmac(disc2d.hmac,n.cluster=3)

hard.hmac(disc2d.hmac,n.cluster=3)

Run the code above in your browser using DataLab