clues {clues}R Documentation

Clustering Method Based on Local Shrinking

Description

Automatically estimate the number of clusters for a given data set and get a partition.

Usage

clues(y, n0 = 5, alpha = 0.05, eps = 1.0e-4, itmax = 20, 
      K2.vec = n0, strengthMethod = "sil", strengthIni = -3, 
      disMethod ="Euclidean", plotFlag = FALSE, 
      plot.dim = c(1, 2), quiet = FALSE)

Arguments

y data matrix which is a R matrix object (for dimension > 1) or vector object (for dimension=1) with rows being observations and columns being variables.
n0 a guess for the number of clusters.
alpha speed factor.
eps a small positive number. A value is regarded as zero if it is less than eps.
itmax maximum number of iterations allowed.
K2.vec range for the number of nearest neighbors for the second pass of the iteration.
strengthMethod specifies the prefered measure of the strength of the clusters (i.e., compactness of the clusters). Two available methods are “sil” (silhouette index) and “CH” (CH index).
strengthIni initial value for the lower bound of the measure of the strength for the clusters. Any negative values will do.
disMethod specification of the dissimilarity measure. The available measures are “Euclidean” and “1-corr”.
plotFlag logical. Indicates if a scatter plot of clusters should be output.
plot.dim specifies the two dimensions to be plot.
quiet logical. Indicates if intermediate results should be output.

Value

K number of nearest neighbors can be used to get final clustering.
size vector of the number of data points for clusters.
mem vector of the cluster membership of data points. The cluster member ship takes values: 1, 2, ..., g, where g is the estimated number of clusters.
g an estimate of the number of clusters.
CH CH index value for the final partition if strengthMethod is “CH”.
avg.s average of the Silhoutte index value for the final partition if strengthMethod is “sil”.
s vector of Silhoutte indices for data points if strengthMethod is “sil”.
neighbor nearest neighbor clusters for data points if strengthMethod is "sil".
K.vec number of nearest neighbors used for each iteration.
g.vec number of clusters obtained in each iteration.
myupdate logical. Indicates if the partition obtained in the first pass is the same as that obtained in the second pass.
y.old1 data used for shrinking and clustering.
y.old2 data returned after shrinking and clustering.

Note

Occasionally, the number of clusters estimated by clues will be equal to the number of data points (that is, each data point forms a cluster). In this case, the estimated number of clusters was set to be equal to one. And the CH index or silhouette index will be set to be equal to NULL since CH index and silhouette index are not defined when the number of clusters is equal to one.

References

Wang, S., Qiu, W., and Zamar, R. H. (2007). CLUES: A non-parametric clustering method based on local shrinking. Computational Statistics & Data Analysis, Vol. 52, issue 1, pages 286-298.

Examples

  # ruspini data
  data(Ruspini)
  # data matrix
  ruspini <- Ruspini$ruspini
    
  res <- clues(ruspini)

[Package clues version 0.3.2 Index]