https://github.com/merylldindin/topologyx
Topological Data Analysis Routines
https://github.com/merylldindin/topologyx
betti-curves gudhi persistence-landscape persistent-homology python simplex-algorithm tomato-clustering topology
Last synced: 2 months ago
JSON representation
Topological Data Analysis Routines
- Host: GitHub
- URL: https://github.com/merylldindin/topologyx
- Owner: merylldindin
- License: apache-2.0
- Created: 2018-06-26T04:55:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-11-12T22:09:32.000Z (4 months ago)
- Last Synced: 2025-11-13T00:11:22.888Z (4 months ago)
- Topics: betti-curves, gudhi, persistence-landscape, persistent-homology, python, simplex-algorithm, tomato-clustering, topology
- Language: Python
- Homepage: https://pypi.org/manage/project/topologyx
- Size: 16.2 MB
- Stars: 147
- Watchers: 6
- Forks: 30
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING
- License: LICENSE
Awesome Lists containing this project
- awesome-TDA - TdaToolbox - Some tools that may be applied to data science in general. (Tools / Courses)
README
## Table of Contents
## About TopologyX
Topological Data Analysis, also abbreviated _TDA_, is a recent field that emerged from various works in applied topology and computational geometry. It aims at providing well-founded mathematical, statistical, and algorithmic methods to exploit the topological and underlying geometric structures in data. My aim is to develop some tools in this repository that may be applied to data science in general. Some of them have already proven useful for classification tasks.
Read more about applied TDA:
- [General introduction to TDA](https://hal.inria.fr/hal-02155849/file/1906.05795.pdf)
- [Medium article with general TDA overview](https://towardsdatascience.com/from-tda-to-dl-d06f234f51d)
- [Medium article about TDA for clustering](https://towardsdatascience.com/tda-to-rule-them-all-tomato-clustering-878e03394a1)
- [Paper on applied TDA for arrhythmia detection](https://arxiv.org/abs/1906.05795)
## Built With
- [Python](https://www.python.org/)
- [Poetry](https://python-poetry.org/)
- [Gudhi](https://gudhi.inria.fr/)
- [Keras](https://keras.io/)
## Get Started
```bash
pip install topologyx
# or with poetry
poetry add topologyx
```
### How To Use
```python
from topologyx.filtrations import Filtration
filtration = Filtration(data, use_alpha=False)
filtration.build_persistence_diagram(filtration_type=FiltrationType.SIMPLE, dimension=0)
```
```python
from topologyx.clustering import TomatoClustering
tomato = TomatoClustering(data)
_ = tomato.estimate_clusters(visualize=True)
_ = tomato.fit_predict(n_clusters=3, visualize=True)
```
### Local Installation
```bash
git clone https://github.com/merylldindin/topologyx
# install dependencies
make install
```
### Using Notebooks
`ipykernel` comes out of the box with our dependencies, so you can directly use the notebooks provided in the `examples` folder. I use `VSCode` as engine for my jupyter notebooks.
**Tutorial: Filtration of a 3D shape:** This [notebook](https://github.com/merylldindin/topologyx/blob/master/examples/filtrations.ipynb) gives a simple example of how to handle three-dimensional shapes. The whole example is based on the height as filtration function, so not invariant in space. However, it gives a pretty good idea of what the output of a topological analysis may give.
**Tutorial: ToMaTo clustering:** This [notebook](https://github.com/merylldindin/topologyx/blob/master/examples/clustering.ipynb) rather focus on a specific strength of TDA: its robustness to detect centroids in dataset, along with its ability to record the relationships between each point, enabling us to retrace the whole structure of the centroids. Examples are provided in the notebook.