[![PyPI version](https://badge.fury.io/py/kmapper.svg)](https://badge.fury.io/py/kmapper)
[![Downloads](https://img.shields.io/pypi/dm/kmapper)](https://pypi.python.org/pypi/kmapper/)
[![Build Status](https://travis-ci.org/scikit-tda/kepler-mapper.svg?branch=master)](https://travis-ci.org/scikit-tda/kepler-mapper)
[![Codecov](https://codecov.io/gh/scikit-tda/kepler-mapper/branch/master/graph/badge.svg)](https://codecov.io/gh/scikit-tda/kepler-mapper)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.01315/status.svg)](https://doi.org/10.21105/joss.01315)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1002377.svg)](https://doi.org/10.5281/zenodo.1002377)
# KeplerMapper <img align="right" width="40" height="40" src="http://i.imgur.com/axOG6GJ.jpg">
> 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-learn
Using the plotly visualizations requires a few extra libraries:
- 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
```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
Raw data
{
"_id": null,
"home_page": "http://kepler-mapper.scikit-tda.org",
"name": "kmapper",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "mapper, topology data analysis, algebraic topology, unsupervised learning",
"author": "HJ van Veen, Nathaniel Saul, David Eargle, Sam Mangham",
"author_email": "info@mlwave.com, nat@saulgill.com",
"download_url": "https://files.pythonhosted.org/packages/db/1f/142bb0c049239d6d35997909a219d22b1ee456091523bf2ef289083595ea/kmapper-2.1.0.tar.gz",
"platform": null,
"description": "[![PyPI version](https://badge.fury.io/py/kmapper.svg)](https://badge.fury.io/py/kmapper)\n[![Downloads](https://img.shields.io/pypi/dm/kmapper)](https://pypi.python.org/pypi/kmapper/)\n[![Build Status](https://travis-ci.org/scikit-tda/kepler-mapper.svg?branch=master)](https://travis-ci.org/scikit-tda/kepler-mapper)\n[![Codecov](https://codecov.io/gh/scikit-tda/kepler-mapper/branch/master/graph/badge.svg)](https://codecov.io/gh/scikit-tda/kepler-mapper)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.01315/status.svg)](https://doi.org/10.21105/joss.01315)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1002377.svg)](https://doi.org/10.5281/zenodo.1002377)\n\n# KeplerMapper <img align=\"right\" width=\"40\" height=\"40\" src=\"http://i.imgur.com/axOG6GJ.jpg\">\n\n> Nature uses as little as possible of anything. - Johannes Kepler\n\nThis 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).\n\nKeplerMapper 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\".\n\nKeplerMapper can make use of Scikit-Learn API compatible cluster and scaling algorithms.\n\n## Install\n\n### Dependencies\n\nKeplerMapper requires:\n\n- Python (>= 3.6)\n- NumPy\n- Scikit-learn\n\nUsing the plotly visualizations requires a few extra libraries:\n\n- igraph\n- Plotly\n- Ipywidgets\n\nAdditionally, running some of the examples requires:\n\n- matplotlib\n- umap-learn\n\n### Installation\n\nInstall KeplerMapper with pip:\n\n```\npip install kmapper\n```\n\nTo install from source:\n\n```\ngit clone https://github.com/MLWave/kepler-mapper\ncd kepler-mapper\npip install -e .\n```\n\n## Usage\n\nKeplerMapper adopts the scikit-learn API as much as possible, so it should feel very familiar to anyone who has used these libraries.\n\n### Python code\n\n```python\n# Import the class\nimport kmapper as km\n\n# Some sample data\nfrom sklearn import datasets\ndata, labels = datasets.make_circles(n_samples=5000, noise=0.03, factor=0.3)\n\n# Initialize\nmapper = km.KeplerMapper(verbose=1)\n\n# Fit to and transform the data\nprojected_data = mapper.fit_transform(data, projection=[0,1]) # X-Y axis\n\n# Create dictionary called 'graph' with nodes, edges and meta-information\ngraph = mapper.map(projected_data, data, cover=km.Cover(n_cubes=10))\n\n# Visualize it\nmapper.visualize(graph, path_html=\"make_circles_keplermapper_output.html\",\n title=\"make_circles(n_samples=5000, noise=0.03, factor=0.3)\")\n```\n\n## Disclaimer\n\nStandard MIT disclaimer applies, see `DISCLAIMER.md` for full text. Development status is Alpha.\n\n## How to cite\n\nTo credit KeplerMapper in your work: https://kepler-mapper.scikit-tda.org/en/latest/#citations\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python implementation of Mapper algorithm for Topological Data Analysis.",
"version": "2.1.0",
"project_urls": {
"Homepage": "http://kepler-mapper.scikit-tda.org"
},
"split_keywords": [
"mapper",
" topology data analysis",
" algebraic topology",
" unsupervised learning"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4e91b0e43c9fcfee52024664a7b117ccf9fd3644f8cdd5d758620c21a5f4c406",
"md5": "164941be16be86aeb5d5ec882d930127",
"sha256": "b0d7cd3289b3ee17a75bed0dfbe5761fd3599e42508e0ddee410868233bfc66a"
},
"downloads": -1,
"filename": "kmapper-2.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "164941be16be86aeb5d5ec882d930127",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 126799,
"upload_time": "2024-07-06T13:07:55",
"upload_time_iso_8601": "2024-07-06T13:07:55.314305Z",
"url": "https://files.pythonhosted.org/packages/4e/91/b0e43c9fcfee52024664a7b117ccf9fd3644f8cdd5d758620c21a5f4c406/kmapper-2.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "db1f142bb0c049239d6d35997909a219d22b1ee456091523bf2ef289083595ea",
"md5": "b5b69604897239e645a738b06d3e02ef",
"sha256": "d78df18e176b2ef21edf0ea9f815bae1bf277e7b3a805b76bd1263fbcd05e3a3"
},
"downloads": -1,
"filename": "kmapper-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b5b69604897239e645a738b06d3e02ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 134033,
"upload_time": "2024-07-06T13:07:56",
"upload_time_iso_8601": "2024-07-06T13:07:56.697559Z",
"url": "https://files.pythonhosted.org/packages/db/1f/142bb0c049239d6d35997909a219d22b1ee456091523bf2ef289083595ea/kmapper-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-06 13:07:56",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "kmapper"
}