Plot clusters with different colors for two dimensional data overlayed on the contours of the original data.

Description

Plot clusters for two dimensional data with contours of the original data

Usage

1
2
## S3 method for class 'hmac'
contour(x, n.cluster=NULL,level=NULL,prob=NULL,smoothplot=FALSE,...)

Arguments

x

The output of HMAC analysis. An object of class 'hmac'.

level

The specified level

n.cluster

The specified number of clusters. Either level or n.cluster needs to be specified

prob

The specified level of the contour plot. Default value is NULL, plot all levels of the contour plot. Must be between 0 and 1

smoothplot

Get the smooth scatter plot of the original data set. Default value is FALSE, which does not provide the smooth scatter plot.

...

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. soft.hmac for soft clustering at specified levels. hard.hmac for hard clustering at specified levels. See plot for plotting the whole dendrogram.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(disc2d.hmac)
# disc2d.hmac is the output of phmac(disc2d,npart=1)

contour.hmac(disc2d.hmac,level=3,col=gray(0.7)) 

# Provide contour line at probability density 0.05.
contour(disc2d.hmac,n.cluster=2,prob=0.05) 

# Plot using smooth scatter plot.
contour.hmac(disc2d.hmac,n.cluster=2,smoothplot=TRUE)