clusterRMSD | R Documentation |
Compute the root mean-squared deviation (RMSD) for each cluster.
clusterRMSD(x, clusters, sum = FALSE)
x |
Numeric matrix containing observations in rows and variables in columns. |
clusters |
Vector containing the assigned cluster for each observation. |
sum |
Logical scalar indicating whether to compute the sum of squares. |
The RMSD for each cluster is a measure of its dispersion; clusters with large internal heterogeneity will have high RMSDs and are good candidates for further subclustering.
Numeric vector of RMSD values per cluster.
If sum=TRUE
, a numeric vector of the sum of squares per cluster is returned instead.
Aaron Lun
x <- matrix(rnorm(10000), ncol=10)
kout <- kmeans(x, 5)
clusterRMSD(x, kout$cluster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.