bestfit {optpart} | R Documentation |
Identify the Goodness-of-Fit of Cluster Members
Description
Sorts the members of clusters by maximum similarity goodness-of-fit
Usage
bestfit(x,cluster)
Arguments
x |
an object of class ‘partana’ or ‘silhouette’ |
cluster |
a specific cluster number |
Details
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’)
Value
returns a data.frame with cluster members in column ‘ID’ and goodness-of-fit in column ‘fit’
Author(s)
David W. Roberts droberts@montana.edu
References
http://ecology.msu.montana.edu/labdsv/
See Also
Examples
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
[Package optpart version 3.0-3 Index]