SkillAgentSearch skills...

Paris

Hierarchical graph clustering

Install / Use

/learn @tbonald/Paris
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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.

View on GitHub
GitHub Stars38
CategoryDevelopment
Updated1y ago
Forks7

Languages

Jupyter Notebook

Security Score

65/100

Audited on Dec 29, 2024

No findings