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/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/higra/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/higra/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 `
## Developing 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.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44b53a139e0f320ffd24c67f4fc397ece12066d22094920260ad74e2979f68e1 |
|
MD5 | a4ac795030f9514b7d326cc64f0db1a1 |
|
BLAKE2b-256 | f49934a59539326d0d3845910f0a0030c4437f7f68f929e624650b338a9aa4c4 |
Hashes for higra-0.4.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45e5960ae0c9bdfdd419ec21e5a2dd9c25873e82de13cc4612f623ac4f2294b1 |
|
MD5 | 3ff55c67af913dbbbfd8fbad96bb5a9a |
|
BLAKE2b-256 | 7fcd9d0fbdcc265044a008d22be83955d1aabde5ea44d250c973fdcb95332118 |
Hashes for higra-0.4.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85d8339c49b8b230d27c7d650a7ae5605e7c5a2c8496a8bb96b985e8d9681569 |
|
MD5 | 5257e9bedbfe6d27bd720124a5e9ba4b |
|
BLAKE2b-256 | 7cbf9a0e8153dfc3cc666054843bac2fe05ff60d7bbda722deb628ad6dde92ee |
Hashes for higra-0.4.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003e32738a364fb30c693bdb4ca24710a91a74e841f0b924215955f0227feb10 |
|
MD5 | c011231821239bba5676508016f1555d |
|
BLAKE2b-256 | 559c74ad204fea4c45af7dd42b11b2b95f8248fc72a2a2af96e2a7fafcab7aa5 |
Hashes for higra-0.4.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b60bbba32abbb4e2b44f442d3e06e8cdb7ec95fc5c73d4428aa8ab99b84d117 |
|
MD5 | 1c9b53c46b6b0e717e49efcfc6d8b7a2 |
|
BLAKE2b-256 | a8ef78e1f8cffe2f3b3a7ca622bc208a6f6893d773fbaf78b6988d66c58002db |
Hashes for higra-0.4.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b36192a96a1ce12fff6baea32dbcaa463536a2b8df5011abcc8dddf40d2bad7 |
|
MD5 | 966560133fc15ddb8c58729abbabd17c |
|
BLAKE2b-256 | 8d3e926a4c488ee79f040daa47652de0ac06f88f5874707fb6b293b04a17abcc |
Hashes for higra-0.4.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9219a2d4714486d95bd869970e2da96422371db316cc5bdf0f1f5664d05c0853 |
|
MD5 | 1a4cbed4b0df74fce100de857ac6615f |
|
BLAKE2b-256 | b556e41e2a7052b4d9fd837d7bd1b51d1ad77cca25a78a5091c3310d51c892ce |
Hashes for higra-0.4.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a16852dbd44af9927d32427a9d392501b549aa6a3d013e510bc9a9be534d9f |
|
MD5 | e3c7c0f67b8e28e38bec8954e7bc6849 |
|
BLAKE2b-256 | ed06f28ab6a0ed0080594f8be2de0576e30edb3429fc53a87eb763f5dfecd409 |
Hashes for higra-0.4.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac8dd743e114d53375773ba114ed182a389e5861cffd1d1e071ace080fbf2f4 |
|
MD5 | 8471f3db7e06b176ef30932affac4cac |
|
BLAKE2b-256 | 1fbc3793b436f838f200a1de7ea140e1361d1ac6340213a4e06386e6d75dc420 |
Hashes for higra-0.4.1-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc6a5fd362857c34e3ddb1913ce281dd026be953c9eb70972b5cc53fdab7ee9c |
|
MD5 | 985b850fea3564c93750dd23a7881c19 |
|
BLAKE2b-256 | a3b832f418a19524129f9d1b67bd35a9fab3b95f52f8b71680bce55f51d726b8 |
Hashes for higra-0.4.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a98d5cc5c0d627f88729a63ce56ce3b53fb9bb47dd6b89179b43efac271aa6b |
|
MD5 | 0d0e45369c2ef0235ed87397bc96e77d |
|
BLAKE2b-256 | 06d8e7c87435bc6632059ee2b5517bafc1886b54ed946a54b81f3deb8f9bf6e9 |
Hashes for higra-0.4.1-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 396fab8a487145bfb0caeb6300e47b8e08c3a95498b521c639e4127b1647d089 |
|
MD5 | a4248b9de9b1c759b175b408893b2f8c |
|
BLAKE2b-256 | fc791b8be43bf29f8496a3dd87f035c67f87036e8ee9ad8bccc801ab897aa18a |