https://github.com/giotto-ai/tutorial_mapper
https://github.com/giotto-ai/tutorial_mapper
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/giotto-ai/tutorial_mapper
- Owner: giotto-ai
- License: other
- Created: 2019-12-11T09:28:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-24T09:42:28.000Z (over 4 years ago)
- Last Synced: 2025-04-01T23:09:41.093Z (2 months ago)
- Language: Jupyter Notebook
- Size: 27.7 MB
- Stars: 13
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Mapper Tutorial - the Santa Cloud
## What is it?
The purpose of this project is to showcase the usage of the [Mapper algorithm](https://research.math.osu.edu/tgda/mapperPBG.pdf) provided by the [Giotto](https://giotto.ai) Python library. Have a look at our [blog post](https://towardsdatascience.com/visualising-high-dimensional-data-with-giotto-mapper-897fcdb575d7) for more information.
## Getting started
Spin up a conda virtual environment and install the required libraries:
```
conda create --name mapper python=3.7 && conda activate mapper
conda install jupyter -y
pip install -r requirements.txt
```## JupyterLab setup
To see the Plotly graphs in JupyterLab, some [extra steps](https://github.com/plotly/plotly.py) are required:
```bash
# Avoid "JavaScript heap out of memory" errors during extension installation
# (OS X/Linux)
export NODE_OPTIONS=--max-old-space-size=4096
# (Windows)
set NODE_OPTIONS=--max-old-space-size=4096# Jupyter widgets extension
jupyter labextension install @jupyter-widgets/[email protected] --no-build# FigureWidget support
jupyter labextension install [email protected] --no-build# and jupyterlab renderer support
jupyter labextension install [email protected] --no-build# Build extensions (must be done to activate extensions since --no-build is used above)
jupyter lab build# Unset NODE_OPTIONS environment variable
# (OS X/Linux)
unset NODE_OPTIONS
# (Windows)
set NODE_OPTIONS=
```
After running these steps, deactivate and reactivate your conda environment before spinning up JupyterLab.## Data
We applied the Mapper algorithm on a dataset containing 20 000 3-dimensional observations sampled from a Santa Claus shape.
The dataset has been sampled from a mesh object available [here](https://free3d.com/3d-model/santa-clau-77751.html) through the usage of [CloudCompare](https://www.cloudcompare.org).
## Notebook overview
All the analyses are performed in the notebook "Christmas Mapper.ipynb". We briefly describe the Mapper algorithm and we show how the output graph changes by varying:
- filter functions
- covering
- clustering methodEnjoy!
## Requirements
In order to run the notebook, the following python packages are required:- giotto-tda>=0.1.4
- pandas>=0.25.1