Git Product home page Git Product logo

comdet's Introduction

comdet

Comdet stands for community detection. In the study of complex networks, a network is said to have community structure if the nodes of the network can be easily grouped into (potentially overlapping) sets of nodes such that each set of nodes is densely connected internally.

comdet is used to detect community among graph nodes. Its based on lovain method Pypi page for comdet module is at https://pypi.python.org/pypi/comdet/

It is based on louvain method for community detection problem in given graph nodes https://sites.google.com/site/findcommunities/

Installation

Easy install

easy_install comdet

Pip:

$pip install comdet

or just download the package from here and use it as stand alone.

Usage

####Sample python file

from comdet import comdet
result = comdet.detect("input", debug=True)
print result

####Interface. Following iterface is used to interact with comdet package

comdet.detect(inputfile, nop = -1, debug = False)
  • inputfile - The inputfile to the package.
  • nop - number of passes upto which the community detection will run. by default it is infinity.
  • debug - used to debug information

####Input file

Input files contains space separated src dst pair of graph nodes eg.

DL0 DL4
DL3 DL6
DL8 DL2
DL4 DL3
DL2 DL2
DL3 DL4
DL2 DL8
DL8 DL4
DL0 DL7
DL10 DL4
DL9 DL6
DL8 DL6
DL2 DL8
DL9 DL10
DL8 DL8
DL4 DL9
.
.
.

####Output

Output is nested list of community structure.

[[[[['DL23', 'DL19', 'DL27']], [['DL28', 'DL26', 'DL20'], ['DL44'], ['DL38', 'DL46', 'DL42'], ['DL10', 'DL6', 'DL1', 'DL2', 'DL0'], ['DL34', 'DL37']]]]]
The above output consist of 4 passes.
Pass 1 => 
1Group1 - ['DL23', 'DL19', 'DL27']]
1Group2 - ['DL28', 'DL26', 'DL20']
1Group3 - ['DL44']
1Group4 - ['DL10', 'DL6', 'DL1', 'DL2', 'DL0']
1Group5 - ['DL34', 'DL37']

Pass2  => 
Now nodes of previous pass group together to form mode strong community.
2Group1 - [1Group1]
2Group2 - [1Group2, 1Group3, 1Group4, 1Group5]

Pass3  =>
3Group1 - [2Group1, 2Group3]

Pass4 => 
4Group1 - [3Group1]

Pass5 => 
5Group1 - [4Group1]
Now as the number of community in pass4 and Pass5 are same the processing stops and pass 4 output is taken.

comdet's People

Contributors

pankajr141 avatar

Watchers

 avatar  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.