Skip to main content

SLISEMAP: Combine local explanations with supervised dimensionality reduction

Project description

PyPI Documentation Tests Licence: MIT Binder

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 consist of white box 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 full paper (arXiv), the demo paper, the demo video (slides), the examples, or the documentation.

Citation

Björklund, A., Mäkelä, J. & Puolamäki, K. (2022).
SLISEMAP: Supervised dimensionality reduction through local explanations.
Machine Learning, DOI 10.1007/s10994-022-06261-1

Installation

To install the package just run:

pip install slisemap

Or install the latest version directly from GitHub:

pip install git+https://github.com/edahelsinki/slisemap

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 for details.

Example

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

See the examples for more detailed examples, and the documentation for more detailed instructions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slisemap-1.3.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

slisemap-1.3.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file slisemap-1.3.0.tar.gz.

File metadata

  • Download URL: slisemap-1.3.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for slisemap-1.3.0.tar.gz
Algorithm Hash digest
SHA256 ce1f3c4b9cffa89e23450a08ccbd1534c651fe50a21baa2335a387b8524173ec
MD5 c59b93b6f63d50e1f1fc0daf1df3bf31
BLAKE2b-256 cc8d211e821c68f73fa6fd809d24a831d754efc5f3907c50f82121f2fb831efa

See more details on using hashes here.

File details

Details for the file slisemap-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: slisemap-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for slisemap-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 745b9c6d6782844e609ef62ae4c2fd16056e8ee3935d29baf6a50b1a0210da5e
MD5 05cade957c12400182843fb315073730
BLAKE2b-256 e7e3f0bcdd0097c36537573eafb78381d330d1ce59c5f0233b42626db510e9db

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page