Code Monkey home page Code Monkey logo

tutorial_mapper's Introduction

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.

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-learn-nightly
  • pandas>=0.25.1
  • numpy>=1.17.2
  • plotly>=4.4.1
  • scikit-learn>=0.22
  • python-igraph

tutorial_mapper's People

Contributors

davide-burba avatar giotto-learn avatar lewtun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.