File Exchange

image thumbnail

The Adjusted Mutual Information

version (3.25 KB) by Xuan Vinh Nguyen
The Adjusted Mutual Information for clustering comparison


Updated 06 Oct 2011

View License

This program calculates the adjusted mutual information for comparing clusterings. It includes:

- The mutual information/adjusted mutual information
- The Rand index and some other indices
(see code)

[1] 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

[2] 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

Cite As

Xuan Vinh Nguyen (2021). The Adjusted Mutual Information (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Stan Driggs

If you would like to improve the accuracy of the calculated Expected MI, I recommend replacing the factorial calculations with the log gamma function, gammaln(N+1) = log(N!). This allows accurate calculations with much larger values of N and N=0.
>> logfact = @(x) gammaln(x+1);
>> exp( logfact(10000) - logfact(9990) )
ans =
>> prod(10000:-1:9991)
ans =
>> factorial(10000) ./ factorial(9990)
ans =

Hoan Do

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!