Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

R package for computation of (adjusted) rand-index and other such scores

NotificationsYou must be signed in to change notification settings

jchiquet/aricode

Repository files navigation

R-CMD-checkCRAN StatusCoverage statusLifecycle: stable

A package for efficient computations of standard clustering comparisonmeasures

Installation

Stable version on theCRAN.

install.packages("aricode")

The development version is available via:

devtools::install_github("jchiquet/aricode")

Description

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.

Available measures and functions

The functions included in aricode are:

  • ARI: computes the adjusted rand index
  • Chi2: computes the Chi-square statistics
  • MARI/MARIraw: computes the modified adjusted rand index (Sundqvistet al, in preparation)
  • NVI: computes the the normalized variation information
  • NID: computes the normalized information distance
  • NMI: computes the normalized mutual information
  • AMI: computes the adjusted mutual information
  • expected_MI: computes the expected mutual information
  • entropy: computes the conditional and joint entropies
  • clustComp: computes all clustering comparison measures at once

Timings

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

Stars

Watchers

Forks

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp