ClusterCalinskiHarabaszIndex: Calinski-Harabasz Variance-Ratio Criterion

View source: R/ClusterCalinskiHarabaszIndex.R

ClusterCalinskiHarabaszIndexR Documentation

Calinski-Harabasz Variance-Ratio Criterion

Description

Calinski-Harabasz Variance-Ratio Criterion [Calinski/Harabasz, 1974] evaluates a hard partition without a reference classification. Variance-ratio criterion; larger values are better.

Usage

ClusterCalinskiHarabaszIndex(Cls, Data)

Arguments

Cls

Vector of length n containing arbitrary numeric, character, or factor cluster labels. Missing labels and non-finite numeric labels are not allowed. Rows and labels are matched by position. Zero is an ordinary cluster label; remove noise observations explicitly if they should not be evaluated.

Data

Finite numeric matrix or data frame with n observations in rows and d variables in columns. Feature data are required, not precomputed dissimilarities. Euclidean geometry and arithmetic centroids are used. Data are not standardized automatically.

Details

ClusterCalinskiHarabaszIndex calculates

CH = \frac{B/(k-1)}{W/(n-k)},

where W is the sum of squared distances to assigned cluster centroids and B is the sum of squared distances from cluster centroids to the global mean, weighted by cluster size. It requires 2 \leq k < n.

Malformed inputs cause an error. Invalid partitions or zero within-cluster dispersion produce a warning. Undefined values are returned as NaN; zero within-cluster dispersion with a positive numerator gives Inf.

This function is also called by ClusterNoEstimation. The standalone function evaluates one given partition without selecting a number of clusters.

Value

List of

CalinskiHarabaszIndex

Variance-ratio criterion; larger values are better.

Object

List of WithinSS, BetweenSS, Centers, ClusterSizes and ClusterLabels. Center rows and sizes follow ClusterLabels. Invalid partitions return NULL.

Author(s)

Michael Thrun

References

[Calinski/Harabasz, 1974] Calinski, T., & Harabasz, J.: A dendrite method for cluster analysis, Communications in Statistics, Vol. 3(1), pp. 1-27, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/03610927408827101")}, 1974.

See Also

ClusterNoEstimation, ClusterDunnIndex, ClusterDaviesBouldinIndex

Examples

Data = matrix(c(0, 1, 2, 10, 11, 12), ncol = 1)
Cls = rep(c(10, 20), each = 3)
V = ClusterCalinskiHarabaszIndex(Cls, Data)
V$CalinskiHarabaszIndex

FCPS documentation built on Nov. 28, 2026, 9:08 a.m.