Skip to content

Python implementation of locus-based genetic algorithm of community detection

License

Notifications You must be signed in to change notification settings

hariswb/ga-community-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Community Detection With Genetic Algorithm

From time to time, social network analysis requires us to classify the number of groups from a given network. This simple module is a python implementation of a locus based genetic algorithm for community detection by Clara Pizzuti.[1]

This algorithm is particularly good at detecting communities in which we don't know their number beforehand. This algorithm finds communities by its structure: it classify densely connected nodes into a group. Although it runs slowly, this algorithm will help us in preliminary analysis of a social network.

Usage

import gacomm as gc

nodes = [0,1,2,3,4,5,6,7,8,9,10]
edges = [(0,1),(0,4),(1,2),(2,3),(1,3),(3,0),(0,2),(4,5),(5,6),(6,7),(10,8),(10,9),(8,9),(8,7),(9,7),(7,10)]

gc.community_detection(N,E)

# Possible output
# [[0,1,2,3],[4,5,6],[7,8,9,10]]

Reference

1. Pizzuti, C. (2008). Ga-net: A genetic algorithm for community detection in social networks. In Inter conf on parallel problem solving from nature, pages 1081–1090.Springer.

About

Python implementation of locus-based genetic algorithm of community detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages