Identify the Goodness-of-Fit of Cluster Members
Sorts the members of clusters by maximum similarity goodness-of-fit
bestfit(x,cluster)
x |
an object of class ‘partana’ or ‘silhouette’ |
cluster |
a specific cluster number |
Simply finds all members of a specific cluster and lists them in order of (1) mean similarity to their cluster (if x is an object of class ‘partana’) or silhouette width (if x is an object of class ‘silhouette’ as produced by functions in package ‘cluster’)
returns a data.frame with cluster members in column ‘ID’ and goodness-of-fit in column ‘fit’
David W. Roberts droberts@montana.edu
data(shoshveg) # returns vegetation matrix dis.bc <- dsvdis(shoshveg,'bray') # Bray/Curtis dissimilarity matrix opt.5 <- optpart(5,dis.bc) # 5 cluster partition print(class(opt.5)) fit <- bestfit(opt.5,1) # goodness-of-fit for cluster 1 sil.5 <- silhouette(opt.5,dis.bc) # calculate silhouette widths fit2 <- bestfit(sil.5,1) # goodness-of-fit for cluster 1
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.