ClustQual | R Documentation |
Evaluates cluster quality. Returns the following metrics:
BIC: Bayesian Information Criterion, lower value indicates better clustering quality.
CHI: Calinski-Harabaz Index, higher value indicates better clustering quality.
DBI: Davies-Bouldin, lower value indicates better clustering quality.
SIL: Silhouette Width, higher value indicates better clustering quality.
ClustQual(fit)
fit |
Object of class mix. |
List containing the cluster quality metrics.
See ChooseK
for using quality metrics to choose the cluster number.
set.seed(100)
# Data generation
mean_list = list(
c(2, 2, 2),
c(-2, 2, 2),
c(2, -2, 2),
c(2, 2, -2)
)
data <- rGMM(n = 500, d = 3, k = 4, means = mean_list)
fit <- FitGMM(data, k = 4)
# Clustering quality
cluster_qual <- ClustQual(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.