Skip to main content

A Lean Persistent Homology Library for Python

Project description

PyPI version Build Status Build status codecov License: MIT

Ripser.py

Ripser.py is a lean persistent homology package for Python. Building on the blazing fast C++ Ripser package as the core computational engine, Ripser.py provides an intuitive interface for

  • computing persistence cohomology of sparse and dense data sets,
  • visualizing persistence diagrams,
  • computing lowerstar filtrations on images, and
  • computing representative cochains.

Additionally, through extensive testing and continuous integration, Ripser.py is easy to install on Mac, Linux, and Windows platforms.

To aid your use of the package, we've put together a large set of notebooks that demonstrate many of the features available. Complete documentation about the package can be found at ripser.scikit-tda.org.

If you're looking for the original C++ library, you can find it at Ripser/ripser.

Setup

Ripser.py is available on all major platforms. All that is required is that you install the standard Python numerical computing libraries and Cython.

Dependencies:

  • Cython
  • numpy
  • scipy
  • matplotlib
  • scikit-learn

Cython should be the only library required before installation. To install, type the following commands into your environment:

pip install cython
pip install ripser

If you are having trouble installing, please let us know!

Usage

The interface is as simple as can be:

import numpy as np
from ripser import ripser, plot_dgms

data = np.random.random((100,2))
diagrams = ripser(data)['dgms']
plot_dgms(diagrams)

We also supply a Scikit-learn transformer style object if you would prefer to use that:

import numpy as np
from ripser import Rips

rips = Rips()
data = np.random.random((100,2))
diagrams = rips.fit_transform(data)
rips.plot(diagrams)
Ripser.py output persistence diagram

License

Ripser.py is available under an MIT license! The core C++ code is derived from Ripser, which is also available under an MIT license and copyright to Ulrich Baeur. The modifications, Python code, and documentation is copyright to Christopher Tralie and Nathaniel Saul.

Contributions

We welcome all kinds of contributions! Please get in touch if you would like to help out. Everything from code to notebooks to examples and documentation are all equally valuable so please don't feel you can't contribute. To contribute please fork the project make your changes and submit a pull request. We will do our best to work through any issues with you and get your code merged into the main branch.

If you found a bug, have questions, or are just having trouble with the library, please open an issue in our issue tracker and we'll try to help resolve the concern.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
ripser-0.3.0-cp35-cp35m-win32.whl (61.9 kB) Copy SHA256 hash SHA256 Wheel cp35
ripser-0.3.0-cp35-cp35m-win_amd64.whl (57.0 kB) Copy SHA256 hash SHA256 Wheel cp35
ripser-0.3.0-cp36-cp36m-macosx_10_12_x86_64.whl (63.9 kB) Copy SHA256 hash SHA256 Wheel cp36
ripser-0.3.0-cp36-cp36m-win32.whl (62.0 kB) Copy SHA256 hash SHA256 Wheel cp36
ripser-0.3.0-cp36-cp36m-win_amd64.whl (57.0 kB) Copy SHA256 hash SHA256 Wheel cp36
ripser-0.3.0-py3.5-win32.egg (70.5 kB) Copy SHA256 hash SHA256 Egg 3.5
ripser-0.3.0-py3.5-win-amd64.egg (65.6 kB) Copy SHA256 hash SHA256 Egg 3.5
ripser-0.3.0-py3.6-win32.egg (70.4 kB) Copy SHA256 hash SHA256 Egg 3.6
ripser-0.3.0-py3.6-win-amd64.egg (65.4 kB) Copy SHA256 hash SHA256 Egg 3.6
ripser-0.3.0.tar.gz (71.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page