Learn R Programming

FuzzySpec (version 1.0.0)

fari: Frobenius Adjusted Rand Index for Comparing Two Partition Matrices

Description

Computes fuzzy generalizations of the Adjusted Rand Index based on Frobenius inner products of membership matrices. These measures extends the Adjusted Rand Index to compare fuzzy partitions.

Usage

fari(a, b)

Value

A single numeric value

fari

The Frobenius Adjusted Rand index between a and b.

Arguments

a

An \(n \times G_1\) matrix of hard or fuzzy cluster memberships, where each row sums to 1.

b

An \(n \times G_2\) matrix of hard or fuzzy cluster memberships, where each row sums to 1.

References

Andrews, J.L., Browne, R. and C.D. Hvingelby (2022). On Assessments of Agreement Between Fuzzy Partitions. Journal of Classification, 39, 326–342.

J.L. Andrews, FARI (2013). GitHub repository, https://github.com/its-likeli-jeff/FARI

Examples

Run this code
set.seed(1)
a <- matrix(runif(600), nrow = 200, ncol = 3)
a <- a / rowSums(a)
b <- matrix(runif(600), nrow = 200, ncol = 3)
b <- b / rowSums(b)

fari(a, b)

Run the code above in your browser using DataLab