Skip to main content

License: MIT Standard - \Python Style Guide

X-Why

XWhy: eXplain Why with SMILE -- Statistical Model-agnostic Interpretability with Local Explanations

XWhy, SMILE, Explainability, Interpretability, XAI, machine learning explainability, responsible ai

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.

Release files for xwhy 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xwhy 0.0.4
File Size Uploaded
xwhy-0.0.4.tar.gz 182.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xwhy 0.0.4
File Interpreter ABI Platform
xwhy-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 428.3 kB

Release files / xwhy-0.0.4.tar.gz

Download URL xwhy-0.0.4.tar.gz
Size 182.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3c7502760267e243b8b5ad90ac68484305a94708147132290ea7e30e2bbb0294
BLAKE2b-256 checksum
How to use checksums
e3f60fb3e7831c5249905e73f844087b787fa1aafdcf69a5f99c6b4c2d2619c1
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 24, 2026.

Transparency log

Release files / xwhy-0.0.4-py3-none-any.whl

Download URL xwhy-0.0.4-py3-none-any.whl
Size 246.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e8a12759dce893de70d0f0c6d327845aa72bd645d71a1919694ab52fb5f41cb
BLAKE2b-256 checksum
How to use checksums
6c62ac17ab4e9cfdef37575c927c6fa93fe2d3e2a43ba8bd428ba907207109f4
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.0.5

2 release files

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page