X-Why
XWhy: eXplain Why with SMILE -- Statistical Model-agnostic Interpretability with Local Explanations
Installation
pip install xwhy
Simple Example
import xwhy
import xgboost
# train an XGBoost model
X, y = xwhy.datasets.boston()
model = xgboost.XGBRegressor().fit(X, y)
# explain the model's predictions using xwhy
# (same syntax works for LightGBM, CatBoost, scikit-learn, transformers, Spark, etc.)
explainer = xwhy.Explainer(model)
xwhy_values = explainer(X)
# visualize the first prediction's explanation
xwhy.plots.waterfall(xwhy_values[0])
Citations
It would be appreciated a citation to our paper as follows if you use X-Why for your research:
@article{Aslansefat2021Xwhy,
author = {{Aslansefat}, Koorosh and {Hashemian}, Mojgan and {Martin}, Walker and {Papadopoulos}, Yiannis},
title = "{SMILE: Statistical Model-agnostic Interpretability with Local Explanations}",
journal = {arXiv e-prints},
year = {2021},
url = {https://arxiv.org/abs/...},
eprint = {},
}
Acknowledgment
This project is supported by the Secure and Safe Multi-Robot Systems (SESAME) H2020 Project under Grant Agreement 101017258.
Contribution
If you are interested in contributing to this project, please check the contribution guidelines.
Metadata
Release files for xwhy 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xwhy-0.0.6.tar.gz | 186.1 kB | With provenance | Details for xwhy-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xwhy-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for xwhy-0.0.6-py3-none-any.whl |
Total release size: 436.8 kB
Release files / xwhy-0.0.6.tar.gz
| Download URL | xwhy-0.0.6.tar.gz |
|---|---|
| Size | 186.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0df07c6f9a503711e6b56a982ac4993f76b409e636a22b1492b4b9edcb96850
|
|
BLAKE2b-256 checksum How to use checksums |
afe73db9a6319b7f8afc19cfcd9e842ca5e3f2cf26d7254cc6047110dfa4424e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / xwhy-0.0.6-py3-none-any.whl
| Download URL | xwhy-0.0.6-py3-none-any.whl |
|---|---|
| Size | 250.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ecfea2dddfc6a99fa62a09552baf3f087b58c0c926e39ddc24b6e5b795ffaf9
|
|
BLAKE2b-256 checksum How to use checksums |
8e9e38466c29aa3576990fb40fc5255e0724ccaeacf62f3d66733c3ad23d53e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logSecurity for xwhy 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for xwhy-0.0.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.