Chapter 10: Topological Data Analysis¶
Authors: Henry Adams, Johnathan Bush, and Joshua Mirth
Digital resources supplementing the chapter
Persistent homology tutorial (4 parts)¶
- Computing persistent homology online
- Exercises
- Computing persistent homology on your machine
- Topological feature vectors (and bibliography)
Persistent homology code¶
This repository contains scripts for using Ripser and Hera with a Python interface. Code was written by Melissa McGuirl.
You can run the scripts using Python on the command line, or inspect the code within the scripts to see how they are implemented.
- To run Ripser on a collection of distance matrices, run the script getBarCodes.py.
- To separate Ripser output by dimension to input that is compatible with Hera, run the script separateRipser.py. IMPORTANT: That script assumes there are just dimension 0 and dimension 1 barcodes, but it could be adapted easily.
- To plot persistence diagrams, run the script
plotpd.py.
(This script requires the output of
separateRipser.py
, not the output ofgetBarCodes.py
.) - To compute distances between two barcodes, run the script computePDDists.py.
For help on using any of these scripts, run it with a --h
switch, as in
python getBarCodes.py --h
.
NOTE: The plan of the chapter authors is to update this code to instead use scikit-tda.