FARI | R Documentation |
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".
FARI(z1,
z2)
z1 , z2 |
A |
If z1
&/or z2
is supplied as a vector of cluster labels, they will be coerced to an appropriate matrix via unmap
.
A list with the following named components:
FRI
Measure of Frobenius Rand index between z1
and z2
.
FARI
Measure of Frobenius adjusted Rand index between z1
and z2
.
The number of columns of the matrices z1
and z2
need not be equal.
Keefe Murphy - <keefe.murphy@mu.ie>
Andrew, J. L., Browne, R., and Hvingelby, C. D. (2022). On assessments of agreement between fuzzy partitions. Journal of Classification, 39(2): 326-342.
unmap
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.