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.
Ripserer was created by Matija Čufar. If you used this software in your project, or if you have any comments, questions or suggestions, feel free to contact me at matijacufar@gmail.com.
While this package is fully functional, it is still in development and should not be considered stable. Interfaces and internals may still change.
Installation
This package is registered. To install it, simply run the following.
julia> import Pkg
julia> Pkg.add("Ripserer")
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, matchings and representative cocycles.
- Generic API.
Ripserer uses PersistenceDiagrams.jl to represent persistence diagrams. It reexports some basic functionality, but please see that package for more persistence diagram-related functions.
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 Ulrich Bauer's article on Ripser.
In general, the performance of Ripserer is very close to Ripser, within around 30%. Depending on the data set, one or the other may be faster. 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. See the Filtration Interface and Simplex Interface API sections for more info. To see an example of an extension, check out the implementation of cubical simplices and filtrations in 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: