https://github.com/scikit-tda/kepler-mapper
Kepler Mapper: A flexible Python implementation of the Mapper algorithm.
https://github.com/scikit-tda/kepler-mapper
data-visualization hacktoberfest kepler-mapper mapper-algorithm python tda topological-data-analysis visualization
Last synced: 5 months ago
JSON representation
Kepler Mapper: A flexible Python implementation of the Mapper algorithm.
- Host: GitHub
- URL: https://github.com/scikit-tda/kepler-mapper
- Owner: scikit-tda
- License: mit
- Created: 2015-08-20T14:57:52.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T22:45:32.000Z (over 1 year ago)
- Last Synced: 2024-05-18T17:55:48.013Z (over 1 year ago)
- Topics: data-visualization, hacktoberfest, kepler-mapper, mapper-algorithm, python, tda, topological-data-analysis, visualization
- Language: Python
- Homepage: https://kepler-mapper.scikit-tda.org
- Size: 47.2 MB
- Stars: 624
- Watchers: 41
- Forks: 178
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Authors: AUTHORS.md
Awesome Lists containing this project
README
[](https://badge.fury.io/py/kmapper)
[](https://pypi.python.org/pypi/kmapper/)
[](https://travis-ci.org/scikit-tda/kepler-mapper)
[](https://codecov.io/gh/scikit-tda/kepler-mapper)
[](https://doi.org/10.21105/joss.01315)
[](https://doi.org/10.5281/zenodo.1002377)# 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](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 (>= 3.6)
- NumPy
- Scikit-learnUsing the plotly visualizations requires a few extra libraries:
- igraph
- Plotly
- IpywidgetsAdditionally, 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
```python
# 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.
## How to cite
To credit KeplerMapper in your work: https://kepler-mapper.scikit-tda.org/en/latest/#citations