Learn R Programming

MGMM (version 1.0.1.1)

ClustQual: Cluster Quality

Description

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.

Usage

ClustQual(fit)

Value

List containing the cluster quality metrics.

Arguments

fit

Object of class mix.

See Also

See ChooseK for using quality metrics to choose the cluster number.

Examples

Run this code
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)

Run the code above in your browser using DataLab