Computes the adjusted or unadjusted Rand index between two clusterings/partitions of the same objects.
Usage
arandi(cl1, cl2, adjust = TRUE)
Arguments
cl1,cl2
vectors of cluster memberships (need to have the same lengths).
adjust
logical. Should index be adjusted? Defaults to TRUE.
Details
The Rand index is based on how often the two clusterings agree in the treatment of pairs of observations,
where agreement means that two observations are in/not in the same cluster in both clusterings.
The adjusted Rand index adjusts for the expected number of chance agreements.
Formulas of Hubert and Arabie (1985) are used for the computation.
References
Hubert, L. and Arabie, P. (1985): Comparing
partitions. Journal of Classification, 2, 193--218.