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.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fe3fc7714e5a43832d6647929d8fd6b55abfc058d1c741c613c403e396e4a97 |
|
MD5 | bd26f2a5e2bfc61d4eed4c9179e8fcbc |
|
BLAKE2b-256 | 1053ffb6984c55c8ba80d68b9540be0c32aca825340a9e42466f1162edacb083 |
Hashes for higra-0.3.3-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b55f4bd3a4965e4d4d332acdb550fa23a8f4c6290f93088017005cff27666d15 |
|
MD5 | e118e2cb803c2fb20b4ec9097bf8b412 |
|
BLAKE2b-256 | 531ca5f116ed28d184fe947ec1d1f2fc56dacd0a614dea482cbb496f54a6ca00 |
Hashes for higra-0.3.3-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fc08899e83169e7cae346b86d66f765632dc0a4701de04ab7443cb10cecaf7c |
|
MD5 | c8b1343c43f11f5593ad2bbe9fda13dc |
|
BLAKE2b-256 | 9e400ee5e417b864625fce0c28ad59b038bf8e46d08e990e27c1f806f108c064 |
Hashes for higra-0.3.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fec41c49c261ea51fdf6fa3c9c421525d3dd4225ad0d00ef24226edec5ec4bca |
|
MD5 | 1a7c86cd1544046f402da92e5d85d087 |
|
BLAKE2b-256 | cc31fa5fade787b726f2596d5450629e54f891ad9ac04c918047c5ba121216b8 |
Hashes for higra-0.3.3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33b41d78e02fba0569a285cda107a78d67270b3b666a7424e47657992194fefb |
|
MD5 | 604445be749d131ef6d0969885a6a8a4 |
|
BLAKE2b-256 | dc84a28a3fe5283d2741e8c77607e07f6f6baf571b44c840e81fc0c3679b415c |
Hashes for higra-0.3.3-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dba14c780f6790732e8402410686cf5d0e6e4ab54ae5533ab6da92b2a048725 |
|
MD5 | 98fd56fb2a462ce887c28dbb9fe8fe40 |
|
BLAKE2b-256 | f668d81ed350e9c2d62d4a85571fbde37d233a8535832a01dd7c8103d2ab9537 |
Hashes for higra-0.3.3-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f96d49f151941841d01059f75558b1a9215a93201bfa0c531a97a65df50a484 |
|
MD5 | bf75023eba2261bbab8aa95bd6027539 |
|
BLAKE2b-256 | 8814a252768ff54a1e8c3423226e4e583c0855778b8afb56f40265eb5113c494 |
Hashes for higra-0.3.3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc7bccc7c3c3d835d9b1415797abdc791d0f7b4fc69c2be23e238c1d4a915d57 |
|
MD5 | a6ec080a909e3ef299e5846f96826781 |
|
BLAKE2b-256 | c71541aa6407c1d1fba1db10ff1a061623bb0bfcab1fd80e1ca399ec63a09149 |
Hashes for higra-0.3.3-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 049b195ffc2cdf61d3d7a12f40955be7dfff08c6d6735661b3198589645d2e2d |
|
MD5 | 117dee484eb711709542519a07dfd878 |
|
BLAKE2b-256 | 034c97a0a6113483acccd8c6dccb504240ac2bae340ba3c2e1e518cb11157e8d |
Hashes for higra-0.3.3-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa2b4d4a1a2717ade012029533a04eeb68394692f6b7639c6f5a4bf90462bd4 |
|
MD5 | bde9013f9856d455e970a79ccd00a483 |
|
BLAKE2b-256 | ac05d235874c4db8e099d61d5e826192907286470641bc28b0d696e5915a813d |
Hashes for higra-0.3.3-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a3d93668176442ce8ab6b514ddd0b65689635516c0ae906bbd29ab72fb1c7d1 |
|
MD5 | 23aced31a43c3d54c49116b2bc26a62c |
|
BLAKE2b-256 | 7554ee7262c63a2001270e0d8ab8f4349eee2c8933796027e5454a2ddc977642 |
Hashes for higra-0.3.3-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b3c1bbdd117f1a48cf56e7d1fe4d21299adb7e3fc4f48c27505991a9d7ec6d3 |
|
MD5 | dba7861de3d0bdc67de89df2a408824d |
|
BLAKE2b-256 | 4787ee1d3518bd0306f8fc23b0e9fa2d85bd0850c3f3f1700ee715959bbd2351 |