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.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d25e347a9b41551bdd82a40f51146d7cfc6fba301e4d7f4a73e887aa756b0df9 |
|
MD5 | 1975dfe9b6e5c553e1a5880da3d58f3e |
|
BLAKE2b-256 | 8fd51f4bc4629e24cde65adc51b63a775f382cf621be5ce3798feb65ec4cec3e |
Hashes for higra-0.3.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3818e1e7a123bba6423625409ed5407e53e2c9419279c475ed5745cde935c151 |
|
MD5 | 830334697a9b0ea1df4be32e8429826a |
|
BLAKE2b-256 | 728a762d728c43ba1f4a288ccdd17463dbe145b9ff326882007befd2f8a1af99 |
Hashes for higra-0.3.2-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dad8f8863e332553d4a79d68744cace9318aac03a4d2d42ba5f4e73dec5464b |
|
MD5 | ebcbc4b36eed6840de21b1f37eaf97e4 |
|
BLAKE2b-256 | fcbd4db99a75eb1c2b5e78f4f0569cba265157f4c3104273a8b8708e1049762a |
Hashes for higra-0.3.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308688de1e0d85e2367ace47328e2ee716031bbaad9fa0642e370ba4147c3add |
|
MD5 | 8ddaa5fbafdaae72767490c677728282 |
|
BLAKE2b-256 | b5a40cb827a8fda32d000a989e7c55e473cf738817feb756f363d0a09752288f |
Hashes for higra-0.3.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0ba5e5bb6d296afe62c0227abaa19a2b1e615a1badb677c2c332b5967bb1f82 |
|
MD5 | a876055967787bc427265119dac7d42c |
|
BLAKE2b-256 | 560b829d8a224ff127c497ba54c7ef4ae0a1cb63ccb60f396dc0fc663a7e528f |
Hashes for higra-0.3.2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6512404a80dff8c6b486dd26a5a8692f13d3c5a784f3b1117d5e2f2e2945d70 |
|
MD5 | 1f53d392f2a1c56fadfa06b2403ce62b |
|
BLAKE2b-256 | 1f88b922428bb48999117977e3354852f0dd72edd645204af79737b54873335a |
Hashes for higra-0.3.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af9b2685d218d3744f26f761d5d9ccbbe5f32daf42a1736eb06dbb555962660a |
|
MD5 | 441752b2bd162994f0db1ed9824ebe17 |
|
BLAKE2b-256 | 781c92dd9a2fe55fb15294616508800232d6496141901c64f30cf72510c156ef |
Hashes for higra-0.3.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1a6b0c3066de3103e3bdf859338e281e463e42100dd1787779d6ec5789bf3a7 |
|
MD5 | ecf649ff9f2569d18c6482c3eadd33df |
|
BLAKE2b-256 | c04c47caa7aed9b027d6ca3693e4b44012667e5db1a685d9fa87485faf031b8f |
Hashes for higra-0.3.2-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f8e1df443d70bc0145469e5ba2eee754612d29d43cf5afca015d625ed159c67 |
|
MD5 | 236f9f7e551568836667267399b450b9 |
|
BLAKE2b-256 | d4ee771103747e19027e94e713b6019f8bd4c47aa637a6d69a7a378ad359615e |
Hashes for higra-0.3.2-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fda1bf5927ad112673c65dffe2ab5a49321df9f7fa830fc39def3f8beeddedc |
|
MD5 | 3da2a455a50e0e2ce8e2ce1770a9a6e1 |
|
BLAKE2b-256 | ac162b71edb3f2435b2b6de8d0919ce357dd7e9e4c671dfc9ce505ca6c09fa28 |
Hashes for higra-0.3.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eff93f6060c71663653b3cbc94e4ab60aaf0058578a1a6944a16a05b3e453eaa |
|
MD5 | 634235c2db506bddbe34521355379cab |
|
BLAKE2b-256 | 1edc7d89687cb5a713d118c7bfc080fea4fe46a26d402738a8b1026e6cceaed1 |
Hashes for higra-0.3.2-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6be761a66ba2d8763ca0b248a8c7d934772f590cd55d32efc5b14cba98fce5c5 |
|
MD5 | 2acfafaed3fed9b40318ada1ffb819a1 |
|
BLAKE2b-256 | 27d0f30108d512cef662b67957f61ae00962fc8a99070889c1e83640969b1418 |