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 representation of hierarchical clustering: dendrograms (trees) and ultra-metric distances (saliency maps);
hierarchical clustering algorithms: agglomerative clustering (single-linkage, average-linkage, complete-linkage, Ward, or custom rule), quasi-flat zones hierarchy, hierarchical watersheds;
component trees: min and max trees;
various algorithms to manipulate and explore hierarchical clustering: accumulators, filtering/simplification, cluster extraction, partitioning, horizontal and non-horizontal cuts, alignment;
optimization on hierarchies: optimal cuts, energy hierarchies;
algorithms on graphs: accumulators, computation of dissimilarities, partitioning;
assessment: supervised assessment of graph clustering and hierarchical clustering;
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 frontend
The Python frontend 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!
## 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
Google Benchmark (optional for benchmarking of the C++ backend)
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 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++ method 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.4-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c0e42755d94460feeae06ac6f577c12eae3edb0b6aa8dc1d4a3ae6a939b3172 |
|
MD5 | 873dfb2a2351f9f627de61f0b96f44d5 |
|
BLAKE2b-256 | 633884c63acf3194dc9e71292da0efe8fcab4f8f51b279048b35140896bf1ba7 |
Hashes for higra-0.3.4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09bd8c76c7de7489da8c5da63b9d790a0a17c97aeb84c95f7999acb5ad41d29e |
|
MD5 | 235c2ebb34ab13141f67b50845842f03 |
|
BLAKE2b-256 | 2208d01acb157580f3b3d3b726570c4048ee8dfd124baa720c83a84afac96c65 |
Hashes for higra-0.3.4-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acc7cab0ea977e916b9fc731878964dae76294e6512aa81769582ca08c5cd051 |
|
MD5 | 26d5398b17b13d0299eea3b1872b8d60 |
|
BLAKE2b-256 | 7db0b0fb7774df13b84e438fb6637dac1631e31f64a3c15c9d87e96499edf4a7 |
Hashes for higra-0.3.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e3c760b2eace47e03e87519cf71d27700d011742682df296c16cb7022a90987 |
|
MD5 | aa8209334b2a9e4f3561303334ef7c6e |
|
BLAKE2b-256 | 8af4111db9d1c1202ba0c25179fa1f4bc140a83a0d645ae05fca8a6f68f06b9b |
Hashes for higra-0.3.4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33a2715278c6b984df42a755c356cfbf87268a5dc37e6f839dd538f9cab18ccc |
|
MD5 | dc7e330b0dfac687103d4a3e49405653 |
|
BLAKE2b-256 | 438ae3237a9e9d0428e64e75deb323ff571f4bbd682767f8705fbab4dfa86ab0 |
Hashes for higra-0.3.4-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f4cd1f8fe876930f49f0b37ef14937b6db318cd2af7b3886f59fd9a512cc9d4 |
|
MD5 | bd2006163fc9a4023520dbdb5a7a3f9e |
|
BLAKE2b-256 | 9fc45113d1696b86759e21d55628eaaf2f8b4c00408f7cd0e107ca6a338ee674 |
Hashes for higra-0.3.4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6567ade95d47456b39d0c3058d81c7d09eb59fddaf92eb602f90ebabbbe84ff9 |
|
MD5 | f90f1c7f817ef2186b34a121e42acbef |
|
BLAKE2b-256 | bb0249b8a375221235e304ac25b60448a1ec68b17a9c05cd5a2aedf26ddd68a3 |
Hashes for higra-0.3.4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83feca3f73019818a60d30030f0f42495d70a9ddcb9d1f617210a230e11b287c |
|
MD5 | 3727a79407f4bbf92530298645323dbe |
|
BLAKE2b-256 | de415098ba97c2704ffdeeadf21259eb2ae4107a9e0672f660baa08a23ca7ec6 |
Hashes for higra-0.3.4-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d106137cf763956ccb1d32791f4035cf6e231c286827895431ac6e81a0faf14 |
|
MD5 | 45953023d9364d64f697181bbaffb640 |
|
BLAKE2b-256 | faa1d93b7ff5cdc098d70d1ad9970474b6d0baa79e5e5e3f49157df95041b6e6 |
Hashes for higra-0.3.4-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d984c7acec49a5b76834cbc39c68a1a2e609a165eeabc2fa71faaa1ba2b93c8a |
|
MD5 | 8a8619d0bb0abeed47faffd3cb91a091 |
|
BLAKE2b-256 | 4fdcb39cae373c603cc8b17f109ecc36d2c4af11e55937be34921691ef09b4f8 |
Hashes for higra-0.3.4-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fc5ae200172fa6c993396d74e421c5d2a3f20ba65dc66f23bd83014cb8b1dcc |
|
MD5 | b294ed1c73845ea8ee1437fcd7f8beb0 |
|
BLAKE2b-256 | 4daabff3fc60dae0e1733d5f6240167af4ce4e48283eef766db283496897fd73 |
Hashes for higra-0.3.4-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a185a929a36568b5cab5e09e7ac50637b8a43a60f6e9f0a26ed612e0aa7e9d74 |
|
MD5 | beee4a12c7b3b62169e8bc9c3b3b8e9e |
|
BLAKE2b-256 | 287e7172591c43231262f9b2264e6125412825b6c8474ab0a237dd78ba8f6ace |