Name | slisemap JSON |
Version |
1.6.2
JSON |
| download |
home_page | None |
Summary | SLISEMAP: Combine local explanations with supervised dimensionality reduction |
upload_time | 2024-04-30 09:09:37 |
maintainer | None |
docs_url | None |
author | Lauri Seppäläinen, Jarmo Mäkelä |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2024 Anton Björklund, Jarmo Mäkelä, and Kai Puolamäki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
explainable ai
local explanation
dimensionality reduction
manifold visualization
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![PyPI](https://img.shields.io/pypi/v/slisemap)](https://pypi.org/project/slisemap/)
[![Documentation](https://github.com/edahelsinki/slisemap/actions/workflows/python-docs.yml/badge.svg)](https://edahelsinki.github.io/slisemap/slisemap/)
[![Tests](https://github.com/edahelsinki/slisemap/actions/workflows/python-pytest.yml/badge.svg)](https://github.com/edahelsinki/slisemap/actions/workflows/python-pytest.yml)
[![Licence: MIT](https://img.shields.io/github/license/edahelsinki/slisemap)](https://github.com/edahelsinki/slisemap/blob/master/LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/edahelsinki/slisemap/HEAD?labpath=examples)
[![DOI](https://img.shields.io/badge/DOI-10.1007%2Fs10994--022--06261--1-%23fcb426)](https://doi.org/10.1007/s10994-022-06261-1)
# SLISEMAP: Combine supervised dimensionality reduction with local explanations
SLISEMAP is a supervised dimensionality reduction method, that takes data, in the form of vectors, and predictions from a "black box" regression or classification model as input. SLISEMAP then simultaneously finds local explanations for all data items and builds a (typically) two-dimensional global visualisation of the black box model such that data items with similar local explanations are projected nearby. The explanations consists of interpretable models that locally approximate the "black box" model.
SLISEMAP is implemented in *Python* using *PyTorch* for efficient optimisation, and optional GPU-acceleration. For more information see the [papers](#citations), the [examples](https://github.com/edahelsinki/slisemap/tree/main/examples), or the [documentation](https://edahelsinki.github.io/slisemap/slisemap).
*This library also includes the faster SLIPMAP variant, that uses "prototypes" to speed up
the calculations (linear time and memory complexity instead of quadratic).
SLIPMAP is largely compatible with SLISEMAP, just change the class name (`Slisemap` to `Slipmap`, see example below).*
## Citations
The new SLIPMAP paper ([supplements](https://github.com/edahelsinki/slisemap/tree/slipmap_experiments) and [slides](https://github.com/edahelsinki/slisemap/blob/data/slides/slipmap_slides.pdf)):
> *Björklund, A., Seppäläinen, L., & Puolamäki, K. (2024).*
> **SLIPMAP: Fast and Robust Manifold Visualisation for Explainable AI**
> Advances in Intelligent Data Analysis XXII, IDA 2024, pp. 223-235. Lecture Notes in Computer Science, vol 14642. DOI: [10.1007/978-3-031-58553-1_18](https://doi.org/10.1007/978-3-031-58553-1_18)
The full SLISEMAP paper ([arXiv](https://arxiv.org/abs/2201.04455), [supplements](https://github.com/edahelsinki/slisemap/tree/slisemap_experiments), and [slides](https://github.com/edahelsinki/slisemap/blob/data/slides/slisemap_slides.pdf)):
> *Björklund, A., Mäkelä, J., & Puolamäki, K. (2023).*
> **SLISEMAP: Supervised dimensionality reduction through local explanations.**
> Machine Learning 112, 1-43. DOI: [10.1007/s10994-022-06261-1](https://doi.org/10.1007/s10994-022-06261-1)
The short demo paper ([video](https://youtu.be/zvcFYItwRlQ) and [slides](https://github.com/edahelsinki/slisemap/blob/data/slides/demo_slides.pdf)):
> *Björklund, A., Mäkelä, J., & Puolamäki, K. (2023).*
> **SLISEMAP: Combining Supervised Dimensionality Reduction with Local Explanations.**
> Machine Learning and Knowledge Discovery in Databases, ECML PKDD 2022. Lecture Notes in Computer Science, vol 13718. DOI: [10.1007/978-3-031-26422-1_41](https://doi.org/10.1007/978-3-031-26422-1_41).
## Installation
To install the package just run:
```sh
pip install slisemap
```
Or install the latest version directly from [GitHub](https://github.com/edahelsinki/slisemap):
```sh
pip install git+https://github.com/edahelsinki/slisemap
```
To use the built-in hyperparameter tuning you also need `scikit-optimize`, which is automatically installed if you do:
```sh
pip install slisemap[tuning]
```
### PyTorch
Since SLISEMAP utilises PyTorch for efficient calculations, you might want to install a version that is optimised for your hardware. See [https://pytorch.org/get-started/locally](https://pytorch.org/get-started/locally/) for details.
## Example
```python
import numpy as np
from slisemap import Slisemap
X = np.array(...)
y = np.array(...)
sm = Slisemap(X, y, radius=3.5, lasso=0.01)
sm.optimise()
sm.plot(clusters=5, bars=5)
```
![Example plot of the results from using SLISEMAP on the *Auto MPG* dataset](docs/autompg.webp)
To use the faster SLIPMAP variant just replace the relevant lines:
```python
from slisemap import Slipmap
sm = Slipmap(X, y, radius=2.0, lasso=0.01)
```
See the [examples](https://github.com/edahelsinki/slisemap/tree/main/examples) for more detailed examples, and the [documentation](https://edahelsinki.github.io/slisemap/slisemap.html) for more detailed instructions.
Raw data
{
"_id": null,
"home_page": null,
"name": "slisemap",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "Explainable AI, Local explanation, Dimensionality reduction, Manifold visualization",
"author": "Lauri Sepp\u00e4l\u00e4inen, Jarmo M\u00e4kel\u00e4",
"author_email": "Anton Bj\u00f6rklund <anton.bjorklund@helsinki.fi>, Kai Puolam\u00e4ki <kai.puolamaki@helsinki.fi>",
"download_url": "https://files.pythonhosted.org/packages/a5/21/4e946f31e94af3f7ef5ddf41d1e2ebd83ee65126a66220be8da8f1efb090/slisemap-1.6.2.tar.gz",
"platform": null,
"description": "[![PyPI](https://img.shields.io/pypi/v/slisemap)](https://pypi.org/project/slisemap/)\n[![Documentation](https://github.com/edahelsinki/slisemap/actions/workflows/python-docs.yml/badge.svg)](https://edahelsinki.github.io/slisemap/slisemap/)\n[![Tests](https://github.com/edahelsinki/slisemap/actions/workflows/python-pytest.yml/badge.svg)](https://github.com/edahelsinki/slisemap/actions/workflows/python-pytest.yml)\n[![Licence: MIT](https://img.shields.io/github/license/edahelsinki/slisemap)](https://github.com/edahelsinki/slisemap/blob/master/LICENSE)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/edahelsinki/slisemap/HEAD?labpath=examples)\n[![DOI](https://img.shields.io/badge/DOI-10.1007%2Fs10994--022--06261--1-%23fcb426)](https://doi.org/10.1007/s10994-022-06261-1)\n# SLISEMAP: Combine supervised dimensionality reduction with local explanations\n\nSLISEMAP is a supervised dimensionality reduction method, that takes data, in the form of vectors, and predictions from a \"black box\" regression or classification model as input. SLISEMAP then simultaneously finds local explanations for all data items and builds a (typically) two-dimensional global visualisation of the black box model such that data items with similar local explanations are projected nearby. The explanations consists of interpretable models that locally approximate the \"black box\" model.\n\nSLISEMAP is implemented in *Python* using *PyTorch* for efficient optimisation, and optional GPU-acceleration. For more information see the [papers](#citations), the [examples](https://github.com/edahelsinki/slisemap/tree/main/examples), or the [documentation](https://edahelsinki.github.io/slisemap/slisemap).\n\n*This library also includes the faster SLIPMAP variant, that uses \"prototypes\" to speed up\nthe calculations (linear time and memory complexity instead of quadratic).\nSLIPMAP is largely compatible with SLISEMAP, just change the class name (`Slisemap` to `Slipmap`, see example below).*\n\n\n## Citations\n\nThe new SLIPMAP paper ([supplements](https://github.com/edahelsinki/slisemap/tree/slipmap_experiments) and [slides](https://github.com/edahelsinki/slisemap/blob/data/slides/slipmap_slides.pdf)):\n> *Bj\u00f6rklund, A., Sepp\u00e4l\u00e4inen, L., & Puolam\u00e4ki, K. (2024).* \n> **SLIPMAP: Fast and Robust Manifold Visualisation for Explainable AI** \n> Advances in Intelligent Data Analysis XXII, IDA 2024, pp. 223-235. Lecture Notes in Computer Science, vol 14642. DOI: [10.1007/978-3-031-58553-1_18](https://doi.org/10.1007/978-3-031-58553-1_18) \n\nThe full SLISEMAP paper ([arXiv](https://arxiv.org/abs/2201.04455), [supplements](https://github.com/edahelsinki/slisemap/tree/slisemap_experiments), and [slides](https://github.com/edahelsinki/slisemap/blob/data/slides/slisemap_slides.pdf)):\n> *Bj\u00f6rklund, A., M\u00e4kel\u00e4, J., & Puolam\u00e4ki, K. (2023).* \n> **SLISEMAP: Supervised dimensionality reduction through local explanations.** \n> Machine Learning 112, 1-43. DOI: [10.1007/s10994-022-06261-1](https://doi.org/10.1007/s10994-022-06261-1) \n\nThe short demo paper ([video](https://youtu.be/zvcFYItwRlQ) and [slides](https://github.com/edahelsinki/slisemap/blob/data/slides/demo_slides.pdf)):\n> *Bj\u00f6rklund, A., M\u00e4kel\u00e4, J., & Puolam\u00e4ki, K. (2023).* \n> **SLISEMAP: Combining Supervised Dimensionality Reduction with Local Explanations.** \n> Machine Learning and Knowledge Discovery in Databases, ECML PKDD 2022. Lecture Notes in Computer Science, vol 13718. DOI: [10.1007/978-3-031-26422-1_41](https://doi.org/10.1007/978-3-031-26422-1_41).\n\n\n## Installation\n\nTo install the package just run:\n\n```sh\npip install slisemap\n```\n\nOr install the latest version directly from [GitHub](https://github.com/edahelsinki/slisemap):\n\n```sh\npip install git+https://github.com/edahelsinki/slisemap\n```\n\nTo use the built-in hyperparameter tuning you also need `scikit-optimize`, which is automatically installed if you do:\n\n```sh\npip install slisemap[tuning]\n```\n\n### PyTorch\n\nSince SLISEMAP utilises PyTorch for efficient calculations, you might want to install a version that is optimised for your hardware. See [https://pytorch.org/get-started/locally](https://pytorch.org/get-started/locally/) for details.\n\n\n## Example\n\n```python\nimport numpy as np\nfrom slisemap import Slisemap\n\nX = np.array(...)\ny = np.array(...)\nsm = Slisemap(X, y, radius=3.5, lasso=0.01)\nsm.optimise()\nsm.plot(clusters=5, bars=5)\n```\n![Example plot of the results from using SLISEMAP on the *Auto MPG* dataset](docs/autompg.webp)\n\nTo use the faster SLIPMAP variant just replace the relevant lines:\n\n```python\nfrom slisemap import Slipmap\nsm = Slipmap(X, y, radius=2.0, lasso=0.01)\n```\n\nSee the [examples](https://github.com/edahelsinki/slisemap/tree/main/examples) for more detailed examples, and the [documentation](https://edahelsinki.github.io/slisemap/slisemap.html) for more detailed instructions.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Anton Bj\u00f6rklund, Jarmo M\u00e4kel\u00e4, and Kai Puolam\u00e4ki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "SLISEMAP: Combine local explanations with supervised dimensionality reduction",
"version": "1.6.2",
"project_urls": {
"documentation": "https://edahelsinki.github.io/slisemap",
"homepage": "https://github.com/edahelsinki/slisemap",
"repository": "https://github.com/edahelsinki/slisemap.git"
},
"split_keywords": [
"explainable ai",
" local explanation",
" dimensionality reduction",
" manifold visualization"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e42093a07039fa29d743a3f3c2a6c0e85bbae352a156ca83e2b103c466d12158",
"md5": "43a0ade4cd390e9a7d1b867bb91b47a3",
"sha256": "16cd857fcf2ec96e2501659939adae510c2af26197215fa4e9f17a0b94f1bc4a"
},
"downloads": -1,
"filename": "slisemap-1.6.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "43a0ade4cd390e9a7d1b867bb91b47a3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 63400,
"upload_time": "2024-04-30T09:09:35",
"upload_time_iso_8601": "2024-04-30T09:09:35.720322Z",
"url": "https://files.pythonhosted.org/packages/e4/20/93a07039fa29d743a3f3c2a6c0e85bbae352a156ca83e2b103c466d12158/slisemap-1.6.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a5214e946f31e94af3f7ef5ddf41d1e2ebd83ee65126a66220be8da8f1efb090",
"md5": "94d437c4c6b5da15f59304c1fb15bb87",
"sha256": "3d16e772ac3b5f75e427e802edd3443e116f87075523184578418386eea39b46"
},
"downloads": -1,
"filename": "slisemap-1.6.2.tar.gz",
"has_sig": false,
"md5_digest": "94d437c4c6b5da15f59304c1fb15bb87",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 69426,
"upload_time": "2024-04-30T09:09:37",
"upload_time_iso_8601": "2024-04-30T09:09:37.824550Z",
"url": "https://files.pythonhosted.org/packages/a5/21/4e946f31e94af3f7ef5ddf41d1e2ebd83ee65126a66220be8da8f1efb090/slisemap-1.6.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-30 09:09:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "edahelsinki",
"github_project": "slisemap",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "slisemap"
}