Skip to content

merylldindin/topologyx

Repository files navigation

topologyx

Topology Data Analysis Routines

Report Bug

Table of Contents

  1. About TopologyX
  2. Built With
  3. Get Started

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:

Built With

Get Started

pip install topologyx
# or with poetry
poetry add topologyx

How To Use

from topologyx.filtrations import Filtration

filtration = Filtration(data, use_alpha=False)
filtration.build_persistence_diagram(filtration_type=FiltrationType.SIMPLE, dimension=0)
from topologyx.clustering import TomatoClustering

tomato = TomatoClustering(data)
_ = tomato.estimate_clusters(visualize=True)
_ = tomato.fit_predict(n_clusters=3, visualize=True)

Local Installation

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 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 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.