FARI {MoEClust} | R Documentation |
Compute the Frobenius (adjusted) Rand index
Description
This function efficiently computes fuzzy generalisations of the Rand and adjusted Rand indices for comparing two partitions, allowing either or both partitions to be "soft" or "hard".
Usage
FARI(z1,
z2)
Arguments
z1 , z2 |
A |
Details
If z1
&/or z2
is supplied as a vector of cluster labels, they will be coerced to an appropriate matrix via unmap
.
Value
A list with the following named components:
FRI
Measure of Frobenius Rand index between
z1
andz2
.FARI
Measure of Frobenius adjusted Rand index between
z1
andz2
.
Note
The number of columns of the matrices z1
and z2
need not be equal.
Author(s)
Keefe Murphy - <keefe.murphy@mu.ie>
References
Andrew, J. L., Browne, R., and Hvingelby, C. D. (2022). On assessments of agreement between fuzzy partitions. Journal of Classification, 39(2): 326-342.
See Also
Examples
m1 <- MoE_clust(ais[,3:7], G=2, modelNames="EVE",
gating=~BMI, expert=~sex, network.data=ais)
m2 <- MoE_clust(ais[,3:7], G=2, modelNames="EVE",
equalPro=TRUE, expert=~sex, network.data=ais)
m3 <- MoE_clust(ais[,3:7], G=2, modelNames="VEE", algo="CEM", tau0=0.1)
# FARI between two soft partitions
FARI(m1$z, m2$z)
# FARI between soft and hard partitions
FARI(m1$z, m3$z)
# FARI between soft partition and hard classification
FARI(m1$z, m2$classification)
# FARI between hard partition and hard classification
FARI(m3$z, m3$classification)
# FARI between hard classification and hard classification
FARI(m1$classification, m2$classification)