Skip to content
/ paris Public
forked from tbonald/paris

Hierarchical graph clustering

Notifications You must be signed in to change notification settings

dsalvaz/paris

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paris algorithm

Paris is a hierarchical graph clustering algorithm described in the paper:

Hierarchical Graph Clustering using Node Pair Sampling

by Thomas Bonald, Bertrand Charpentier, Alexis Galland and Alexandre Hollocou

Dependency

This Python module depends on the networkx package, which can be installed using pip.

sudo pip install networkx

Getting started

Hierarchical clustering of a simple graph

import networkx as nx
from paris import paris

Generate a simple network:

G = nx.erdos_renyi_graph(n = 50, p = 0.2)

Compute the hierarchical clustering (as a dendrogram):

D = paris(G)

Visualize the dendrogram:

from utils import plot_dendrogram

plot_dendrogram(D)

Alt text

Running the tests

Tests on both synthetic and real data are available as a Jupyter notebook:

hierarchical_clustering.ipynb

License

Released under the 3-clause BSD license.

About

Hierarchical graph clustering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.5%
  • Python 0.5%