Learn R Programming

MGMM (version 1.0.1.3)

ClustQual: Cluster Quality

Description

Evaluates cluster quality. Returns the following metrics:

  • BIC: Bayesian Information Criterion; lower is better.

  • CHI: Calinski-Harabasz index; higher is better.

  • DBI: Davies-Bouldin index; lower is better.

  • SIL: Mean silhouette width; higher is better.

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