Skip to content

giotto-ai/tutorial_mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Mapper Tutorial - the Santa Cloud

What is it?

The purpose of this project is to showcase the usage of the Mapper algorithm provided by the Giotto Python library. Have a look at our blog post 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 are required:

# 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 through the usage of CloudCompare.

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 method

Enjoy!

Requirements

In order to run the notebook, the following python packages are required:

  • giotto-tda>=0.1.4
  • pandas>=0.25.1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published