- Introduced by
- E. B. Fowlkes, C. L. Mallows
- Year
- 1983
- Type
- Pair-counting metric
- Family
- External Clustering Validation
What does it do?
The Fowlkes-Mallows Index, introduced by Fowlkes and Mallows in 1983, is an external clustering evaluation metric based on the geometric mean of precision and recall.
It measures agreement between two partitions by examining pairs of points and how they are grouped in both the predicted and ground truth clusterings. Values range from 0 to 1, with 1 indicating perfect agreement.
The intuition behind the method
The Fowlkes-Mallows Index extends the concept of precision and recall from classification to clustering. For each pair of points, we ask: if they are in the same cluster in the ground truth, are they also in the same cluster in the predicted clustering (recall), and vice versa (precision). The FM Index is the geometric mean of these two rates. This pair-based approach directly measures how well the clustering preserves point relationships.
History
Fowlkes and Mallows (1983) introduced the statistic B_k for comparing two hierarchical clusterings. B_k is derived from the matching matrix formed by cutting both trees into k clusters, and its mean and variance are derived under the assumption that the margins of that matrix are fixed. The paper treats B_k as a collection of measures for k = 2, …, n − 1, finds (k, B_k) plots useful for portraying the similarity of two clusterings, and compares B_k with the similarity measures of Baker (1974) and Rand (1971). The pair-count form given on this page is one way to compute the index for two flat partitions.
When to use it
Choose the Fowlkes-Mallows Index when you have a reference partition (ground-truth labels) and want to measure how closely a predicted clustering agrees with it, for example when benchmarking several algorithms or parameter settings on labelled data. It is a pair-based measure, so it suits questions about whether points that belong together in the reference are also grouped together in the prediction. Do not use it as a stand-alone quality score when no reference labels exist, since the formula needs TP, FP and FN, which are defined by comparing two partitions. It can still measure agreement between two clusterings, as in the stability analysis described under applications, but such agreement does not by itself show that either clustering matches the ground truth. If you need a score corrected for the agreement expected by chance, the Adjusted Rand Index is the more direct choice, because the FM formula contains no chance correction. When you compare hierarchical clusterings, the index should be computed at the same number of clusters (the same cut level) in both trees. The index is a similarity: higher values mean closer agreement, and 1 means perfect agreement. No universal cut-off separates good from poor clusterings, so interpret a value by comparing methods or parameter settings evaluated on the same dataset with the same reference partition.
Limitations and considerations
- Requires a second partition, either ground-truth labels or another clustering, to compare against, so it cannot score a clustering in isolation.
- The formula has no correction for agreement expected by chance, so the value is not anchored at zero for random partitions in the way a chance-corrected index is
- Because every pair counts equally, large clusters contribute many more pairs than small ones and can dominate the score when cluster sizes differ strongly
- Pair counts grow quadratically with the number of points when enumerated directly, although the counts can also be obtained from the contingency table of the two labelings
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Built from the same pair-level quantities as precision and recall, so the result can be read as a balance between pairs the prediction keeps together and pairs the reference keeps together
- Bounded between 0 and 1 by construction, because TP cannot exceed the geometric mean of the two pair totals in the denominator
- Can be computed directly from the pair counts TP, FP and FN, so no expected-value model or permutation step is required
Applications
- Benchmarking clustering algorithms against labelled reference partitions
- Comparing hierarchical clusterings by cutting both trees at the same number of clusters
- Comparing the outputs of different clustering algorithms or parameter settings on the same labelled dataset
- Assessing clustering stability by averaging FM similarity between clusterings of bootstrap samples for each k, and choosing the k that maximizes the expected similarity
How it works
How it works
Count pairs of points that are grouped together in both the predicted clustering and the ground truth; these represent correct within-cluster pairings.
Formula
TP = \text{pairs in same cluster in both partitions}Count pairs of points that are grouped together in the predicted clustering but not in the ground truth; these represent false cluster memberships.
Formula
FP = \text{pairs in same cluster in predicted but not true}Count pairs of points that are grouped together in the ground truth but not in the predicted clustering; these represent missed within-cluster relationships.
Formula
FN = \text{pairs in same cluster in true but not predicted}Compute the Fowlkes-Mallows Index as the geometric mean of precision (TP / (TP + FP)) and recall (TP / (TP + FN)), yielding a value between 0 and 1.
Formula
FM = \frac{TP}{\sqrt{(TP + FP)(TP + FN)}}Common pitfalls
- Reading a high value as evidence of good clustering on imbalanced data: a few large clusters can produce a high score even when small clusters are poorly recovered
- Comparing raw FM values across datasets with different numbers of points or clusters, since the index has no chance correction and its baseline shifts with the partition structure
- Encountering an undefined value when TP+FP or TP+FN is zero, for example when the predicted partition has only singleton clusters, so no within-cluster pairs exist; such cases should be reported rather than scored
- Forgetting that the value is computed on pairs, so two partitions with the same number of correct pairs but different cluster structures can receive the same score
Frequently asked questions
How is the Fowlkes-Mallows Index different from the Adjusted Rand Index?
Both are pair-counting measures for comparing a clustering with a reference partition, but they combine the pair counts differently. The FM Index is the geometric mean of pairwise precision and recall and has no chance correction. The Adjusted Rand Index corrects the agreement for what would be expected by chance. The FM Index ranges from 0 to 1, while the Adjusted Rand Index ranges from -1 to 1.
Is the Fowlkes-Mallows Index symmetric?
Yes, according to the formula on this page. Swapping the predicted and reference partitions exchanges FP and FN, and the denominator sqrt((TP+FP)(TP+FN)) is unchanged by that swap, so the value is the same. The index therefore does not require a choice of which partition is the reference, although the roles of precision and recall are interchanged.
Can FM Index be used for hierarchical clustering?
Yes. The index was originally proposed for comparing two hierarchical clusterings. Compare the two trees at the same number of clusters (the same cut level), because the value depends on the partitions being compared at that level. The original paper examined the index across a range of cut levels.
What should I do if the ground truth labels are uncertain or only partly available?
The index needs a reference partition for every point it scores, so it cannot be applied to unlabelled points. If the reference is uncertain, the result reflects that uncertainty. You can compute the index on a subset of points with reliable labels, but state clearly which points were excluded and why.
Related methods
Sources
Fowlkes, E. B., & Mallows, C. L. (1983). A method for comparing two hierarchical clusterings. Journal of the American Statistical Association, 78(383), 553-569.
Open DOI referencebook-20160121, p. 456