Learn R Programming

cata (version 0.1.0.27)

ARI: Adjusted Rand index

Description

Calculate the adjusted Rand index (ARI) between two sets of cluster memberships.

Usage

ARI(x, y, signif = FALSE, n = 1000)

Value

list of the following:

  • ari adjusted Rand index

  • nari normalized adjusted Rand index

  • sim.mean average value of null distribution (should be closed to zero)

  • sim.var variance of null distribution

  • p.value P value of observed ARI (or NARI) value

Arguments

x

vector of cluster memberships (integers)

y

vector of cluster memberships (integers)

signif

conduct significance test; default is FALSE

n

number of replicates in Monte Carlo significance test

Author

J.C. Castura

References

Hubert, L., & Arabie, P. (1985). Comparing partitions. Journal of Classification, 2, 193–218. tools:::Rd_expr_doi("10.1007/BF01908075").

Qannari, E.M., Courcoux, P., & Faye, P. (2014). Significance test of the adjusted Rand index. Application to the free sorting task. Food Quality and Preference, 32, 93-97. tools:::Rd_expr_doi("10.1016/j.foodqual.2013.05.005").

Examples

Run this code
x <- sample(1:3, 20, replace = TRUE)
y <- sample(1:3, 20, replace = TRUE)

ARI(x, y, signif = FALSE)

Run the code above in your browser using DataLab