View source: R/measures_clusterings.R
fowlkes_mallows | R Documentation |
Computes the Fowlkes-Mallows index between two clusterings, such as a predicted and ground truth clustering.
fowlkes_mallows(true, pred)
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. |
The Fowlkes-Mallows index is defined as the geometric mean of precision and recall, computed with respect to pairs of elements.
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")}
true <- c(1,1,1,2,2) # ground truth clustering
pred <- c(1,1,2,2,2) # predicted clustering
fowlkes_mallows(true, pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.