choose.cluster {Modalclust}R Documentation

Choosing the cluster which is closest to a specified point

Description

Choosing the cluster which is closest to a point specified by user. Works only for two dimensional data.

Usage

choose.cluster(hmacobj,x=NULL,level=NULL,n.cluster=NULL)

Arguments

hmacobj

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

x

The user-specified location. Deafult value is NULL in which case user chooses a point using the locator function.

level

The specified level

n.cluster

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

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.

Examples

data(disc2d.hmac)
#disc2d.hmac is the output of phmac(disc2d,npart=1)

choose.cluster(disc2d.hmac,x=c(0,0),level=3)
choose.cluster(disc2d.hmac,x=c(0,0),n.cluster=2)

# Users can choose anypoint they want by clicking the point 
# in the plot after the following command. 
# choose.cluster(disc2d.hmac,level=3)

[Package Modalclust version 0.7 Index]