Multimodal explainability tool for NLP based on Shapley value.
Project description
📦 nlp-shap
Multimodal explainability for NLP and multimodal models based on Shapley-style cooperative game theory.
Installation
pip install nlp-shap
From source:
git clone https://github.com/Pawlo77/nlp-shap
cd nlp-shap
make install
Requires Python 3.12 and uv.
Documentation
Full documentation: pawlo77.github.io/nlp-shap
Examples
Runnable Jupyter notebooks in examples/:
| Notebook | What it demonstrates |
|---|---|
estimands_toy_game.ipynb |
Shapley vs Banzhaf aggregators, coalition weights, labelled results, manifests, plugin entry points |
masking_views.ipynb |
Token partitioning, absence policies, masked views, mask codec, mask space, plugin registry |
Setup and details: examples/README.md. Embedded walkthroughs: docs/examples.
Development
make install
make check
Run make help for other targets.
License
Apache License 2.0. See LICENSE.
Copyright 2026 Paweł Pozorski.
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
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 nlp_shap-0.1.3.tar.gz.
File metadata
- Download URL: nlp_shap-0.1.3.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f14193315d5ef3ad0a5fcd31d2c849afc5c5f25d1e9846461f6f3df6491e31f3
|
|
| MD5 |
d71948e220f8e80021702c580368a583
|
|
| BLAKE2b-256 |
ef99220ca444046729095bd07c19421426b5351cb1036b45eb032dc2b1982ed1
|
File details
Details for the file nlp_shap-0.1.3-py3-none-any.whl.
File metadata
- Download URL: nlp_shap-0.1.3-py3-none-any.whl
- Upload date:
- Size: 32.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e084901c68c6c629de1b4e181028af59e683414f997209054a5d54a63f31e053
|
|
| MD5 |
28ca0f93688be56a5bf1176c077a04e5
|
|
| BLAKE2b-256 |
3d868a7b4b521f87a82352f8955d6b3768cbe780deed314ba431b4be04cf658a
|