Skip to content
Kepler Mapper: A flexible Python implementation of the Mapper algorithm.
Branch: master
Clone or download
Latest commit d4ed39f Apr 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Aug 8, 2018
depricated v 00006 Nov 14, 2015
docs Merge pull request #148 from karinsasaki/master Apr 8, 2019
examples rearranging, cleaning, adding adapters example Nov 8, 2018
kmapper Merge pull request #167 from cmorph1/remove-mutable-arguments Apr 24, 2019
test Merge pull request #167 from cmorph1/remove-mutable-arguments Apr 24, 2019
.coveragerc CI modifications to automatically build coverage report every commit Nov 24, 2017
.gitattributes linguist recognize notebooks as python. wont skew language statistics Apr 23, 2018
.gitignore cleaning up docs Jul 24, 2018
.pep8speaks.yml ignore long lines Mar 12, 2018
.travis.yml fix pep8 and travis test Feb 9, 2019
AUTHORS.md Add Authors Nov 17, 2017
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Aug 8, 2018
CONTRIBUTING.md add ground rules Mar 16, 2019
CONTRIBUTORS.md mutable arguments removed (not including color_default dict) Apr 8, 2019
DEPLOY.md update deployment proceedure Nov 8, 2018
DISCLAIMER.txt
LICENSE.txt uppercase filenames to distinguish meta info from package Nov 13, 2017
MANIFEST.in fix some examples, use readme as long description Apr 13, 2018
Makefile remove new directories during build Feb 9, 2019
README.md Update README.md Feb 28, 2019
RELEASE.txt Add note for PR #163 Apr 8, 2019
TODO.md uppercase filenames to distinguish meta info from package Nov 13, 2017
paper.bib updating breast cancer link/bib Mar 16, 2019
paper.md updating breast cancer link/bib Mar 16, 2019
setup.py add plotlyviz requirements for docs build Mar 5, 2019

README.md

PyPI version Downloads Build Status Codecov DOI

KeplerMapper

Nature uses as little as possible of anything. - Johannes Kepler

This is a Python implementation of the TDA Mapper algorithm for visualization of high-dimensional data. For complete documentation, see https://kepler-mapper.scikit-tda.org.

KeplerMapper employs approaches based on the Mapper algorithm (Singh et al.) as first described in the paper "Topological Methods for the Analysis of High Dimensional Data Sets and 3D Object Recognition".

KeplerMapper can make use of Scikit-Learn API compatible cluster and scaling algorithms.

Install

Dependencies

KeplerMapper requires:

  • Python (>= 2.7 or >= 3.3)
  • NumPy
  • Scikit-learn

Using the plotly visualizations requires a few extra libraries:

  • Python-Igraph
  • Plotly
  • Ipywidgets

Additionally, running some of the examples requires:

  • matplotlib
  • umap-learn

Installation

Install KeplerMapper with pip:

pip install kmapper

To install from source:

git clone https://github.com/MLWave/kepler-mapper
cd kepler-mapper
pip install -e .

Usage

KeplerMapper adopts the scikit-learn API as much as possible, so it should feel very familiar to anyone who has used these libraries.

Python code

# Import the class
import kmapper as km

# Some sample data
from sklearn import datasets
data, labels = datasets.make_circles(n_samples=5000, noise=0.03, factor=0.3)

# Initialize
mapper = km.KeplerMapper(verbose=1)

# Fit to and transform the data
projected_data = mapper.fit_transform(data, projection=[0,1]) # X-Y axis

# Create dictionary called 'graph' with nodes, edges and meta-information
graph = mapper.map(projected_data, data, cover=km.Cover(n_cubes=10))

# Visualize it
mapper.visualize(graph, path_html="make_circles_keplermapper_output.html",
                 title="make_circles(n_samples=5000, noise=0.03, factor=0.3)")

Disclaimer

Standard MIT disclaimer applies, see DISCLAIMER.md for full text. Development status is Alpha.

Cite

Nathaniel Saul, & Hendrik Jacob van Veen. (2017, November 17). MLWave/kepler-mapper: 186f (Version 1.0.1). Zenodo. http://doi.org/10.5281/zenodo.1054444

You can’t perform that action at this time.