Skip to content

Omega Index for evaluation of overlapping community structure - (Python package available through pip)

License

Notifications You must be signed in to change notification settings

isaranto/omega_index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omega_index

Omega Index for evaluation of overlapping community structure

Implemented the omega index for ovelapping clusters as described in the reference below.

Gabriel Murray, Giuseppe Carenini, and Raymond Ng. 2012. Using the omega index for evaluating abstractive community detection. In Proceedings of Workshop on Evaluation Metrics and System Comparison for Automatic Summarization. Association for Computational Linguistics, Stroudsburg, PA, USA, 10-18.

Installation

You can simply use pip for installation:

$ pip install omega_index

or, if you prefer a local user installation:

$ pip install --user omega_index

You can use Python 2.7 or 3.6, download Here!

Usage

To evaluate a specific clustering output ground-truth data . The input (for both the clustering assignment and the ground truth) is a dictionary in the following form:

communities = {
    "com1": ["item1", "item2"],
    "com2": ["item3", "item4"],
    "com3": ["item5", "item6", "item9"],
    "com4": ["item7", "item8"],
    "com5": ["item9", "item10", "item4"],
    "com6": ["item11", "item12"],
    "com7": ["item13", "item14"]
}

In the above example we have ovelapping clusters, as item4 is both in the 2nd as well as the 5th community. Note that cluster/community names/IDS between the two dictionaries do not need to be the same, because algorithm examines the number of co occurrence of nodes in clusters rather than try to solve the cluster correspondence problem.

import omega_index

omega = omega_index.Omega(communities, ground_truth_communities)
print(omega.omega_score)

About

Omega Index for evaluation of overlapping community structure - (Python package available through pip)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages