Ripser.py

Ripser.py: A Lean Persistent Homology Library for Python - Published in JOSS (2018)

https://github.com/scikit-tda/ripser.py

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 17 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    3 of 23 committers (13.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

data-science homology persistent-homology ripser tda topological-data-analysis topology

Keywords from Contributors

dimensionality-reduction meshes gravitational-lenses blackhole physics polygons mapper-algorithm pypi annotations kepler-mapper

Scientific Fields

Artificial Intelligence and Machine Learning Computer Science - 36% confidence
Last synced: 4 months ago · JSON representation

Repository

A Lean Persistent Homology Library for Python

Basic Info
Statistics
  • Stars: 306
  • Watchers: 16
  • Forks: 62
  • Open Issues: 20
  • Releases: 20
Topics
data-science homology persistent-homology ripser tda topological-data-analysis topology
Created over 8 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog License

README.md

DOI PyPI version Downloads Conda Version Conda Downloads

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.

Related Projects

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

If you're looking for a GPU-accelerated version of Ripser, you can find it at Ripser++

Setup

Ripser.py is available on pypi with wheels for all major platforms. To install, type the following command into your environment:

bash pip install ripser

Local build

If the above command fails or if you want to develop and contribute to ripser.py, you can build ripser.py locally. To do so, clone this repository. From within the cloned repository, execute pip install . to build locally, or pip install -e . for a local, editable build. Either of the above two commands will install all required dependencies. Explicitly, the dependencies of ripser.py are

  • Cython,
  • numpy,
  • scipy,
  • scikit-learn,
  • persim,

and their required dependencies.

Windows users: If you are using a Windows machine, you may also need to install MinGW on your system.

Mac users: Updating your Xcode and Xcode command line tools will probably fix any issues you have with installation.

Optional dependency

Ripser.py when compiled from source can have a steroid1 shot by replacing the standard unordered_map from the STL by one of the fastest implementation available: robin_hood. Benchmarking of Ripser.py using the robin_hood implementation showed speed-ups up to 30%.

To be able to use robin_hood instead of STL, you only need to clone the repository containing the implementation:

```

Run this command at the root of the project

git clone https://github.com/martinus/robin-hood-hashing robinhood ```

After cloning robinhood with the above command, install ripser.py with

pip install -v .

This will install a local version of ripser.py with verbose output. In the verbose output, you will see confirmation that robinhood was found or not.

1 The Python package is already compiled with robin_hood by default.

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 from persim import plot_diagrams

data = np.random.random((100,2)) diagrams = ripser(data)['dgms'] plot_diagrams(diagrams, show=True) ```

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

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.

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 Bauer. The modifications, Python code, and documentation is copyright to Christopher Tralie and Nathaniel Saul.

Citing

If you use this package, please site the JoSS paper found here DOI and the JACT paper about Ripser found here DOI:10.1007/s41468-021-00071-5.

You can use the following bibtex entries:

``` @article{ctralie2018ripser, doi = {10.21105/joss.00925}, url = {https://doi.org/10.21105/joss.00925}, year = {2018}, month = {Sep}, publisher = {The Open Journal}, volume = {3}, number = {29}, pages = {925}, author = {Christopher Tralie and Nathaniel Saul and Rann Bar-On}, title = {{Ripser.py}: A Lean Persistent Homology Library for Python}, journal = {The Journal of Open Source Software} }

@article{Bauer2021Ripser, AUTHOR = {Bauer, Ulrich}, TITLE = {Ripser: efficient computation of {V}ietoris-{R}ips persistence barcodes}, JOURNAL = {J. Appl. Comput. Topol.}, FJOURNAL = {Journal of Applied and Computational Topology}, VOLUME = {5}, YEAR = {2021}, NUMBER = {3}, PAGES = {391--423}, ISSN = {2367-1726}, MRCLASS = {55N31 (55-04)}, MRNUMBER = {4298669}, DOI = {10.1007/s41468-021-00071-5}, URL = {https://doi.org/10.1007/s41468-021-00071-5}, } ```

Owner

  • Name: Scikit-TDA
  • Login: scikit-tda
  • Kind: organization

Topological Data Analysis for the Python ecosystem.

JOSS Publication

Ripser.py: A Lean Persistent Homology Library for Python
Published
September 13, 2018
Volume 3, Issue 29, Page 925
Authors
Christopher Tralie ORCID
Department of Mathematics, Duke University
Nathaniel Saul ORCID
Department of Mathematics and Statistics, Washington State University
Rann Bar-On ORCID
Department of Mathematics, Duke University
Editor
Ariel Rokem ORCID
Tags
Persistent Homology Topological Data Analysis

Papers & Mentions

Total mentions: 1

A roadmap for the computation of persistent homology
Last synced: 3 months ago

GitHub Events

Total
  • Create event: 8
  • Release event: 2
  • Issues event: 8
  • Watch event: 26
  • Delete event: 8
  • Issue comment event: 21
  • Push event: 5
  • Pull request event: 23
  • Fork event: 1
Last Year
  • Create event: 8
  • Release event: 2
  • Issues event: 8
  • Watch event: 26
  • Delete event: 8
  • Issue comment event: 21
  • Push event: 5
  • Pull request event: 23
  • Fork event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 630
  • Total Committers: 23
  • Avg Commits per committer: 27.391
  • Development Distribution Score (DDS): 0.643
Past Year
  • Commits: 11
  • Committers: 2
  • Avg Commits per committer: 5.5
  • Development Distribution Score (DDS): 0.455
Top Committers
Name Email Commits
Nathaniel Saul n****t@s****m 225
Ulrich Bauer u****r@t****e 217
Chris Tralie c****e@g****m 85
julian j****z@h****h 29
Bradley Dice b****e@b****m 19
Michael Catanzaro c****j@p****e 12
dependabot[bot] 4****] 8
Rann Bar-On r****n@m****u 7
PEP8 Speaks p****s@g****m 7
mtsch m****r@g****m 3
Umberto Lupo 4****o 3
Edoardo Putti e****i@g****m 2
Ghiles Meddour g****b@g****m 2
Nathaniel Rivera Saul n****l@n****m 2
Brandon Meredith 6****h 1
Arfon Smith a****n 1
Haruki Nakajima s****e@g****m 1
Ippei Obayashi o****i@k****p 1
Thiago t****t@g****m 1
Daniel Carmody d****y@m****u 1
blasern b****n 1
dylia 4****a 1
joperea j****a@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 81
  • Total pull requests: 74
  • Average time to close issues: 10 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 69
  • Total pull request authors: 18
  • Average comments per issue: 3.11
  • Average comments per pull request: 1.55
  • Merged pull requests: 47
  • Bot issues: 0
  • Bot pull requests: 24
Past Year
  • Issues: 4
  • Pull requests: 30
  • Average time to close issues: 22 days
  • Average time to close pull requests: 18 days
  • Issue authors: 4
  • Pull request authors: 4
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.33
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 18
Top Authors
Issue Authors
  • sauln (4)
  • jonyscathe (3)
  • galenseilis (3)
  • catanzaromj (3)
  • xgao32 (2)
  • tmelorc (2)
  • ulupo (2)
  • christian-oreilly (1)
  • sohailiqbal (1)
  • DrMSAbdullahi (1)
  • mm04926412 (1)
  • Sandy4321 (1)
  • tianboqi (1)
  • anthtan (1)
  • HapeFs (1)
Pull Request Authors
  • dependabot[bot] (34)
  • catanzaromj (18)
  • ctralie (7)
  • sauln (5)
  • agentmarketbot (4)
  • edoput (4)
  • reds-heig (3)
  • ulupo (3)
  • bdice (3)
  • minimalProviderAgentMarket (2)
  • ghilesmeddour (2)
  • Luftalian (2)
  • ohai (1)
  • refu6enik (1)
  • dcarmod2 (1)
Top Labels
Issue Labels
Install (11) Windows (4) dependencies (4) documentation (2) bug (2) wontfix (1) Mac (1) Xcode update (1)
Pull Request Labels
dependencies (35) github_actions (11) bug (5) Install (4)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 20,641 last-month
  • Total docker downloads: 104
  • Total dependent packages: 10
    (may contain duplicates)
  • Total dependent repositories: 31
    (may contain duplicates)
  • Total versions: 36
  • Total maintainers: 3
pypi.org: ripser

A Lean Persistent Homology Library for Python

  • Versions: 28
  • Dependent Packages: 10
  • Dependent Repositories: 31
  • Downloads: 20,641 Last month
  • Docker Downloads: 104
Rankings
Dependent packages count: 1.4%
Dependent repos count: 2.6%
Average: 2.8%
Downloads: 3.1%
Docker downloads count: 4.0%
Maintainers (3)
Last synced: 4 months ago
conda-forge.org: ripser

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.

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 23.3%
Stargazers count: 24.2%
Average: 33.2%
Dependent repos count: 34.0%
Dependent packages count: 51.2%
Last synced: 4 months ago

Dependencies

docs/requirements.txt pypi
  • cython *
setup.py pypi
  • Cython *
  • numpy *
  • persim *
  • scikit-learn *
  • scipy *
.github/workflows/python-app.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
pyproject.toml pypi