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.2.1.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

slisemap-1.2.1-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slisemap-1.2.1.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for slisemap-1.2.1.tar.gz
Algorithm Hash digest
SHA256 2f4b8a22833446a928b4d4ceff91fab5d653c6baa30d1d507a779dcfe513ee45
MD5 65c70f6070177f8e95008b2264483033
BLAKE2b-256 45410c47b25e422839974d33f4acaf96149d626f152b3c2c9d3594ff177980bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slisemap-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for slisemap-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 61d43816d4da31cb80b9ebf7a095849740b9b25f6c6fdee5d0889df26c0bba8d
MD5 e6e2e6d581dc1bd0aa53b44fd865fa72
BLAKE2b-256 3319b096210d92435c21a1df709acb133fb8d946ceeffa097630b9201e2ef7f3

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