Skip to main content

SLISEMAP: Combine local explanations with supervised dimensionality reduction

Project description

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 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, the demo paper, the demonstration video (slides), the examples directory, or the documentation.

Citation

Björklund, A., Mäkelä, J. & Puolamäki, K. (2022).
SLISEMAP: Supervised dimensionality reduction through local explanations.
arXiv:2201.04455 [cs], https://arxiv.org/abs/2201.04455.

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.001)
sm.optimise()
sm.plot(clusters=4, bars=5)

Example plot of the results from using SLISEMAP on the Auto MPG dataset

See the examples directory 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.0.4.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

slisemap-1.0.4-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for slisemap-1.0.4.tar.gz
Algorithm Hash digest
SHA256 9949d50dd685ef797f4e0d6bfb49a3a15181788beb094cf61507a4239b4b17e0
MD5 5350e18f5baba3285b99515e62e58821
BLAKE2b-256 4b7ff60b1172d8ce06da3ed2c79c32894607de0709d19f64b35e8bcd28058243

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for slisemap-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 97def2b28c12c64400f13572b4a3be6f78e85bc2d1b9765a0967ccfe872fe26c
MD5 92890e05f4050331d8383ff3fb05f23f
BLAKE2b-256 c04cbe8e2a739eea126525a8ca6918befdd236d38f87f1aa18bbae53a3a0fd27

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