This repository contains the source codes of adjusted internal validation measures (adjusted IVMs) and experiments, introduced by our paper "Measuring the Validity of Clustering Validation Dataset" (IEEE TPAMI).
Adjusted Internal Validation Measures (IVM
The development and application of IVM
The code in this repository is mainly written in Python. The list of dependencies is as follows:
numpypandastqdmmatplotlibseabornscikit-learnhdbscanscickit-learn-extrapyclusteringbayesian-optimization
For an easy installation of the dependencies, we provided an environment file clm_env.yml. The following command will automatically install all the dependencies.
conda env create -f clm_env.yml
conda activate clmenvWe generalized six internal validation measures: Calinski-Harabasz (
Every function (both standard and adjusted IVMs) have same interface. The following is the description of the interface.
def function_name(
data,
labels
)data is a numpy array of shape (n_samples, n_features), where n_samples is the number of data points and n_features is the number of features. labels is a numpy array of shape (n_samples,), where n_samples is the number of data points. labels contains the class labels of the data points.
Note that adjusted IVMs additionally have a hyperparameter
The list of supported functions are as follows:
calinski_harabasz: Calinski-Harabasz indexdunn_index: Dunn indexi_index: I indexxie_beni_index: Xie-Beni indexdavies_bouldin_index: Davies-Bouldin indexsilhouette: Silhouette coefficient
calinski_harabasz_adjusted: Adjusted Calinski-Harabasz indexdunn_index_adjusted: Adjusted Dunn indexi_index_adjusted: Adjusted I indexxie_beni_index_adjusted: Adjusted Xie-Beni indexdavies_bouldin_index_adjusted: Adjusted Davies-Bouldin indexsilhouette_adjusted: Adjusted Silhouette coefficient
You can simply invoke the function by substuting function_name with the name of the function you want to use. For example, if you want to use the Calinski-Harabasz index, you can invoke the function as follows (do not forget to clone this repository first):
from measures import calinski_harabasz as ch
from sklearn.datasets import load_iris
data, labels = load_iris(return_X_y=True)
### standard IVM
ch_score = ch.calinski_harabasz(data, labels)
### adjusted IVM
ch_a_score = ch.calinski_harabasz_adjusted(data, labels)Please contact hj@hcil.snu.ac.kr if there exists any issue executing the codes.
Jeon, Hyeon, Michaël Aupetit, DongHwa Shin, Aeri Cho, Seokhyeon Park, and Jinwook Seo. "Measuring the Validity of Clustering Validation Datasets." IEEE Transactions on Pattern Analysis and Machine Intelligence (2025).
@ARTICLE{10909451,
author={Jeon, Hyeon and Aupetit, Michaël and Shin, DongHwa and Cho, Aeri and Park, Seokhyeon and Seo, Jinwook},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
title={Measuring the Validity of Clustering Validation Datasets},
year={2025},
volume={47},
number={6},
pages={5045-5058},
keywords={Reliability;Benchmark testing;Protocols;Training;Standards;Size measurement;Mutual information;Indexes;Electronic mail;Data mining;Clustering;clustering validation;internal clustering validation;external clustering validation;clustering benchmark},
doi={10.1109/TPAMI.2025.3548011}
}