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 (^2) distance) are usually based on the contingency table. Traditional implementations (e.g., function adjustedRandIndex
of package mclust) are in ((n + u v)) where
In aricode we propose an implementation, based on radix sort, that is in ((n)) in time and space.
Importantly, the complexity does not depends on (u) and (v). Our implementation of the ARI for instance is one or two order of magnitude faster than some standard implementation in R
.
The functions included in aricode are:
ARI
: computes the adjusted rand indexChi2
: computes the Chi-square statisticsMARI/MARIraw
: computes the modified adjusted rand index (Sundqvist et al, in preparation)NVI
: computes the the normalized variation informationNID
: computes the normalized information distanceNMI
: computes the normalized mutual informationAMI
: computes the adjusted mutual informationexpected_MI
: computes the expected mutual informationentropy
: computes the conditional and joint entropiesclustComp
: computes all clustering comparison measures at once