powered by
This function returns the Calinski Harabasz score of a partition (also known as the Variance Ratio Criterion).
calinski_harabasz_score(X, labels)
The Calinski Harabasz score for this data.
the input dataset: either a matrix or a dataframe.
the partition vector.
T. Calinski and J. Harabasz. A dendrite method for cluster analysis. Communications in Statistics, 3, no. 1:1–27, 1974
calinski_harabasz_score(iris[1:10,1:4], c(3,2,2,2,3,1,2,3,2,2)) # Expected : 11.34223
Run the code above in your browser using DataLab