silhouette_SimilarityMatrix: Compute or Extract Silhouette Information from Clustering...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Valiation.R

Description

Silhouette refers to a method of interpretation and validation of consistency within clusters of data. The technique provides a succinct graphical representation of how well each object lies within its cluster (From Wiki).
Note that: This function is a rewriting version of the function "silhouette()" in R package cluster. The original function "silhouette()" is to compute the silhouette information based on a dissimilarity matrix. Here the silhouette_SimilarityMatrix() is to solve the computation based on the similarity matrix. The result of the silhouette_SimilarityMatrix() is compatible to the function "Silhouette()".

Usage

1
silhouette_SimilarityMatrix(group, similarity_matrix)

Arguments

group

A vector represent the cluster label for a set of samples.

similarity_matrix

A similarity matrix between samples

Details

For each observation i, the return sil[i,] contains the cluster to which i belongs as well as the neighbor cluster of i (the cluster, not containing i, for which the average dissimilarity between its observations and i is minimal), and the silhouette width s(i) of the observation.

Value

An object, sil, of class silhouette which is an [n x 3] matrix with attributes. The colnames correspondingly are c("cluster", "neighbor", "sil_width").

Author(s)

Xu,Taosheng taosheng.x@gmail.com,Thuc Le Thuc.Le@unisa.edu.au

References

Rousseeuw, P.J. (1987) Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math., 20, 53-65.

See Also

silhouette

Examples

1
2
3
4
5
6
7
8
9
data(GeneExp)
data(miRNAExp)
GBM=list(GeneExp=GeneExp,miRNAExp=miRNAExp)
result=ExecuteSNF(GBM, clusterNum=3, K=20, alpha=0.5, t=20)
sil=silhouette_SimilarityMatrix(result$group, result$distanceMatrix)
plot(sil)
###If use the silhouette(), the result is wrong because the input is a similarity matrix.
sil1=silhouette(result$group, result$distanceMatrix)
plot(sil1)  ##wrong result

xtsvm/CancerSubtypes documentation built on May 4, 2019, 1:26 p.m.