Silhouette index
Produces the silhouette index. The optimal number of clusters k is is such that the index takes the maximum value.
SIL (Xca, U, distance)
Xca |
Matrix or data.frame |
U |
Membership degree matrix |
distance |
If |
Xca should contain the same dataset used in the clustering algorithm, i.e., if the clustering algorithm is run using standardized data, then SIL should be computed using the same standardized data.
Set distance=TRUE if Xca is a distance/dissimilarity matrix.
sil.obj |
Vector containing the silhouette indexes for all the objects |
sil |
Value of the silhouette index (mean of |
Paolo Giordani, Maria Brigida Ferraro, Alessio Serafini
Kaufman L., Rousseeuw P.J., 1990. Finding Groups in Data: An Introduction to Cluster Analysis. Wiley, New York.
## McDonald's data data(Mc) names(Mc) ## data normalization by dividing the nutrition facts by the Serving Size (column 1) for (j in 2:(ncol(Mc)-1)) Mc[,j]=Mc[,j]/Mc[,1] ## removing the column Serving Size Mc=Mc[,-1] ## fuzzy k-means ## (excluded the factor column Type (last column)) clust=FKM(Mc[,1:(ncol(Mc)-1)],k=6,m=1.5,stand=1) ## silhouette index sil=SIL(clust$Xca,clust$U)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.