ARI {noisysbmGGM} | R Documentation |
Evalute the adjusted Rand index
Description
Compute the adjusted Rand index to compare two partitions
Usage
ARI(x, y)
Arguments
x |
vector (of length n) or matrix (with n columns) providing a partition |
y |
vector or matrix providing a partition |
Details
the partitions may be provided as n-vectors containing the cluster memeberships of n entities, or by Qxn - matrices whose entries are all 0 and 1 where 1 indicates the cluster membership
Value
the value of the adjusted Rand index
Examples
clust1 <- c(1,2,1,2)
clust2 <- c(2,1,2,1)
ARI(clust1, clust2)
clust3 <- matrix(c(1,1,0,0, 0,0,1,1), nrow=2, byrow=TRUE)
clust4 <- matrix(c(1,0,0,0, 0,1,0,0, 0,0,1,1), nrow=3, byrow=TRUE)
ARI(clust3, clust4)
[Package noisysbmGGM version 0.1.2.3 Index]