fowlkes_mallows: Fowlkes-Mallows Index Between Clusterings

View source: R/measures_clusterings.R

fowlkes_mallowsR Documentation

Fowlkes-Mallows Index Between Clusterings

Description

Computes the Fowlkes-Mallows index between two clusterings, such as a predicted and ground truth clustering.

Usage

fowlkes_mallows(true, pred)

Arguments

true

ground truth clustering represented as a membership vector. Each entry corresponds to an element and the value identifies the assigned cluster. The specific values of the cluster identifiers are arbitrary.

pred

predicted clustering represented as a membership vector.

Details

The Fowlkes-Mallows index is defined as the geometric mean of precision and recall, computed with respect to pairs of elements.

References

Fowlkes, E. B. and Mallows, C. L. "A Method for Comparing Two Hierarchical Clusterings." Journal of the American Statistical Association 78:383, 553-569, (1983). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.1983.10478008")}

Examples

true <- c(1,1,1,2,2)  # ground truth clustering
pred <- c(1,1,2,2,2)  # predicted clustering
fowlkes_mallows(true, pred)


clevr documentation built on Sept. 16, 2023, 5:06 p.m.