R: Cluster Similarity Matrix

clusterSim {flexclust} | R Documentation

## Cluster Similarity Matrix

### Description

Returns a matrix of cluster similarities. Currently two methods for computing similarities of clusters are implemented, see details below.

### Usage

    ## S4 method for signature 'kcca'
    clusterSim(object, data=NULL, method=c("shadow", "centers"),
               symmetric=FALSE, ...)
    ## S4 method for signature 'kccasimple'
    clusterSim(object, data=NULL, method=c("shadow", "centers"),
               symmetric=FALSE, ...)

### Arguments

`object` | fitted object.
`data` | Data to use for computation of the shadow values. If the cluster object `x` was created with `save.data=TRUE`, then these are used by default. Ignored if `method="centers"`.
`method` | Type of similarities, see details below.
`symmetric` | Compute symmetric or asymmetric shadow values? Ignored if `method="centers"`.
`...` | currently not used.

### Details

If `method="shadow"` (the default), then the similarity of two clusters is proportional to the number of points in a cluster, where the centroid of the other cluster is second-closest. See Leisch (2006, 2008) for detailed formulas.

If `method="centers"`, then first the pairwise distances between all centroids are computed and rescaled to [0,1]. The similarity between tow clusters is then simply 1 minus the rescaled distance.

### Author(s)

Friedrich Leisch

### References

Friedrich Leisch. A Toolbox for K-Centroids Cluster Analysis. Computational Statistics and Data Analysis, 51 (2), 526–544, 2006.

Friedrich Leisch. Visualizing cluster analysis and finite mixture models. In Chun houh Chen, Wolfgang Haerdle, and Antony Unwin, editors, Handbook of Data Visualization, Springer Handbooks of Computational Statistics. Springer Verlag, 2008.

### Examples

    example(Nclus)

    clusterSim(cl)
    clusterSim(cl, symmetric=TRUE)

    ## should have similar structure but will be numerically different:
    clusterSim(cl, symmetric=TRUE, data=Nclus[sample(1:550, 200),])

    ## different concept of cluster similarity
    clusterSim(cl, method="centers")

[Package flexclust version 1.3-4 Index]