Compute the Calinski and Harabasz score.
It is also known as the Variance Ratio Criterion.
The score is defined as ratio between the within-cluster dispersion and the between-cluster dispersion.
Read more in the User Guide.
- Xarray-like of shape (n_samples, n_features)
A list of
n_features-dimensional data points. Each row corresponds to a single data point.
- labelsarray-like of shape (n_samples,)
Predicted labels for each sample.
The resulting Calinski-Harabasz score.