Ripserer.jl
Efficient computation of persistent homology.
Introduction
Ripserer is a pure Julia library for computing persistent homology based on the Ripser algorithm. Roughly speaking, persistent homology detects topological holes in data in a noise-resistant, stable way. If you are unfamiliar with persistent homology, I recommend reading this excellent introduction.
See the Examples for further info.
Features
Ripserer supports the following:
- Vietoris-Rips persistent homology.
- Sublevel set persistent homology for multidimensional image and time series data.
- Calculation of persistent homology with coefficients in any (possibly user defined) field with the default of $\mathbb{Z}_p$ for a prime $p$.
- Sparse distance matrix and thresholding support.
- Computing representative cocycles of persistent cohomology.
- Plotting persistence diagrams, barcodes and representative cocycles.
- Generic API.
Ripserer is not yet a full TDA software framework, since some essential features such as computing distances between persistence diagrams are not available. Vietoris-Rips complexes are also not the right fit for all kinds of data.
Performance
Much like Ripser, Ripserer uses the following optimizations to achieve its speed.
- Compute persistent cohomology.
- Apply the clearing optimization.
- Don't store things that can be easily recomputed.
- Skip apparent and emergent persistence pairs.
For a detailed description of the algorithm, please see the original article.
In general, the performance of Ripserer is very close to Ripser. Depending on the data set, one or the other may be faster and the differences are usually small. There are no official benchmarks, because I have found benchmarking on my computer or a CI system to be too unreliable.
Extending
Ripserer is designed to be easily extended with new simplex or filtration types. The interfaces are specified in the docstrings for AbstractSimplex
and AbstractFiltration
. Also see the API for more info. To see an example of an extension, check out src/cubical.jl
.
If you have written an extension or have trouble implementing one, please open a pull request or an issue.
Acknowledgments
I would like to thank: