ARI {graphclust} | R Documentation |
Adjusted Rand index
Description
ARI to compare two clusterings or to compare two entire lists of clusterings
Usage
ARI(x, y)
Arguments
x |
vector with clustering, matrix with hot-one-encoding of the clustering, or a list of clusterings (in vector or matrix form) |
y |
as x |
Value
ARI (scalar of vector)
Examples
x <- c(1,1,2,2,3,3)
y <- c(1,1,1,2,2,2)
ARI(x,y)
x <- matrix(0, 3, 6)
x[1,1] <- x[1,2] <- x[2,3] <- x[2,4] <- x[3,5] <- x[3,6] <- 1
y <- matrix(0, 2, 6)
y[1,1] <- y[1,2] <- y[1,3] <- y[2,4] <- y[2,5] <- y[2,6] <- 1
ARI(x,y)
X <- list(c(1,1,2,2,3,3), rep(1,10))
Y <- list(c(1,1,1,2,2,2), rep(1:2,each=5))
ARI(X,Y)
[Package graphclust version 1.3 Index]