Fowlkes–Mallows index

From HandWiki
Revision as of 14:50, 6 February 2024 by Ohm (talk | contribs) (change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Evaluation method in cluster analysis

The Fowlkes–Mallows index is an external evaluation method that is used to determine the similarity between two clusterings (clusters obtained after a clustering algorithm), and also a metric to measure confusion matrices. This measure of similarity could be either between two hierarchical clusterings or a clustering and a benchmark classification. A higher value for the Fowlkes–Mallows index indicates a greater similarity between the clusters and the benchmark classifications. It was invented by Bell Labs statisticians Edward Fowlkes and Collin Mallows in 1983.[1]

Preliminaries

The Fowlkes–Mallows index, when results of two clustering algorithms are used to evaluate the results, is defined as[2]

[math]\displaystyle{ FM = \sqrt{ PPV \cdot TPR}= \sqrt{ \frac {TP}{TP+FP} \cdot \frac{TP}{TP+FN} } }[/math]

where [math]\displaystyle{ TP }[/math] is the number of true positives, [math]\displaystyle{ FP }[/math] is the number of false positives, and [math]\displaystyle{ FN }[/math] is the number of false negatives. [math]\displaystyle{ TPR }[/math] is the true positive rate, also called sensitivity or recall, and [math]\displaystyle{ PPV }[/math] is the positive predictive rate, also known as precision.

The minimum possible value of the Fowlkes–Mallows index is 0, which corresponds to the worst binary classification possible, where all the elements have been misclassified. And the maximum possible value of the Fowlkes–Mallows index is 1, which corresponds to the best binary classification possible, where all the elements have been perfectly classified.

Definition

Consider two hierarchical clusterings of [math]\displaystyle{ n }[/math] objects labeled [math]\displaystyle{ A_1 }[/math] and [math]\displaystyle{ A_2 }[/math]. The trees [math]\displaystyle{ A_1 }[/math] and [math]\displaystyle{ A_2 }[/math] can be cut to produce [math]\displaystyle{ k=2,\ldots,n-1 }[/math] clusters for each tree (by either selecting clusters at a particular height of the tree or setting different strength of the hierarchical clustering). For each value of [math]\displaystyle{ k }[/math], the following table can then be created

[math]\displaystyle{ M=[m_{i,j}] \qquad (i=1,\ldots,k \text{ and } j=1,\ldots,k) }[/math]

where [math]\displaystyle{ m_{i,j} }[/math] is of objects common between the [math]\displaystyle{ i }[/math]th cluster of [math]\displaystyle{ A_1 }[/math] and [math]\displaystyle{ j }[/math]th cluster of [math]\displaystyle{ A_2 }[/math]. The Fowlkes–Mallows index for the specific value of [math]\displaystyle{ k }[/math] is then defined as

[math]\displaystyle{ B_k=\frac{T_k}{\sqrt{P_kQ_k}} }[/math]

where

[math]\displaystyle{ T_k=\sum_{i=1}^{k}\sum_{j=1}^{k}m_{i,j}^2-n }[/math]
[math]\displaystyle{ P_k=\sum_{i=1}^{k}(\sum_{j=1}^{k}m_{i,j})^2-n }[/math]
[math]\displaystyle{ Q_k=\sum_{j=1}^{k}(\sum_{i=1}^{k}m_{i,j})^2-n }[/math]

[math]\displaystyle{ B_k }[/math] can then be calculated for every value of [math]\displaystyle{ k }[/math] and the similarity between the two clusterings can be shown by plotting [math]\displaystyle{ B_k }[/math] versus [math]\displaystyle{ k }[/math]. For each [math]\displaystyle{ k }[/math] we have [math]\displaystyle{ 0 \le B_k \le 1 }[/math].

Fowlkes–Mallows index can also be defined based on the number of points that are common or uncommon in the two hierarchical clusterings. If we define

[math]\displaystyle{ TP }[/math] as the number of pairs of points that are present in the same cluster in both [math]\displaystyle{ A_1 }[/math] and [math]\displaystyle{ A_2 }[/math].
[math]\displaystyle{ FP }[/math] as the number of pairs of points that are present in the same cluster in [math]\displaystyle{ A_1 }[/math] but not in [math]\displaystyle{ A_2 }[/math].
[math]\displaystyle{ FN }[/math] as the number of pairs of points that are present in the same cluster in [math]\displaystyle{ A_2 }[/math] but not in [math]\displaystyle{ A_1 }[/math].
[math]\displaystyle{ TN }[/math] as the number of pairs of points that are in different clusters in both [math]\displaystyle{ A_1 }[/math] and [math]\displaystyle{ A_2 }[/math].

It can be shown that the four counts have the following property

[math]\displaystyle{ TP+FP+FN+TN=n(n-1)/2 }[/math]

and that the Fowlkes–Mallows index for two clusterings can be defined as[3]

[math]\displaystyle{ FM = \sqrt{ PPV \cdot TPR} = \sqrt{ \frac {TP}{TP+FP} \cdot \frac{TP}{TP+FN} } }[/math]
where [math]\displaystyle{ TP }[/math] is the number of true positives, [math]\displaystyle{ FP }[/math] is the number of false positives, and [math]\displaystyle{ FN }[/math] is the number of false negatives.
[math]\displaystyle{ TPR }[/math] is the true positive rate, also called sensitivity or recall, and [math]\displaystyle{ PPV }[/math] is the positive predictive rate, also known as precision.
The Fowlkes–Mallows index is the geometric mean of precision and recall.[4]

Discussion

Since the index is directly proportional to the number of true positives, a higher index means greater similarity between the two clusterings used to determine the index. One basic way to test the validity of this index is to compare two clusterings that are unrelated to each other. Fowlkes and Mallows showed that on using two unrelated clusterings, the value of this index approaches zero as the number of total data points chosen for clustering increase; whereas the value for the Rand index for the same data quickly approaches [math]\displaystyle{ 1 }[/math][1] making Fowlkes–Mallows index a much more accurate representation for unrelated data. This index also performs well if noise is added to an existing dataset and their similarity compared. Fowlkes and Mallows showed that the value of the index decreases as the component of the noise increases. The index also showed similarity even when the noisy dataset had a different number of clusters than the clusters of the original dataset. Thus making it a reliable tool for measuring similarity between two clusters.

Further reading

  • Chicco, Davide; Jurman, Giuseppe (2023). "A statistical comparison between Matthews correlation coefficient (MCC), prevalence threshold, and Fowlkes–Mallows index". Journal of Biomedical Informatics 144 (104426): 1-7. doi:10.1016/j.jbi.2023.104426. PMID 37352899. 

See also

References

  1. 1.0 1.1 Fowlkes, E. B.; Mallows, C. L. (1 September 1983). "A Method for Comparing Two Hierarchical Clusterings". Journal of the American Statistical Association 78 (383): 553. doi:10.2307/2288117. 
  2. Halkidi, Maria; Batistakis, Yannis; Vazirgiannis, Michalis (1 January 2001). "On Clustering Validation Techniques". Journal of Intelligent Information Systems 17 (2/3): 107–145. doi:10.1023/A:1012801612483. 
  3. MEILA, M (1 May 2007). "Comparing clusterings—an information based distance". Journal of Multivariate Analysis 98 (5): 873–895. doi:10.1016/j.jmva.2006.11.013. 
  4. "Classification assessment methods". Applied Computing and Informatics. August 2018. doi:10.1016/j.aci.2018.08.003. 

External links