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.5

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.5
File Size Uploaded
xwhy-0.0.5.tar.gz 186.1 kB Details

Built distribution (wheel)

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

Total release size: 436.8 kB

Release files / xwhy-0.0.5.tar.gz

Download URL xwhy-0.0.5.tar.gz
Size 186.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bd68b617e86db9168ebf613061089a799d713ab6a660bd469bc80926cdf5fd85
BLAKE2b-256 checksum
How to use checksums
b43d3569c28f3c19d15e8abcf70c7b8f19c9c8284490fa3854afa36a1cbdb0d3
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 25, 2026.

Transparency log

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

Download URL xwhy-0.0.5-py3-none-any.whl
Size 250.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a49decfc7551f4593454f1a62b337c3b55468f66c224fb326300afca570160c
BLAKE2b-256 checksum
How to use checksums
3926f2829361577ffe147a8c43f906c1472acaee68915fb57c8e106ddc99e3d4
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 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

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