Stabilized-LIME for Model Explanation
Project description
slime
This repository holds code for replicating experiments in papar S-LIME: Stabilized-LIME for Model Explanation to appear in KDD2021.
It is built on the implementation of LIME with added functionalities.
Introduction
It has been shown that post hoc explanations based on perturbations (such as LIME) exhibit large instability, posing serious challenges to the effectiveness of the method itself and harming user trust. S-LIME stands for Stabilized-LIME, which utilizes a hypothesis testing framework based on central limit theorem for determining the number of perturbation points needed to guarantee stability of the resulting explanation.
Installation
clone the repository and install using pip:
git clone https://github.com/ZhengzeZhou/slime.git
cd slime
pip install .
Usage
Currently, S-LIME only support tabular data and when feature selection method is set to "lasso_path". We are woring on extending the use cases to other data types and feature selection methods.
The following screenshot shows a typical usage of LIME on breasd cancer data. We can easily observe that two runs of the explanation algorithms result in different features being selected.
S-LIME is invoked by calling explainer.slime instead of explainer.explain_instance. n_max indicates the maximum number of sythetic samples to generate and alpha denotes the significance level of hypothesis testing. S-LIME explanations are guranteed to be stable under high probability.
Notebooks
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stabilized_lime-0.1.0.tar.gz.
File metadata
- Download URL: stabilized_lime-0.1.0.tar.gz
- Upload date:
- Size: 284.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
429d4132a1714cbda650019ae64935c7c6807adc47ece9362fe49fedbace9805
|
|
| MD5 |
2c44c8ece76396f2e54fe1f464b9d3ac
|
|
| BLAKE2b-256 |
c21836d1adff595a83390fb1ba86c8a8c4b4c58b9958158d637e898567121fc9
|
File details
Details for the file stabilized_lime-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stabilized_lime-0.1.0-py3-none-any.whl
- Upload date:
- Size: 293.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9606620379b8f7028016c4ba6dcf7e114fd6e465b269a1d865696b71b2a9c08d
|
|
| MD5 |
bbe82f9c3aae4e91fd173ac003669a03
|
|
| BLAKE2b-256 |
c29aa85bf69ba481db023d5eee63dd82b16853d178b3f0652549ed19ac80d814
|