A package for efficient computations of standard clustering comparison measures
Stable version on the CRAN.
install.packages("aricode")The development version is available via:
devtools::install_github("jchiquet/aricode")Computation of measures for clustering comparison (ARI, AMI, NID and even the distance) are usually based on the contingency table. Traditional implementations (e.g., function adjustedRandIndex of package mclust) are in where
In aricode we propose an implementation, based on radix sort, that is in in time and space.
Importantly, the complexity does not depend on and . Our implementation of the ARI for instance is one or two orders of magnitude faster than some standard implementation in R.
The functions included in aricode are:
(A)RI: computes the (adjusted) Rand indexMARI: computes the modified adjusted rand index as defined in Sundqvist et al, 2023
NID: computes the normalized information distanceNMI: computes the normalized mutual informationNVI: computes the the normalized variation informationAMI: computes the adjusted mutual informationChi2: computes the Chi-square statisticsFrobenius compute the Frobenius norm between two classification as defined in Arlot et al, 2019
entropy: computes the conditional and joint entropiescompare_clustering: computes all clustering comparison measures at oncesort_pairs: radix sort for pairs of elements