Skip to main content
python-paris: Hierarchical graph clustering algorithm (paris) and dendrogram processing
=========================

paris is a Python module that provides an implementation of the hierarchical clustering algorithm for graphs, paris.
It provides four algorithms able to process dendrograms in order to extract best clusters, clusterings or distances.

Installation
------------

Install the latest version of cylouvain using ``pip`` ::

$ pip install python_paris

Dependencies
------------

cylouvain requires:

- Python (>= 2.7 or >= 3.4)
- NumPy
- NetworkX

Simple example
--------------

Build a simple graph with NetworkX::

>>> import networkx as nx
>>> graph = nx.Graph()
>>> graph.add_nodes_from(['0', '1', '2', '3', '4', '5'])
>>> graph.add_edges_from([(0, 1, 1), (0, 2, 1), (1, 2, 1), (2, 3, 1),
(3, 4, 1), (3, 5, 1), (4, 5, 1)])

Compute a clustering hierarchy of the nodes using paris::

>>> from python_paris import paris
>>> dendrogram = paris(graph)

Compute the best clusters, clusterings and distances::

>>> best_cluster = best_cluster_cut(dendrogram)
>>> best_homogneous_clustering = best_homogeneous_cut(dendrogram)
>>> best_heterogneous_clustering = best_heterogeneous_cut(dendrogram)
>>> best_distance = best_distance

License
-------

Released under the Apache License 2.0 licence::

Copyright (C) 2018 Bertrand Charpentier <bercha@kth.se>

Metadata

Release files for python_paris 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python_paris 0.0.1
File Size Uploaded
python_paris-0.0.1.tar.gz 6.3 kB Details

Release files / python_paris-0.0.1.tar.gz

Download URL python_paris-0.0.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e7f08e1fcd7bff0a3aa405bed69c0a7372f2b349155fd945da75983cc276a6cd
BLAKE2b-256 checksum
How to use checksums
36a7971ed2a24d29a3304793d1d1e3eb4b6b0475ef896d3677742abc895840a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page