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.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1130c3435d4c11a6a20b1cb5521d0987c75277ff0552e1de10666280afdff2d8 |
|
MD5 | 6134e17f1c276d1c1b6bb3a27aded1fe |
|
BLAKE2b-256 | d9b76027939c9cda439ba4ddf4896baf06207b64d7fe15771f0ded175d102e1c |
Hashes for higra-0.3.5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3efe856335effa41305fa2d576249ec2561bf5a771cd24d5dc6db3887dcb2cd |
|
MD5 | 0561035dee0ed79ddf9b9636046b362c |
|
BLAKE2b-256 | e70105550a4f42f510e66459f420b57318a209fe3bdca4e388a3e0ece8a9ca92 |
Hashes for higra-0.3.5-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91fc3b78fa81851a04505a26f400191af2948bba63002bed8347b28a1e7a8523 |
|
MD5 | c403991c0ae4bd17a3d2820893152081 |
|
BLAKE2b-256 | 75a1593961ed01031cdce42b6407f924ed5ca1ce96038e648cd1fe48bd7d71f0 |
Hashes for higra-0.3.5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48eb7cd76d1252cb64bf30a99ecf47439d67ca141c950d8f694cf8f8a9204638 |
|
MD5 | 1cc1ddc42c3633606cd9e2de73b7dd1c |
|
BLAKE2b-256 | bc2ce4be49c0f7b2d272c41fffaa3ea1f47c0e7cbfae97df0fd7127fa996600c |
Hashes for higra-0.3.5-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2149b2acda12d9d2c4501fc7b32bd235a4883e1fb99713a89c6ee8b62e260162 |
|
MD5 | 2acb112c1be2c2c3ca900cd051ee1de0 |
|
BLAKE2b-256 | 381ae9938cdc97c5bc561a6ffc5328e96a00612ab90575dc01db6c3a7a451cd8 |
Hashes for higra-0.3.5-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f65f5972877442bc08dac4404f0f0e44e4bbb5c1ed9efe5739b4fd72d9cc9c59 |
|
MD5 | 1e55c474414f3c674b41a111d0f857be |
|
BLAKE2b-256 | b6a71d52b0d3f9b1adb715d69ee6b89a30333c5fbd038d18364dd61edac0c526 |
Hashes for higra-0.3.5-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 072602b9f87caddcbf60e65ae7ebc4b3596afbb2146c7a9e4b5a6914ce51c239 |
|
MD5 | d6fc7032ec3d9ffa106546ae80f63370 |
|
BLAKE2b-256 | 5df5fa9fd4f6a55b718b01e2817ea231c418b8a06b08a12146676550da0e94e7 |
Hashes for higra-0.3.5-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df15722caaa4d5606aad5eabc1b3ac0253fedf81e490cf50dd4c973680abe12f |
|
MD5 | cc95ecb0a267609b6800307e26aba62c |
|
BLAKE2b-256 | 3fdc6ded5adb5d1299bd6cff08f1e9045c9917b3fdcd8a95a3eeb56416def79d |
Hashes for higra-0.3.5-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3b6f3dce0038ce467c4f276dcd990224c53da19fa101ba87187a7b43ddcaa90 |
|
MD5 | 7e4af1a0ccba6e8e801aef4f5b3d266c |
|
BLAKE2b-256 | cd46a90e53011ea774c28eac4df17f54a597cda0aa51d08b9173ba3310a47f2b |
Hashes for higra-0.3.5-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84325552b4a3aaa089d329a2c776d13d5b43c525d4f5c9304333b7f309068562 |
|
MD5 | 07902304d2e1d45b9209fea266150903 |
|
BLAKE2b-256 | 795bac9a7a7917376b22a3d54771826d3436ab633a310d2affedb0820f693573 |
Hashes for higra-0.3.5-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70e227e8117d2fb869c765ff143e52210abb189cc0569b3eab5bb6ea3e5cee7e |
|
MD5 | 34c214d1877e671a757a45e02fb80ddc |
|
BLAKE2b-256 | 442d4be2ad335be0fd6492af661f207b4d03d543f86cfd765879f09db437daa2 |
Hashes for higra-0.3.5-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d198e98adf1b8ec5be9ddb7c43a183753f7dc96d3284ac778123564a559f1c |
|
MD5 | 99e2cfc5660b2608dafaf5dcbc09e153 |
|
BLAKE2b-256 | 5bdcf772c0f1f3ac68164f9ed0defa55fe0ac14463872da302a51d439b254b44 |