Giter Site home page Giter Site logo

olivroy / aricode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jchiquet/aricode

0.0 0.0 0.0 897 KB

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

Home Page: https://jchiquet.github.io/aricode

C++ 18.08% R 81.92%

aricode's Introduction

aricode

R-CMD-check CRAN Status Coverage status Lifecycle: stable

A package for efficient computations of standard clustering comparison measures

Installation

Stable version on the CRAN.

install.packages("aricode")

The development version is available via:

devtools::install_github("jchiquet/aricode")

Description

Computation of measures for clustering comparison (ARI, AMI, NID and even the (\chi^2) distance) are usually based on the contingency table. Traditional implementations (e.g., function adjustedRandIndex of package mclust) are in (\Omega(n + u v)) where

  • (n) is the size of the vectors the classifications of which are to be compared,
  • (u) and (v) are the respective number of classes in each vectors.

In aricode we propose an implementation, based on radix sort, that is in (\Theta(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.

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 (Sundqvist et 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 Rand Index with aricode or with the commonly used function adjustedRandIndex of the mclust package: the cost of the latter can be prohibitive for large vectors:

aricode's People

Contributors

jchiquet avatar kant avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.