- Notifications
You must be signed in to change notification settings - Fork3
R package for computation of (adjusted) rand-index and other such scores
jchiquet/aricode
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A package for efficient computations of standard clustering comparisonmeasures
Stable version on theCRAN.
install.packages("aricode")The development version is available via:
devtools::install_github("jchiquet/aricode")
Computation of measures for clustering comparison (ARI, AMI, NID andeven the (\chi^2) distance) are usually based on the contingencytable. Traditional implementations (e.g., functionadjustedRandIndexof packagemclust) are in (\Omega(n + u v)) where
- (n) is the size of the vectors the classifications of which are tobe compared,
- (u) and (v) are the respective number of classes in eachvectors.
Inaricode we propose an implementation, based on radix sort, thatis in (\Theta(n)) in time and space.
Importantly, the complexity does not depends on (u) and (v). Ourimplementation of the ARI for instance is one or two order of magnitudefaster than some standard implementation inR.
The functions included in aricode are:
ARI: computes the adjusted rand indexChi2: computes the Chi-square statisticsMARI/MARIraw: computes the modified adjusted rand index (Sundqvistet 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
Here are some timings to compare the cost of computing the adjusted RandIndex witharicode or with the commonly used functionadjustedRandIndex of themclust package: the cost of the latter canbe prohibitive for large vectors:
About
R package for computation of (adjusted) rand-index and other such scores
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.
