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.7-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fcb55e0f473be5127bfb62b7e7d70c16369d9566a52c6c7efe858040330b8ea |
|
MD5 | 99fdd268b69cecbdf53134cd866741d9 |
|
BLAKE2b-256 | 2df79415b17ca682931bd078098a3c1e7ea9f195b06a968553056f212070e804 |
Hashes for higra-0.3.7-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3480aa76759b418a64235c0ca4758b84799667f1f2e7f1e57de0756bdce14b88 |
|
MD5 | 50b0c2202dbd15d295733c85351d7ad8 |
|
BLAKE2b-256 | 327be796ad2e2269f661c5b623373acf8886252435becef9a077d98251fb6feb |
Hashes for higra-0.3.7-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64033defb2d4c9ee025631fba90637dad1a887914309d42aba5221b1f535ba23 |
|
MD5 | 7e4a4727eb2476560746e669ab4fc13a |
|
BLAKE2b-256 | 0501ae19346c829565b7024ab865d08be480867bb3818c7a140eeed75e6c7fdf |
Hashes for higra-0.3.7-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f65ace70b20a3a66561e2f4265a4ddece1db3e4c28791c5aa6ed0927c09fe9f1 |
|
MD5 | fbefaff4708b8ce4bcd60deafdff5263 |
|
BLAKE2b-256 | 1ba476369656f00421140b69c38e19f1879c33652bf29f01a7f0742653931b67 |
Hashes for higra-0.3.7-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67b417939dc93347403691b88ad976e7f850bde8c8b450a550e205276636f5be |
|
MD5 | 3baabb075104487308d2ac8a3634a9be |
|
BLAKE2b-256 | 712d94b8dfa0332d3d68140b1f80260053f9a89d3f59282ce99fb4e22db6c302 |
Hashes for higra-0.3.7-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea57ac8f1164cc220efb1d6cd11617c281eb7be52761df9f19b9fe20220bd96d |
|
MD5 | 1941a7a0316492b4e5217e997e8d206e |
|
BLAKE2b-256 | 7d49c7180a555772c8706a3b2ce50ce8c4b2e0e1c170d74cc11503ad1dcbf34c |
Hashes for higra-0.3.7-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c15d3ee29004bcfc3191b4958fecc932dd708296f8b6a9a59ba799140a3785b |
|
MD5 | 47c1bc49145edb46f89927052ebb9043 |
|
BLAKE2b-256 | 61d270856fde1fdd15ee31a4c57ae84cebce8bcb0459e9d6ebdbc538fdd4a635 |
Hashes for higra-0.3.7-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7012362a2331ec76caee81291fba1947b87934c23cb4c46af4fdbd76a909ef53 |
|
MD5 | d6b053f2d8dda6e73454ab13a49a2c48 |
|
BLAKE2b-256 | b1cc88be2a1496a1e85ad27f57afc0c324a2cbb172501110e28f3d3bf9da1334 |
Hashes for higra-0.3.7-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4663e67fcd9f9965cae0e4ea58fb939b626e0f8cc01a7ad848c5ca11cd028ae2 |
|
MD5 | d57c23e185277d4bea187cee99744afc |
|
BLAKE2b-256 | 21e59b73d5fbb434b424588d10053ee564fab2d16045404dc2e2c26640d294e5 |
Hashes for higra-0.3.7-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23b5ab80fae0d8829b66038fa515ce06f04b069251a0c30d0a054c1132d51cb6 |
|
MD5 | ad09eb003ac802b603902bd33fc77a93 |
|
BLAKE2b-256 | 156d63efebfbf1a2aa47393d6ff243609eb4323f5fd6075f0a480482ef783747 |
Hashes for higra-0.3.7-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f6814b566b5638d82865108fbb56903001e01194ebee236803628534b0203d1 |
|
MD5 | e627cf0bb0f7f204e799fcd2ba34e2eb |
|
BLAKE2b-256 | bc4b0b6b7f1e7b7589a1b48622b725e3a67da3265771661aa946211386b6e38d |
Hashes for higra-0.3.7-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3cd29693c224d8ac6c5a995b065c37dbb953f3201b2b127933d9d88a0ed277d |
|
MD5 | 14f30ba5b4ae1135f46508d60dcd05a8 |
|
BLAKE2b-256 | 45cb647a51bbde10ba7dad5c52ea15071d07f1d7d04de7f956fafc20820e4707 |