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.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 858996a2e04b1ab16b2961c0bda17b4afb6a62cba776139763267244af1e7979 |
|
MD5 | 8e2dfa678432c83a5d43e7cde5e641ca |
|
BLAKE2b-256 | 7487f842c023431326576c449376737a3ea32202b56e9f24b4c04e5904b63821 |
Hashes for higra-0.3.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87ebf6e210c54c0329862ff9edc2b0f2a9d89d1d9081ee48c589e7da4ac3633e |
|
MD5 | 9941f10cd52472c9f1ca06b9b5a50fdb |
|
BLAKE2b-256 | 0d4b067abec51036bf83f9b61f26c478238b03eba50bc62fe67122d6379fb2c7 |
Hashes for higra-0.3.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4ca33f3a4dff041ea2163b2227c78bc5755ff02c96f80cf496a146bd79fedec |
|
MD5 | 38600b0db1657ca50a94e8f74555603c |
|
BLAKE2b-256 | f5d3f1a43e5052fcb46c9c2b7882cb1dd00252a5dd1ce694d6d4bd70a5185ac2 |
Hashes for higra-0.3.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b812e4f97537f60f72404f69a096b3482a0cb01d0c4dc330049891ad86afba0f |
|
MD5 | b499b02b8602e8b8ebd1c35e73ae46c9 |
|
BLAKE2b-256 | c57f2438be0ceb17a8348311e6565be35335a655667b33089edf230b2984d6b7 |
Hashes for higra-0.3.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f38f54ed16f8e39c33d6847b4bf3c8bb2351ce4d310f5b4a23e6de2aec12dcf |
|
MD5 | 4c58061e23d9bc80bed47f36cdaec57c |
|
BLAKE2b-256 | 5a59f4d94b7e64a568bbe81882690f2bb70542f4305e2ddda8f7336f36781f22 |
Hashes for higra-0.3.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c76ace6b6a25005805d0af2999ddbca15310b96995a36c3c1469a963d94539b |
|
MD5 | 24f526de229f78d78c9019b16f37c67e |
|
BLAKE2b-256 | b158a037f92cae8c26b19bf749e0a057f44a348426f70b7ce9997b21987fe1ba |
Hashes for higra-0.3.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9025662eb1e9c8fa397a97494655ee003da0c868554dd68553bdc17941d95c0 |
|
MD5 | 20dd72e1323b06d861d995f2c6264c21 |
|
BLAKE2b-256 | a0b2680ca7076700d2965b2aee820534b3b4e5539dea09d237bd88c2ba016327 |
Hashes for higra-0.3.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb43e3a80b67d51c00065c2f3dc306cdf530b472d77d6556163e421e18efeef1 |
|
MD5 | 986341fb456006356a0679a7f86ffcc7 |
|
BLAKE2b-256 | 2075f184f46be9449a50616c4d2fb82eeadb876b3a1155c5ebd171a9ebd38925 |
Hashes for higra-0.3.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03df078e73d0a7bf052c0bdce9282c3ff7a346b92db1cd72a37066575ad1a29e |
|
MD5 | f992aec558a8b24883be96144d9cd300 |
|
BLAKE2b-256 | d3ca829970c50c6f174ed2e321e4df8f1a575c280ffcc5181939c3f1c456315b |
Hashes for higra-0.3.1-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b4f92bcb5294e698bccf478fc0446d5b3baf3953725f5ed9c488e7eed2524d8 |
|
MD5 | 4a46f95171b4a87cf487a9506d51f9a3 |
|
BLAKE2b-256 | d98569a627741482f141a59b0db380cdafa419afe72dfb596dd62d255597c177 |
Hashes for higra-0.3.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec5980e93bf4fddfecc79fc812a22a5f85a5c93a13ff83215cffaffd441c6b94 |
|
MD5 | f77169b43ecbb19fb7c7307c785f6923 |
|
BLAKE2b-256 | a7562f2a5cedd1b52c1bb50bde8a15cd0cd37c1a2e661ff24b42b990383680ef |
Hashes for higra-0.3.1-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cfcd912835e279556ea4ef2426b6f845c67210f16590edc833d5fdc37cf3463 |
|
MD5 | adf1cdfc1d9ceebd7b468c1ff48f3eb0 |
|
BLAKE2b-256 | fedae5f38d459d546b39764a8ad5bb51b86a78764b2d7c9516405d01b5d1775c |