Skip to content

Commit 114a64e

Browse files
committed
Improved docs content and formatting
1 parent ca1f9b0 commit 114a64e

File tree

3 files changed

+85
-66
lines changed

3 files changed

+85
-66
lines changed

README.md

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,43 @@
11
![Logo](https://github.com/lucasimi/tda-mapper-python/raw/main/docs/source/logos/tda-mapper-logo-horizontal.png)
22

3-
[![Source Code](https://img.shields.io/badge/lucasimi-tda--mapper--python-blue?logo=github&logoColor=silver)](https://github.com/lucasimi/tda-mapper-python)
43
[![PyPI version](https://img.shields.io/pypi/v/tda-mapper?logo=python&logoColor=silver)](https://pypi.python.org/pypi/tda-mapper)
54
[![downloads](https://img.shields.io/pypi/dm/tda-mapper?logo=python&logoColor=silver)](https://pypi.python.org/pypi/tda-mapper)
5+
[![codecov](https://img.shields.io/codecov/c/github/lucasimi/tda-mapper-python?logo=codecov&logoColor=silver)](https://codecov.io/github/lucasimi/tda-mapper-python)
66
[![test](https://img.shields.io/github/actions/workflow/status/lucasimi/tda-mapper-python/test-unit.yml?logo=github&logoColor=silver&branch=main&label=test)](https://github.com/lucasimi/tda-mapper-python/actions/workflows/test-unit.yml)
77
[![publish](https://img.shields.io/github/actions/workflow/status/lucasimi/tda-mapper-python/publish-pypi.yml?logo=github&logoColor=silver&label=publish)](https://github.com/lucasimi/tda-mapper-python/actions/workflows/publish-pypi.yml)
88
[![docs](https://img.shields.io/readthedocs/tda-mapper/main?logo=readthedocs&logoColor=silver)](https://tda-mapper.readthedocs.io/en/main/)
9-
[![codecov](https://img.shields.io/codecov/c/github/lucasimi/tda-mapper-python?logo=codecov&logoColor=silver)](https://codecov.io/github/lucasimi/tda-mapper-python)
109
[![DOI](https://img.shields.io/badge/DOI-10.5281/zenodo.10642381-blue?logo=doi&logoColor=silver)](https://doi.org/10.5281/zenodo.10642381)
11-
[![Streamlit App](https://img.shields.io/badge/Streamlit-App-blue?logo=streamlit&logoColor=silver)](https://tda-mapper-app.streamlit.app/)
1210

1311
# tda-mapper
1412

15-
**tda-mapper** is a Python library based on the Mapper algorithm, a key tool in
16-
Topological Data Analysis (TDA). Designed for efficient computations and backed
17-
by advanced spatial search techniques, it scales seamlessly to high dimensional
18-
data, making it suitable for applications in machine learning, data mining, and
19-
exploratory data analysis.
13+
**tda-mapper** is a Python library built around the Mapper algorithm, a core technique in Topological Data Analysis (TDA) for extracting topological structure from complex data. Designed for computational efficiency and scalability, it leverages optimized spatial search methods to support high-dimensional datasets. The library is well-suited for integration into machine learning pipelines, unsupervised learning tasks, and exploratory data analysis.
2014

2115
Further details in the
2216
[documentation](https://tda-mapper.readthedocs.io/en/main/)
2317
and in the
2418
[paper](https://openreview.net/pdf?id=lTX4bYREAZ).
2519

26-
## Main Features
20+
### Core Features
21+
22+
- **Efficient construction**
23+
24+
Leverages optimized spatial search techniques and parallelization to accelerate the construction of Mapper graphs, supporting the analysis of high-dimensional datasets.
25+
26+
- **Scikit-learn integration**
2727

28-
- **Fast Mapper graph construction**: Accelerates computations with efficient spatial search, enabling analysis of large, high-dimensional datasets.
28+
Provides custom estimators that are fully compatible with scikit-learn's API, enabling seamless integration into scikit-learn pipelines for tasks such as dimensionality reduction, clustering, and feature extraction.
2929

30-
- **Scikit-learn compatibility**: Easily integrate Mapper as a part of your machine learning workflows.
30+
- **Flexible visualization**
3131

32-
- **Flexible visualization options**: Visualize Mapper graphs with multiple supported backends, tailored to your needs.
32+
Multiple visualization backends supported (e.g., Plotly, Matplotlib) for generating high-quality Mapper graph representations with adjustable layouts and styling.
3333

34-
- **Interactive exploration**: Explore data interactively through a user-friendly app.
34+
- **Interactive app**
35+
36+
Provides an interactive web-based interface (via Streamlit) for dynamic exploration of Mapper graph structures, offering real-time adjustments to parameters and visualizations.
3537

3638
## Background
3739

38-
The Mapper algorithm transforms complex datasets into graph representations
39-
that highlight clusters, transitions, and topological features. These insights
40-
reveal hidden patterns in data, applicable across fields like social sciences,
41-
biology, and machine learning. For an in-depth coverage of Mapper, including
42-
its mathematical foundations and applications, read the
43-
[the original paper](https://research.math.osu.edu/tgda/mapperPBG.pdf).
40+
The Mapper algorithm extracts topological features from complex datasets, representing them as graphs that highlight clusters, transitions, and key structural patterns. These insights reveal hidden data relationships and are applicable across diverse fields, including social sciences, biology, and machine learning. For an in-depth overview of Mapper, including its mathematical foundations and practical applications, read [the original paper](https://research.math.osu.edu/tgda/mapperPBG.pdf).
4441

4542
| Step 1 | Step 2 | Step 3 | Step 4 |
4643
| ------ | ------ | ------ | ------ |
@@ -49,15 +46,7 @@ its mathematical foundations and applications, read the
4946

5047
## Citations
5148

52-
If you use **tda-mapper** in your work, please consider citing both the
53-
[library](https://doi.org/10.5281/zenodo.10642381), archived in a permanent
54-
Zenodo record, and the [paper](https://openreview.net/pdf?id=lTX4bYREAZ),
55-
which provides a broader methodological overview.
56-
We recommend citing the specific version of the library used in your research,
57-
as well as the paper.
58-
For citation examples, refer to the
59-
[documentation](https://tda-mapper.readthedocs.io/en/main/#citations).
60-
49+
If you use **tda-mapper** in your work, please consider citing both the [library](https://doi.org/10.5281/zenodo.10642381), archived in a permanent Zenodo record, and the [paper](https://openreview.net/pdf?id=lTX4bYREAZ), which provides a broader methodological overview. We recommend citing the specific version of the library used in your research, along with the paper. For citation examples, please refer to the [documentation](https://tda-mapper.readthedocs.io/en/main/#citations).
6150

6251
## Quick Start
6352

@@ -71,12 +60,7 @@ pip install tda-mapper
7160

7261
### How to Use
7362

74-
Here's a minimal example using the **circles dataset** from `scikit-learn` to demonstrate how to use **tda-mapper**.
75-
We start by generating the data and visualizing it.
76-
The dataset consists of two concentric circles.
77-
The goal is to compute a Mapper graph that summarizes this structure while preserving topological features.
78-
We proceed as follows:
79-
63+
Here's a minimal example using the **circles dataset** from `scikit-learn` to demonstrate how to use **tda-mapper**. This example demonstrates how to apply the Mapper algorithm on a synthetic dataset (concentric circles). The goal is to extract a topological graph representation using `PCA` as a lens and `DBSCAN` for clustering. We proceed as follows:
8064

8165
```python
8266
import matplotlib.pyplot as plt
@@ -124,10 +108,16 @@ More examples can be found in the
124108
Use our Streamlit app to visualize and explore your data without writing code.
125109
You can run a live demo directly on
126110
[Streamlit Cloud](https://tda-mapper-app.streamlit.app/),
127-
or locally on your machine using the following:
111+
or locally on your machine. The first time you run the app locally, you may need to install the required dependencies from the `requirements.txt` file by running
128112

129-
```
113+
```bash
130114
pip install -r app/requirements.txt
115+
```
116+
117+
then run the app locally with
118+
119+
```bash
131120
streamlit run app/streamlit_app.py
132121
```
133-
![tda-mapper-app](https://github.com/lucasimi/tda-mapper-python/raw/main/resources/tda-mapper-app.png)
122+
123+
![tda-mapper-app](https://github.com/lucasimi/tda-mapper-python/raw/main/resources/tda-mapper-app.png)

docs/source/index.rst

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,47 +25,56 @@
2525
https://github.com/lucasimi/tda-mapper-python/raw/main/docs/source/logos/tda-mapper-logo-horizontal.png
2626
:alt: Logo
2727

28-
|Source Code| |PyPI version| |downloads| |test| |publish| |docs| |codecov| |DOI|
29-
|Streamlit App|
28+
|PyPI version| |downloads| |codecov| |test| |publish| |docs| |DOI|
29+
30+
|Source Code|
3031

3132
tda-mapper
3233
==========
3334

34-
**tda-mapper** is a Python library based on the Mapper algorithm, a key tool in
35-
Topological Data Analysis (TDA). Designed for efficient computations and backed
36-
by advanced spatial search techniques, it scales seamlessly to high dimensional
37-
data, making it suitable for applications in machine learning, data mining, and
38-
exploratory data analysis.
35+
**tda-mapper** is a Python library built around the Mapper algorithm, a core
36+
technique in Topological Data Analysis (TDA) for extracting topological
37+
structure from complex data. Designed for computational efficiency and
38+
scalability, it leverages optimized spatial search methods to support
39+
high-dimensional datasets. The library is well-suited for integration into
40+
machine learning pipelines, unsupervised learning tasks, and exploratory data
41+
analysis.
3942

4043
Further details in the
4144
`documentation <https://tda-mapper.readthedocs.io/en/main/>`__
4245
and in the
4346
`paper <https://openreview.net/pdf?id=lTX4bYREAZ>`__.
4447

45-
Main features
48+
Core features
4649
-------------
4750

48-
- **Fast Mapper graph construction**: Accelerates computations with efficient
49-
spatial search, enabling analysis of large, high-dimensional datasets.
51+
- **Efficient construction**
52+
53+
Leverages optimized spatial search techniques and parallelization to accelerate the construction of Mapper graphs, supporting the analysis of high-dimensional datasets.
54+
55+
- **Scikit-learn integration**
56+
57+
Provides custom estimators that are fully compatible with scikit-learn's API, enabling seamless integration into scikit-learn pipelines for tasks such as dimensionality reduction, clustering, and feature extraction.
58+
59+
- **Flexible visualization**
60+
61+
Multiple visualization backends supported (e.g., Plotly, Matplotlib) for generating high-quality Mapper graph representations with adjustable layouts and styling.
5062

51-
- **Scikit-learn compatibility**: Easily integrate Mapper as a part of your
52-
machine learning workflows.
63+
- **Interactive app**
5364

54-
- **Flexible visualization options**: Visualize Mapper graphs with multiple
55-
supported backends, tailored to your needs.
65+
Provides an interactive web-based interface (via Streamlit) for dynamic exploration of Mapper graph structures, offering real-time adjustments to parameters and visualizations.
5666

57-
- **Interactive exploration**: Explore data interactively through a
58-
user-friendly app.
5967

6068
Background
6169
----------
6270

63-
The Mapper algorithm transforms complex datasets into graph representations
64-
that highlight clusters, transitions, and topological features. These insights
65-
reveal hidden patterns in data, applicable across fields like social sciences,
66-
biology, and machine learning. For an in-depth coverage of Mapper, including
67-
its mathematical foundations and applications, read the
68-
`original paper <https://research.math.osu.edu/tgda/mapperPBG.pdf>`__.
71+
The Mapper algorithm extracts topological features from complex datasets,
72+
representing them as graphs that highlight clusters, transitions, and key
73+
structural patterns. These insights reveal hidden data relationships and are
74+
applicable across diverse fields, including social sciences, biology, and
75+
machine learning. For an in-depth overview of Mapper, including its
76+
mathematical foundations and practical applications, read
77+
`the original paper <https://research.math.osu.edu/tgda/mapperPBG.pdf>`__.
6978

7079
+-----------------+-----------------+-----------------+-----------------+
7180
| Step 1 | Step 2 | Step 3 | Step 4 |
@@ -78,12 +87,12 @@ its mathematical foundations and applications, read the
7887
Citations
7988
---------
8089

81-
If you use **tda-mapper** in your work, please consider citing both the
90+
If you use **tda-mapper** in your work, please consider citing both the
8291
`library <https://doi.org/10.5281/zenodo.10642381>`__,
83-
archived in a permanent Zenodo record, and the
92+
archived in a permanent Zenodo record, and the
8493
`paper <https://openreview.net/pdf?id=lTX4bYREAZ>`__,
85-
which provides a broader methodological overview.
86-
We recommend citing the specific version of the library used in your research, as well as the paper.
94+
which provides a broader methodological overview. We recommend citing the
95+
specific version of the library used in your research, along with the paper.
8796

8897
- **tda-mapper**: For example to cite version 0.8.0 you can use:
8998

docs/source/quickstart.rst

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ Development
3737
How To Use
3838
----------
3939

40-
Here's a minimal example using the **circles dataset** from
41-
``scikit-learn`` to demonstrate how to use **tda-mapper**:
40+
Here's a minimal example using the **circles dataset** from `scikit-learn` to
41+
demonstrate how to use **tda-mapper**. This example demonstrates how to apply
42+
the Mapper algorithm on a synthetic dataset (concentric circles). The goal is
43+
to extract a topological graph representation using `PCA` as a lens and
44+
`DBSCAN` for clustering. We proceed as follows:
4245

4346
.. code:: python
4447
@@ -78,6 +81,11 @@ Here's a minimal example using the **circles dataset** from
7881
| |Original Dataset| | |Mapper Graph| |
7982
+----------------------------------------+-----------------------------+
8083

84+
Left: the original dataset consisting of two concentric circles with noise,
85+
colored by class label. Right: the resulting Mapper graph, built from the `PCA`
86+
projection and clustered using `DBSCAN`. The two concentric circles are well
87+
identified by the connected components in the Mapper graph.
88+
8189
More examples can be found in the
8290
`documentation <https://tda-mapper.readthedocs.io/en/main/>`__.
8391

@@ -89,13 +97,25 @@ You can run a live demo directly on
8997
`Streamlit Cloud <https://tda-mapper-app.streamlit.app/>`__,
9098
or locally on your machine using the following:
9199

100+
Use our Streamlit app to visualize and explore your data without writing code.
101+
You can run a live demo directly on
102+
`Streamlit Cloud <https://tda-mapper-app.streamlit.app/>`__,
103+
or locally on your machine. The first time you run the app locally, you may
104+
need to install the required dependencies from the `requirements.txt` file by
105+
running
106+
92107
.. code:: bash
93108
94109
pip install -r app/requirements.txt
110+
111+
then run the app locally with
112+
113+
.. code:: bash
114+
95115
streamlit run app/streamlit_app.py
96116
97117
|Interactive App|
98118

99119
.. |Original Dataset| image:: https://github.com/lucasimi/tda-mapper-python/raw/main/resources/circles_dataset_v2.png
100120
.. |Mapper Graph| image:: https://github.com/lucasimi/tda-mapper-python/raw/main/resources/circles_mean_v2.png
101-
.. |Interactive App| image :: https://github.com/lucasimi/tda-mapper-python/raw/main/resources/tda-mapper-app.png
121+
.. |Interactive App| image:: https://github.com/lucasimi/tda-mapper-python/raw/main/resources/tda-mapper-app.png

0 commit comments

Comments
 (0)