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.6-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dade85f472adef67f9bfdff4028977d8a6e030520618b2c907d9c85400eb598 |
|
MD5 | 5addfe731ecc7cf7f5b3ba45a157d52d |
|
BLAKE2b-256 | bde9c08e8bccf1d54b6d95e619c7b396bf88c4edb055da5188e9c4630513998b |
Hashes for higra-0.3.6-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 987e5fcf016fab26778e721fa8952550e87b7bcacdcd532fd3d6f055f9ca5caa |
|
MD5 | f0133042a3e4af27af5098b1ccda97ef |
|
BLAKE2b-256 | e07388b593ea7221805a72d5231ff7a0c3362516bbd6b868623a0d9d7d2ae97e |
Hashes for higra-0.3.6-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 756a2a3c069be572ace37860ca2138f9b4c48c5344357f93f37f31232b2dc9f0 |
|
MD5 | 627481ee043de0465e7e546900697490 |
|
BLAKE2b-256 | 4ef5ea525fe9dfcd1d2525c80e8d0eb12d60c0e91cc48b1c12983a7b6dad55be |
Hashes for higra-0.3.6-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bddb184aee1df64bcacafae853c8a51687de6e2ab12c734437deb1914efdc17 |
|
MD5 | 500b510c4dd98f499211929c4bdbd419 |
|
BLAKE2b-256 | 5b0dfce000cedda8546ec7e3052628cf27f4ee483f48c00e2383bca199d12ecb |
Hashes for higra-0.3.6-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1464166ec0e69129c301561dbde30012f9fb4335e3175ebdfa011f8142509ca3 |
|
MD5 | e5ce96ce1f0cdc873894ad481ddb560d |
|
BLAKE2b-256 | d22183d56d802a0695c91371663387431f83ea0c021ba998e66b4486c846c5b9 |
Hashes for higra-0.3.6-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6cb07fddfe23331a92e6be18fb39a2dcb28efa03d69459b9540a1500a0c3ed5 |
|
MD5 | 75f59077541cd72d2a0386a0075a5f1b |
|
BLAKE2b-256 | 985de06bf2bb27080321b88e65b4e4b9b4a103a8dceb36f983c35fcd553ad018 |
Hashes for higra-0.3.6-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd355cd7f53f157535e45752c7de2fb69975a1b1e3b213dc47518080840604c4 |
|
MD5 | b4fccfeb3b370987a6a9f8c469f78285 |
|
BLAKE2b-256 | 05cd1cc97c7548422297ebec34d4a609969043ad91a903a44da156dd93f8a61e |
Hashes for higra-0.3.6-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3db07d09369521022618d4be637e03bf611e57cb40b57d2b5a81d56709b364d3 |
|
MD5 | 7ea67bddd719f2dcd2c76b74e2dfb739 |
|
BLAKE2b-256 | 2c1ea9e3ae03e421f9ac5ee8197c74fe43960b9afdf4d63fdaef39bdb67ad1ee |
Hashes for higra-0.3.6-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76878791f53d35e6447915fbf985c548b90ee3ead166aa7b8c1bc74057356de0 |
|
MD5 | 6c69aeb173beb5a0c28dc17ae177874e |
|
BLAKE2b-256 | c8ca54238848c5401541b60712845117bfd238f59171b328d7f71e78a64fefdf |
Hashes for higra-0.3.6-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb13a12430c55e3fabe880aef067c3b6dd6f7609f4827349969b92b4d09c158 |
|
MD5 | 069d00b615dfb885a851022b1f27be4a |
|
BLAKE2b-256 | c8131a61327787396a49c27a58fbcf79b5c69b4e2476a41074d68848eae0ce33 |
Hashes for higra-0.3.6-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69a5ff50707c4490544dd365a50ade16c9778cb364557fb6aab1ce47ed6a37c5 |
|
MD5 | 7bbae2d07cee46cdbb8b6515fe3ff22a |
|
BLAKE2b-256 | f0ccaaf31db9ecda81bb5f15cf33e8f2e87038287147c7d17c77213296382610 |
Hashes for higra-0.3.6-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56ba54fc242cb39c07f1402eace461dd56015b07a94a162abf93f5787765bd85 |
|
MD5 | 314675e5000ac4d5173e15f6ac184e68 |
|
BLAKE2b-256 | 0aa6fc093bb6acd503803a43cd8a4793d911f1bb608f57c419bec8f9eca2cb21 |