disdiam {optpart} | R Documentation |
Dissimilarity Diameters of a Partition
Description
Calculates the diameter (maximum within-cluster dissimilarity) of all clusters in a partition, as well as the average diameter across all clusters.
Usage
disdiam(x,dist,digits)
## S3 method for class 'stride'
disdiam(x,dist,digits=3)
## S3 method for class 'disdiam'
print(x, ...)
Arguments
x |
a vector of integers or an object of class ‘clustering’, ‘partition’, ‘partana’, or ‘stride’ |
dist |
|
digits |
the number of significant digits reported in the output |
... |
ancillary arguments to the print function |
Details
disdiam is a cluster validation routine, and calculates the diameter (maximum within-cluster dissimilarity) of each cluster, as well as the average diameter of across all clusters of size greater than one.
Value
A list with components:
diameters |
a data.frame with clusters as rows, and cluster ID, cluster size, and diameter as cols |
mean |
the weighted mean diameter of clusters of size greater than one. The mean is weighted for cluster size. |
Author(s)
David W. Roberts droberts@montana.edu
Examples
data(shoshveg)
dis.bc <- dsvdis(shoshveg,'bray')
opt.5 <- optpart(5,dis.bc)
disdiam(opt.5,dis.bc)