Skip to main content

Hierarchical Graph Analysis

Project description

Higra: Hierarchical Graph Analysis

Build Status Build status codecov Documentation Status

Higra is a C++/Python library for efficient sparse graph analysis with a special focus on hierarchical methods. Some of the main features are:

  • efficient methods and data structures to handle the dual representations of hierarchical clustering: trees (dendrograms) and saliency maps (ultrametric distances);
  • hierarchical clusterings: quasi-flat zone hierarchy, hierarchical watersheds, agglomerative clustering (single-linkage, average-linkage, complete-linkage, exponential-linkage, Ward, or user provided linkage rule), constrained connectivity hierarchy;
  • component trees: min and max trees;
  • manipulate and explore hierarchies: simplification, accumulators, cluster extraction, various attributes (size, volume, dynamics, perimeter, compactness, moments, etc.), horizontal and non-horizontal cuts, hierarchies alignment;
  • optimization on hierarchies: optimal cuts, energy hierarchies;
  • algorithms on graphs: accumulators, vertices and clusters dissimilarities, region adjacency graphs, minimum spanning trees and forests, watershed cuts;
  • assessment: supervised assessment of graph clusterings and hierarchical clusterings;
  • image toolbox: special methods for grid graphs, tree of shapes, hierarchical clustering methods dedicated to image analysis, optimization of Mumford-Shah energy.

Higra is thought for modularity, performance and seamless integration with classical data analysis pipelines. The data structures (graphs and trees) are decoupled from data (vertex and edge weights ) which are simply arrays (xtensor arrays in C++ and numpy arrays in Python).

Installation

The Python package can be installed with Pypi:

pip install higra

Supported systems:

  • Python 3.4, 3.5, 3.6, 3.7
  • Linux 64 bits, macOS, Windows 64 bits

Documentation

https://higra.readthedocs.io/

Demonstration and tutorials

A collection of demonstration notebooks is available in the documentation. Notebooks are stored in a dedicated repository Higra-Notebooks.

Code samples

This example demonstrates the construction of a single-linkage hierarchical clustering and its simplification by a cluster size criterion.

Example on clustering

This example demonstrates the use of hierarchical clustering for image filtering.

Example on image filtering

Developing C++ extensions

While Higra provides many vectorized operators to implement algorithms efficiently in Python, it is possible that some operations cannot be done efficiently in Python. In such case, the Higra-cppextension-cookiecutter enables to easily setup and generate c++ extension using Higra with Python bindings.

License and how-to cite

The license Cecill-B is fully compatible with BSD-like licenses (BSD, X11, MIT) with an attribution requirement.

The recommended way to give attribution is by citing the following presentation article:

B. Perret, G. Chierchia, J. Cousty, S.J. F. Guimarães, Y. Kenmochi, L. Najman, Higra: Hierarchical Graph Analysis, SoftwareX, Volume 10, 2019. DOI: 10.1016/j.softx.2019.100335

Bibtex
@article{PCCGKN:softwarex2019,
     title = "Higra: Hierarchical Graph Analysis",
     journal = "SoftwareX",
     volume = "10",
     pages = "1--6",
     year = "2019",
     issn = "2352-7110",
     doi = "10.1016/j.softx.2019.100335",
     author = "B. Perret and G. Chierchia and J. Cousty and S.J. F. Guimar\~{a}es and Y. Kenmochi and L. Najman",
 }

Third-party libraries

Higra bundles several third-party libraries (inside the lib folder):

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for higra, version 0.4.5
Filename, size File type Python version Upload date Hashes
Filename, size higra-0.4.5-cp34-cp34m-macosx_10_6_intel.whl (6.8 MB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp34-cp34m-manylinux1_x86_64.whl (6.8 MB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp34-cp34m-win_amd64.whl (4.5 MB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp35-cp35m-macosx_10_6_intel.whl (6.8 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp35-cp35m-manylinux1_x86_64.whl (6.8 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp35-cp35m-win_amd64.whl (4.5 MB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp36-cp36m-macosx_10_6_intel.whl (6.8 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp36-cp36m-manylinux1_x86_64.whl (6.8 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp36-cp36m-win_amd64.whl (4.5 MB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp37-cp37m-macosx_10_6_intel.whl (6.8 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp37-cp37m-manylinux1_x86_64.whl (6.8 MB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size higra-0.4.5-cp37-cp37m-win_amd64.whl (4.5 MB) File type Wheel Python version cp37 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page