# cdlib.evaluation.overlapping_normalized_mutual_information_MGH¶

overlapping_normalized_mutual_information_MGH(first_partition: object, second_partition: object, normalization: str = 'max') → cdlib.evaluation.comparison.MatchingResult

Overlapping Normalized Mutual Information between two clusterings.

Extension of the Normalized Mutual Information (NMI) score to cope with overlapping partitions. This is the version proposed by McDaid et al. using a different normalization than the original LFR one. See ref. for more details.

Parameters: first_partition – NodeClustering object second_partition – NodeClustering object normalization – one of “max” or “LFK”. Default “max” (corresponds to the main method described in the article) MatchingResult object
>>> from cdlib import evaluation, algorithms
>>> g = nx.karate_club_graph()
>>> louvain_communities = algorithms.louvain(g)
>>> leiden_communities = algorithms.leiden(g)
>>> evaluation.overlapping_normalized_mutual_information_MGH(louvain_communities,leiden_communities)
:Reference:

1. McDaid, A. F., Greene, D., & Hurley, N. (2011). Normalized mutual information to evaluate overlapping community finding algorithms. arXiv preprint arXiv:1110.2515. Chicago