rand {blockmodeling} | R Documentation |
Comparing partitions on one or multiple sets of units
Description
Rand Index and Rand Index corrected/adjusted for chance for comparing partitions (Hubert & Arabie, 1985). The functions also support computing these indices on partitions on multiple sets (where a "combined" partition is a list of multiple partitions). The names of the clusters do not matter.
Usage
rand(clu1, clu2, tab)
crand(
clu1,
clu2,
tab,
multiSets = c("weights", "unlist"),
weights = c("size", "equal"),
returnIndividual = "attr"
)
rand2(clu1, clu2)
crand2(clu1, clu2)
Arguments
clu1 |
The first of the two partitions to be compared, given in the form of vectors, where for each unit a cluster membership is given. Alternatively, this can be a contingency table obtained as a |
clu2 |
If |
tab |
A contingency table obtained as a |
multiSets |
How should we compute the index in case of multiple sets of unis (if |
weights |
Weights to be used if |
returnIndividual |
If |
Value
The value of Rand Index (corrected/adjusted for chance) unless multiSets="weight"
and returnIndividual=FALSE
. In this case, a list with two items is return. The "global" index is in global
, while the the indices by sets are in bySets
.
Author(s)
Aleš Žiberna
References
Hubert, L., & Arabie, P. (1985). Comparing Partitions. Journal of Classification, 2(1), 193-218.