This series of Jupyter Notebooks serves as a walkthrough of topological data analysis, topological time series analysis (including rhythm analysis in music and periodicity / quasiperiodicity quantification in video), and 3D shape analysis. The main engine behind all of the code is a Python port of the ripser library.
This started off as a tutorial for the summer workshop "Mathematical Methods for High-Dimensional Data Analysis." Now it is used more generally to support pedagogical activities to support the NSF big data grant DKA-1447491, as well as assisting with the ICERM Summer Undergraduate Program and the workshop "Topological Data Analysis and Persistent Homology" in Levico Terme (Trento), Italy.
For 4 sessions with 90 minutes each (as in Levico), the following order is suggested (with some wiggle room between sessions)
- Basic Shapes
- Wasserstein And Bottleneck
- SlidingWindow1-Basics
- SlidingWindow2-PersistentHomology
- SlidingWindow3-AudioApplications
- SlidingWindow4-Video
- Approximate Sparse Filtrations
- Image Patches
- Diffusion Maps And TDA
- 3D Shapes
- Whatever is leftover
Below are instructions for installing and running these tutorials
git clone --recursive https://github.com/ctralie/TDALabs.git
To run these modules, you will need to have Jupyter notebook installed with a Python 3 backend with numpy, scipy, and matplotlib, and ipywidgets. The easiest way to install this is with Anaconda:
https://www.anaconda.com/download/
Once you have downloaded and installed all of these packages, navigate to the root of this repository and type the following commands, which will install dependencies
pip install cechmate
pip install cython
pip install ripser
pip install imageio (for SlidingWindow4-Video only)
At times, some updates may have happened to submodule dependencies (pykhs for the heat kernel signature and dreimac for projective coordinates). To update these, type
git submodule update --init
git submodule update --remote
For loading video in SlidingWindow4-Video, you will need to install the ffmpeg binaries
At the root of this directory, type
jupyter notebook
This will launch a browser window, where you can run the modules. Click on one of the files (e.g. Basic Shapes.ipynb) to begin