Hierarchical Graph Analysis
Project description
# Higra: Hierarchical Graph Analysis
[![Build Status](https://travis-ci.org/higra/Higra.svg?branch=master)](https://travis-ci.org/higra/Higra) [![Build status](https://ci.appveyor.com/api/projects/status/oo0v2uepcxihvwno?svg=true)](https://ci.appveyor.com/project/PerretB/higra-21ed3) [![codecov](https://codecov.io/gh/higra/Higra/branch/master/graph/badge.svg)](https://codecov.io/gh/higra/Higra) [![Documentation Status](https://readthedocs.org/projects/higra/badge/?version=latest)](https://higra.readthedocs.io/en/stable/?badge=stable)
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](https://github.com/QuantStack/xtensor) arrays in C++ and [numpy](https://github.com/numpy/numpy) arrays in Python).
## Installation
The Python package can be installed with Pypi:
`bash 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/](https://higra.readthedocs.io/)
### Demonstration and tutorials
A collection of demonstration notebooks is available in the [documentation](https://higra.readthedocs.io/en/stable/notebooks.html). Notebooks are stored in a dedicated repository [Higra-Notebooks](https://github.com/higra/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](doc/source/fig/example_graph_filtering.png)](https://github.com/higra/Higra-Notebooks/blob/master/Illustrations%20of%20SoftwareX%202019%20article.ipynb)
This example demonstrates the use of hierarchical clustering for image filtering.
[![Example on image filtering](doc/source/fig/example_image_filtering.png)](https://github.com/higra/Higra-Notebooks/blob/master/Illustrations%20of%20SoftwareX%202019%20article.ipynb)
## 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](https://github.com/higra/Higra-cppextension-cookiecutter) enables to easily setup and generate c++ extension using Higra with Python bindings.
## Third-party libraries
Higra bundles several third-party libraries (inside the lib folder):
[pybind11](https://github.com/pybind/pybind11) helps to create Python bindings of c++ methods and classes - [BSD-style license](https://github.com/pybind/pybind11/blob/master/LICENSE)
[xtensor](https://github.com/QuantStack/xtensor) (with [xtl](https://github.com/QuantStack/xtl), [xsimd](https://github.com/QuantStack/xsimd), and [xtensor-python](https://github.com/QuantStack/xtensor-python) provides numpy like arrays for c++ with seamless integration with Python - all under the [BSD-3-Clause license](https://github.com/QuantStack/xtensor/blob/master/LICENSE)
[Catch2](https://github.com/catchorg/Catch2) is a unit test framework - [Boost Software License 1.0](https://github.com/catchorg/Catch2/blob/master/LICENSE.txt)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for higra-0.4.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb0a471781b804fcf0aa18ab2d5f675992a0ccf3866202ce4204f0f1653ce4bd |
|
MD5 | 1fb362a87b977cbe29481f6bc5024390 |
|
BLAKE2b-256 | 7349eba6dffa67d9d804a6c76c7e1efbbacbb43686967850849525f5dfb5c713 |
Hashes for higra-0.4.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbc8e38c997db26f81881ea1da401cd761ba4c23c4d6135d8214d549adf576ac |
|
MD5 | 43049b087476fb7095b980bbe0cfbf73 |
|
BLAKE2b-256 | 5d73e7941ea48a86e4bbc20da10f83b4f1d800ce100028c1dfd7183c9ae7286c |
Hashes for higra-0.4.2-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef049db1ebd53d4f8a56d0353ee4570f6140b9b3557639ba81279291c71032f6 |
|
MD5 | c2af018e2261a5a3901ec8436115a68a |
|
BLAKE2b-256 | 8d8ea20b83cd35cd6e5aae2b12f2207e39ebac55b0ff824c1c7b1440f7e76d94 |
Hashes for higra-0.4.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5217c263538f79c9ca1442cbc6a94f0ecda4ba1359e1dc6cead638ae479f44ee |
|
MD5 | a065ba91d506b62925ebe0ddc5e4cc00 |
|
BLAKE2b-256 | 30b705bb8aef491fbbb9037ad346998a61e29b67e402b7dfb584589404309736 |
Hashes for higra-0.4.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98d38b26aa376635862a026d85500aceccfdaf91ae09e6ba8d74e9b9f6d584e7 |
|
MD5 | 7bcf78e1d544f61165f99a8d9d4dde88 |
|
BLAKE2b-256 | 1a21fda14ada084681c2993e656c078024259d159a285ff20885e2bbae97164e |
Hashes for higra-0.4.2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04175d63aba6726c8459502051e7851a036b40d16044e37e7a10c5261908893e |
|
MD5 | 2fbb0dcfa4e8713c51cd96a015950d9c |
|
BLAKE2b-256 | 0d47f39a274debd2bba420fa49400f7961760b1a0eeda78dfce2ef1d025042f5 |
Hashes for higra-0.4.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea84d82a58d4fa578289aeea08cbf1e934a804e51a87cb91f36afb7650120dba |
|
MD5 | e5e5e7461f2cd2093a63e0f89f0fc97a |
|
BLAKE2b-256 | 8d536b702e9701b1e0842ad8698104f7aefb6f92c1b2230c8630d0f58979b6f5 |
Hashes for higra-0.4.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a60afe4dd909ac840a279df43149d12805942221eb700e4e4f7eb57bd32bc0c0 |
|
MD5 | fb6a0aeddc8619726100298ff8a8396e |
|
BLAKE2b-256 | bb1ada9334fc58f0f3b634f3cee1e176632d1924992dff972de5bf026049ffbc |
Hashes for higra-0.4.2-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7447a690ff4b4b25dda0a62956783c27fa61182f86b9c74aaadac89748b2a72 |
|
MD5 | adb96c75fbcd6027d10e89a2d6f57ec4 |
|
BLAKE2b-256 | 9cac52ae611f76d9b4cda10aa4ccc13505ce73187eeea2ec63221f05dc9b9a1c |
Hashes for higra-0.4.2-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be60ffe4fdd5d70835f428472d149dbbb45670f734579c05966fd9ce4632c59e |
|
MD5 | 328650ba8e5f095158ae677abbb23f1e |
|
BLAKE2b-256 | 55de1355efdb87d7caa2b2ab5fb4fca8ab5411629bb5c5b20a9df031bbeb1893 |
Hashes for higra-0.4.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fafd3c5f43533184f74938b3f387ba28e459f44bff06f3f97551034df7af83b |
|
MD5 | df6e2f132c58c8fd712baae884ff7038 |
|
BLAKE2b-256 | 5db367b4a0a4fd891f18573d6b2c473a087891e5565ca78480cbf995dd6b60bf |
Hashes for higra-0.4.2-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 310137bbdb19c9c63bd06f45c90e0eab0258fe1a19fab5517471ecd8c3bfd4ec |
|
MD5 | 9dfbee10488c9ff7396b1600ff018023 |
|
BLAKE2b-256 | f2f5866aa9103a9cedae77b7347993167a75433a6bb63dc4eab97b70bef7f8e5 |