Adjusted mutual information

From HandWiki

In probability theory and information theory, adjusted mutual information, a variation of mutual information may be used for comparing clusterings.[1] It corrects the effect of agreement solely due to chance between clusterings, similar to the way the adjusted rand index corrects the Rand index. It is closely related to variation of information:[2] when a similar adjustment is made to the VI index, it becomes equivalent to the AMI.[1] The adjusted measure however is no longer metrical.[3]

Mutual information of two partitions

Given a set S of N elements [math]\displaystyle{ S=\{s_1, s_2,\ldots s_N\} }[/math], consider two partitions of S, namely [math]\displaystyle{ U=\{U_1, U_2,\ldots, U_R\} }[/math] with R clusters, and [math]\displaystyle{ V=\{V_1, V_2,\ldots, V_C\} }[/math] with C clusters. It is presumed here that the partitions are so-called hard clusters; the partitions are pairwise disjoint:

[math]\displaystyle{ U_i\cap U_j = \varnothing = V_i\cap V_j }[/math]

for all [math]\displaystyle{ i\ne j }[/math], and complete:

[math]\displaystyle{ \cup_{i=1}^RU_i=\cup_{j=1}^C V_j=S }[/math]

The mutual information of cluster overlap between U and V can be summarized in the form of an RxC contingency table [math]\displaystyle{ M=[n_{ij}]^{i=1 \ldots R}_{j=1 \ldots C} }[/math], where [math]\displaystyle{ n_{ij} }[/math] denotes the number of objects that are common to clusters [math]\displaystyle{ U_i }[/math] and [math]\displaystyle{ V_j }[/math]. That is,

[math]\displaystyle{ n_{ij}=\left|U_i\cap V_j\right| }[/math]

Suppose an object is picked at random from S; the probability that the object falls into cluster [math]\displaystyle{ U_i }[/math] is:

[math]\displaystyle{ P_U(i)=\frac{|U_i|}{N} }[/math]

The entropy associated with the partitioning U is:

[math]\displaystyle{ H(U)=-\sum_{i=1}^R P_U(i)\log P_U(i) }[/math]

H(U) is non-negative and takes the value 0 only when there is no uncertainty determining an object's cluster membership, i.e., when there is only one cluster. Similarly, the entropy of the clustering V can be calculated as:

[math]\displaystyle{ H(V)=-\sum_{j=1}^C P_V(j)\log P_V(j) }[/math]

where [math]\displaystyle{ P_V(j)={|V_j|}/{N} }[/math]. The mutual information (MI) between two partitions:

[math]\displaystyle{ MI(U,V)=\sum_{i=1}^R \sum_{j=1}^C P_{UV}(i,j)\log \frac{P_{UV}(i,j)}{P_U(i)P_V(j)} }[/math]

where [math]\displaystyle{ P_{UV}(i,j) }[/math] denotes the probability that a point belongs to both the cluster [math]\displaystyle{ U_i }[/math] in U and cluster [math]\displaystyle{ V_j }[/math] in V:

[math]\displaystyle{ P_{UV}(i,j)=\frac{|U_i \cap V_j|}{N} }[/math]

MI is a non-negative quantity upper bounded by the entropies H(U) and H(V). It quantifies the information shared by the two clusterings and thus can be employed as a clustering similarity measure.

Adjustment for chance

Like the Rand index, the baseline value of mutual information between two random clusterings does not take on a constant value, and tends to be larger when the two partitions have a larger number of clusters (with a fixed number of set elements N). By adopting a hypergeometric model of randomness, it can be shown that the expected mutual information between two random clusterings is:

[math]\displaystyle{ \begin{align} E\{MI(U,V)\} = & \sum_{i=1}^R \sum_{j=1}^C \sum_{n_{ij}=(a_i+b_j-N)^+}^{\min(a_i, b_j)} \frac{n_{ij}}{N} \log \left( \frac{ N\cdot n_{ij}}{a_i b_j}\right) \times \\ & \frac{a_i!b_j!(N-a_i)!(N-b_j)!} {N!n_{ij}!(a_i-n_{ij})!(b_j-n_{ij})!(N-a_i-b_j+n_{ij})!} \\ \end{align} }[/math]

where [math]\displaystyle{ (a_i+b_j-N)^+ }[/math] denotes [math]\displaystyle{ \max(0,a_i+b_j-N) }[/math]. The variables [math]\displaystyle{ a_i }[/math] and [math]\displaystyle{ b_j }[/math] are partial sums of the contingency table; that is,

[math]\displaystyle{ a_i=\sum_{j=1}^Cn_{ij} }[/math]

and

[math]\displaystyle{ b_j=\sum_{i=1}^Rn_{ij} }[/math]

The adjusted measure[1] for the mutual information may then be defined to be:

[math]\displaystyle{ AMI(U,V)= \frac{MI(U,V)-E\{MI(U,V)\}} {\max{\{H(U),H(V)\}}-E\{MI(U,V)\}} }[/math].

The AMI takes a value of 1 when the two partitions are identical and 0 when the MI between two partitions equals the value expected due to chance alone.

References

  1. 1.0 1.1 1.2 Vinh, N. X.; Epps, J.; Bailey, J. (2009). "Information theoretic measures for clusterings comparison". Proceedings of the 26th Annual International Conference on Machine Learning - ICML '09. pp. 1. doi:10.1145/1553374.1553511. ISBN 9781605585161. 
  2. Meila, M. (2007). "Comparing clusterings—an information based distance". Journal of Multivariate Analysis 98 (5): 873–895. doi:10.1016/j.jmva.2006.11.013. 
  3. Vinh, Nguyen Xuan; Epps, Julien; Bailey, James (2010), "Information Theoretic Measures for Clusterings Comparison: Variants, Properties, Normalization and Correction for Chance", The Journal of Machine Learning Research 11 (oct): 2837–54, http://jmlr.csail.mit.edu/papers/volume11/vinh10a/vinh10a.pdf 

External links