Hierarchical Graph Analysis
Project description
# Higra: Hierarchical Graph Analysis
[![Build Status](https://travis-ci.org/PerretB/Higra.svg?branch=master)](https://travis-ci.org/PerretB/Higra) [![Build status](https://ci.appveyor.com/api/projects/status/5op4qm2cddm7iuj2/branch/master?svg=true)](https://ci.appveyor.com/project/PerretB/higra/branch/master) [![codecov](https://codecov.io/gh/PerretB/Higra/branch/master/graph/badge.svg)](https://codecov.io/gh/PerretB/Higra) [![Documentation Status](https://readthedocs.org/projects/higra/badge/?version=latest)](https://higra.readthedocs.io/en/latest/?badge=latest)
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 custom 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
### Python
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
### C++ backend
The C++ backend is an header only library. No facilities for system wide installation is currently provided: just copy/past where you need it!
## Documentation
[https://higra.readthedocs.io/](https://higra.readthedocs.io/)
## Demonstration and tutorials
Check the dedicated repository [Higra-Notebooks](https://github.com/PerretB/Higra-Notebooks) for a collection of Jupyter Notebooks dedicated to Higra.
## Build
### With cmake
Requires:
cmake
Python + Numpy
Commands:
`bash git clone https://github.com/PerretB/Higra.git mkdir build cd build cmake ../Higra/ make `
Sometimes, cmake gets confused when several Python versions are installed on the system. You can specify which version to use with -DPYTHON_EXECUTABLE:FILEPATH=/PATH-TO-PYTHON/python, e.g.
` cmake -DPYTHON_EXECUTABLE:FILEPATH=/anaconda3/bin/python ../Higra/ `
The python package is build in the directory
` build/higra/ `
### With setup.py
The file setup.py is a thin wrapper around the cmake script to provide compatibility with python setuptools.
` pip install cmake python setup.py bdist_wheel cd dist pip install higra*.whl `
## 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.3.8-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86f8f2efc91904b0525481a6daade6cf069169a13cc5d133c9441724683b5161 |
|
MD5 | 6c5f768ad21df963564464d1e08cac12 |
|
BLAKE2b-256 | fd16b57df51d26daf1f85a052aa63213f34cda10f6e1e61e9f671ac933aa2cd9 |
Hashes for higra-0.3.8-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48100fb35b5898edff4ca5074b8914309b703508c89360570a3e1c540af1d561 |
|
MD5 | 3415c313028772234abaea1f04616320 |
|
BLAKE2b-256 | 19c70713ff214fc36a7ebe1dfdb854dc8a86a57550683ea702b92ed4bb0f3052 |
Hashes for higra-0.3.8-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d3b8e8404dba9b76fb75f096c03dc4332b727a2e99ad1ac72a0e3f1f73f897b |
|
MD5 | 4b5021ef525fa71abbc397431d7f1e3c |
|
BLAKE2b-256 | 31e296d443cde7ed2984c2ccda86abbd82ead0a2a7affc8436399a3f9e10b75f |
Hashes for higra-0.3.8-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec5a834136ad557248f565204779c8f90560c7c0c11e5d5effc451573611fccb |
|
MD5 | e714aa65117523e915cc8cb38ca26d70 |
|
BLAKE2b-256 | bd8cb20ae0d3a1b5c3d70a21bd311e7171c06e0bf4a074ee76ca4ac9b2235a2e |
Hashes for higra-0.3.8-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce3d56c0ac596dde5329aad3d203e37074aefebe6f6d0abb86da8466e29d24ab |
|
MD5 | 6b2f86cd2265f6f397c283f437f4b12c |
|
BLAKE2b-256 | 79e41cc2445faba71451a605749f021b7926719039150a100e1ff1da416e9ee2 |
Hashes for higra-0.3.8-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 192daf448082280871a753f457515dd99c5cbb6325156fe1b97aa8eefbcdab4b |
|
MD5 | 53c361cf84b67e42a48137a1fa3f99ca |
|
BLAKE2b-256 | 2db68f43f98071dd3c550e4b91bfc67090de9c6d8034beb7039b64e7aba1ed65 |
Hashes for higra-0.3.8-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82f163089c3d2260ea5831630d398301ac6a491df673a9c0d255a2c36fffb847 |
|
MD5 | 2952b1553e1931f56ce93a12e61dfd55 |
|
BLAKE2b-256 | 49a54adcdff4aa5a8a41b44bae82de00950014a0e26e17d2f6d1f1800e255f82 |
Hashes for higra-0.3.8-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 434c7f394af29555c5c793195019759469b33018bae81586e0a0c004a0d704dd |
|
MD5 | 2176f832150aa19a1ca1f38428e41a90 |
|
BLAKE2b-256 | 668075b3b82f9445d588c83450519c1c63ba7f462c3dffcd45cfc18ec48f38e9 |
Hashes for higra-0.3.8-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b18419d9df91e41f909185e9e0a340355820334268f1b4eeb846cd2b10f723d7 |
|
MD5 | 83672f213e8b2230966e06bfcaf161c0 |
|
BLAKE2b-256 | 3a475e94628edd18ffe7ec4ec66c1c1bcec8503d1da2be4c40269948dd2c2c9c |
Hashes for higra-0.3.8-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36690a24a9fc75f191a9cdfd1ccfe72147a5b951fca7ba7a2f1dcd3cddce2563 |
|
MD5 | d6c6c46d0fada0e51d31535d12d7e165 |
|
BLAKE2b-256 | 46d7c05f341db2df5517d52f964ec3a9a7f3f07632bbcdd77487bdafa079be9c |
Hashes for higra-0.3.8-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a505b8ee16aa950f63c9bb51467c30838878dc2950dbf7512c81f03cce4c6cd6 |
|
MD5 | 45186b167277d28d1ee6344040c1bc2a |
|
BLAKE2b-256 | d944f1124310178201ea8bb4453de8a79b02a1721e59767eee2d9a94f697946a |
Hashes for higra-0.3.8-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cc05ce94d7fa04ff817754871275ee41bfcc62c4b31bb8a2cedaac1d21ddca4 |
|
MD5 | 781bea0da465aa594f305f492acdf506 |
|
BLAKE2b-256 | 9fd6de19ea80f278145dc82525ee6a00db5fdd2b056e2d76d7a81c8378ca4890 |