plot.hmac {Modalclust} | R Documentation |
Plots of heierarchical tree for a 'hmac' object
Description
Plots the dendrogram of the entire heierarchical tree for a 'hmac' object starting from any specified smoothing level.
Usage
## S3 method for class 'hmac'
plot(x,mycol=1:6,level=1,n.cluster=NULL,userclus=NULL,sep=.1,...)
Arguments
x |
The output of HMAC analysis. An object of class 'hmac'. |
mycol |
Colors used to represent different clusters. |
level |
The specified level that dendrogram starts. Default value is 1. |
n.cluster |
The specified number of clusters. If neither |
userclus |
If user provides membership, the tree colors the node according to this membership and the tree can be used for validation. |
sep |
It provides the distance between the lowest layer of nodes of the clusters. |
... |
further arguments passed to or from other methods. |
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
phmac
for front end of using modal clustering and also for parallel implementation of modal clustering.
hard.hmac
for hard clustering at specified levels.
soft.hmac
for soft clustering at specified levels.
Examples
data(disc2d.hmac)
# disc2d.hmac is the output of phmac(disc2d,npart=1)
plot(disc2d.hmac)
set.seed(20)
mix4=data.frame(rbind(rmvnorm(20,rep(0,4)), rmvnorm(20,rep(2,4)),
rmvnorm(20,rep(10,4)),rmvnorm(20,rep(13,4))))
mix4.hmac=phmac(mix4,npart=1)
plot(mix4.hmac,col=1:6)
# Verifying with user provided groups
plot(mix4.hmac,userclus=rep(c(1,2,3,4),each=20),col=1:6)