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.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc2b1614ac94e65706316ad59f9cc9b46aeabaffd44fa5d703f6f4ef4754c7b2 |
|
MD5 | 0594b14cd07f7d5987c21d771bd102b1 |
|
BLAKE2b-256 | b7601d4cd9180793eb8720fde75f11523742eb975cf29eea50c0616ea82ebb97 |
Hashes for higra-0.4.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33348d3123771e41070bd08ca9852830546562b4ca76abe1677cf3b5439032e2 |
|
MD5 | bacb4d623c74dee02fbaab860f0ffdc7 |
|
BLAKE2b-256 | 41715c0e1318cdf376ad0748d04ffdff09cf1c5342769fd6dbeb03ac81fd090a |
Hashes for higra-0.4.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8efa206b4b5f540e56591f13b470958da87b2f2e71403e24c55dd4748424e83c |
|
MD5 | 70c4ed37442ea241d535e7952086fc0b |
|
BLAKE2b-256 | a299ee7eca3cc03dc799e7f9b47b378b9be24f3cc6442aad3a97e3517cf0c0ee |
Hashes for higra-0.4.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83ffadc774680f4fbefe4f582fb740f77114e4a850b52e7826904ac6378c15f7 |
|
MD5 | c2b08c5b10645c4fadc5e2566f54d909 |
|
BLAKE2b-256 | 13ebf511745c820a8b0aaeccb19744a83cc932ea40aa1f8ff023382703e68f58 |
Hashes for higra-0.4.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d5013e5c8800b5663c7fca5b6021832702fce878ad773c04c79dea102ffa413 |
|
MD5 | 58e7debd81d59d911fb85476f2b829e2 |
|
BLAKE2b-256 | b39bc8b5c52f14e375dc35ddda545a21d41952f55f464378a0d77c7e6921c608 |
Hashes for higra-0.4.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a544618a68657dfc9226754f1000eb6dfdcdb2ed1355e2b132b3f418fd0cf52 |
|
MD5 | ffe1206eadbdf0e2686f6de830a0c7b4 |
|
BLAKE2b-256 | 5c560bcf14f7f04e11546686f6c363251ce14e97d763e53d70e931ec26c31d60 |
Hashes for higra-0.4.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13a08d35dc8f535457ed0cd993aa83c25857b57f39ae061d0f5e0e21a8399453 |
|
MD5 | e48b6531d1e1c835e8fbba7abcc9fabf |
|
BLAKE2b-256 | d55bb7d3887dbb2810ff636f572470eeccc2ceb62057127b1de5ab26c4fc1ff2 |
Hashes for higra-0.4.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 794deaf9a7cd5d75d7b31d45af3322bd6993fddd432ac01472bac09d1651b3ce |
|
MD5 | b929c6464653775384e0b568744cb151 |
|
BLAKE2b-256 | a525494b386f0194f8147f75102e45a7827d43a8577358d40cade244b971528f |
Hashes for higra-0.4.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9d881f9eb6d9021a7d16e4b7e36c6eb6f8a758f3655705bdc9a44e8b2f9dabe |
|
MD5 | 22316fe5a18e617f5c6d60d4fa4bb327 |
|
BLAKE2b-256 | 919a9a30d047dbd13b86e3cbe7fd1e0f9eb64577e6b9e0fdbd1ec0a0211e6056 |
Hashes for higra-0.4.0-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78bb50d8c02659764a6c44d8a707f10edfee7074725ac11501a0876a81256e3f |
|
MD5 | aacf01e4b99bbf1b8d50976a44f71690 |
|
BLAKE2b-256 | 0e6772ee527644cb395e2ce412a4ec7f4c73d9e41bb59cf87e23c522a1f4adfd |
Hashes for higra-0.4.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 670415014969828c482b3689e6624503bb307bf7972c10942575fd5578e7b52e |
|
MD5 | 8b7e4e91ddbdd163f342c654d7a70294 |
|
BLAKE2b-256 | bcd81d51a40a567faba2279b7d6b74cdd7484d2509e1a1b7bf2052003402ca0c |
Hashes for higra-0.4.0-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 299661e92acc258a1880144f9c2acc9dd6d335e4a5b9432a1700aae4d6121166 |
|
MD5 | 2254780a2a90bd27cdc5f18f7d904533 |
|
BLAKE2b-256 | e320d20281a824f0752e9d72704e98668b9c0f25936e46527b006d924729f1bf |