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
data
Same as the input Data
n.cluster
Number of clusters at each level.
level
Levels corresponding to each smoothing parameter.
sigmas
Same as input sigmaselect if provided or dynamically
calculated smoothing levels based on Spectral Degrees of Freedom
criterion. Uses the function khat.inv
mode
List of modes at each distinct levels.
membership
List of memmbership to modes at each distinct levels.
Author(s)
Surajit Ray and Yansong Cheng
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.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Modalclust)
Loading required package: mvtnorm
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: class
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Modalclust/pHMAC.Rd_%03d_medium.png", width=480, height=480)
> ### Name: phmac
> ### Title: Main function for performing Modal Clusters either parallel or
> ### serial mode.
> ### Aliases: phmac modalclust
> ### Keywords: cluster, hierarchical, nested, modal
>
> ### ** Examples
>
>
> data(disc2d)
> disc2d.hmac=phmac(disc2d,npart=1)
Performing initial Modal clusteringLoading required package: parallel
..........
Building hierarchical Modal clusters at
level 1 ...level 2 ...level 3 ...level 4 ...level 5 ...
level 6 ...level 7 ...level 8 ...level 9 ...level 10 ...
> plot.hmac(disc2d.hmac,level=2)
>
> ## For parallel implementation
> disc2d.hmac.parallel=phmac(disc2d,npart=2,parallel=TRUE)
Partioning Data
Using parallel computing for performing initial Modal clustering
....................
Building membership from initial partitions
Building hierarchical Modal clusters at
level 1 ...level 2 ...level 3 ...level 4 ...level 5 ...
level 6 ...level 7 ...level 8 ...level 9 ...level 10 ...
>
> soft.hmac(disc2d.hmac,level=2)
> soft.hmac(disc2d.hmac,n.cluster=3)
The level at which there are 3 clusters is 2
>
> hard.hmac(disc2d.hmac,n.cluster=3)
The level at which there are 3 clusters is 2
>
>
>
>
>
> dev.off()
null device
1
>