Giter Site home page Giter Site logo

vishalbelsare / omega_index Goto Github PK

View Code? Open in Web Editor NEW

This project forked from isaranto/omega_index

0.0 0.0 0.0 38 KB

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

License: GNU General Public License v3.0

Python 100.00%

omega_index's Introduction

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)

omega_index's People

Contributors

isaranto avatar giuliorossetti avatar jfrode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.