get_Silhouette: Compute Silhouette Index

Description Usage Arguments Value References Examples

View source: R/clues_sil.R

Description

Compute Silhouette index for a given partition of a data set.

Usage

1
get_Silhouette(y, mem, disMethod = "Euclidean")

Arguments

y

data matrix which is an R matrix object (for dimension > 1) or vector object (for dimension = 1) with rows be observations and columns be variables.

mem

vector of the cluster membership of data points. The cluster membership takes values: 1, 2, , g, where g is the estimated number of clusters.

disMethod

specification of the dissimilarity measure. The available measures are “Euclidean” and “1-corr”.

Value

A list of 3 elements:

avg.s

average Sihouette index.

s

vector of Sihouette indices for data points.

neighbor

a vector, the $i$-th element of which indicates which cluster is the nearest neighbor cluster of the $i$-th data point.

References

Kaufman, L., Rousseeuw, P.J., (1990). Finding Groups in Data: An Introduction to Cluster Analysis. Wiley, New York.

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

1
2
3
4
5
6
7
8
9
    data(Maronna)
    # data matrix
    maronna <- Maronna$maronna

    # cluster membership
    maronna.mem <- Maronna$maronna.mem
     
    tt <- get_Silhouette(maronna, maronna.mem)
    tt$avg.s

Example output

[1] 0.5498086

clues documentation built on Dec. 4, 2019, 1:09 a.m.