Adjusted Rand Index (ARI)
Compute the Adjusted Rand Index (ARI) between the true latent variables and the estimated latent variables
ARI(z, hat.z)
z
: Matrix of size with entries = 0 or 1 : 'true' latent variableshat.z
: Matrix of with 0<entries<1 : estimated latent variablesz <- matrix(c(1,1,0,0,0,0, 0,0,1,1,0,0, 0,0,0,0,1,1), nrow = 3, byrow = TRUE) hat.z <- matrix(c(0,0,1,1,0,0, 1,1,0,0,0,0, 0,0,0,0,1,1), nrow = 3, byrow = TRUE) ARI(z, hat.z)