Skip to main content

DeltaXplainer, XAI model comparison and explanations

Documentation Status (documentation not up to date)

Package for DeltaXplainer model implemented from the paper Dynamic Interpretability for Model Comparison via Decision Rules, A Rida, MJ Lesot, X Renard, C Marsala, DynXAI workshop at ECML PKDD 2023, https://arxiv.org/pdf/2309.17095.pdf

DeltaXplainer is an algortihm aiming at explaining differences between two black box binary classifiers.

DeltaXplainer Schema

The models takes as input the two models to compare and generate explanations. The package is originally built to support comparison of sklearn models but any object with a predict method doing binary classification should work.

The explanations are provided using decision rules. We propose to answer to the question "Why are the models different?" by showing "Where" they differ.

The explanations are a list of segments where the two black box models make different predictions.

Ideas for future improvements include considering other explanations format and ways to extract knowledge from the delta model.

Installation

pip install deltaxplainer

Getting Started

In order to have a hands on example please refer to this notebook

Generating Explanations

Assuming you want to explain differences between classifer_a and classifer_b trained on X_a, y_a and X_b, y_b

For more details on how the method works please refer to the original paper.

from deltaxplainer import DeltaXplainer

delta_model = DeltaXplainer(X_a, X_b, model_a, model_b).fit()

print(delta_model.segments)

This last line gives you a list of segments where the two models differ.

[under construction]

Metadata

Release files for deltaxplainer 1

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

Source distribution (sdist)

Source distribution for deltaxplainer 1
File Size Uploaded Provenance Actions
deltaxplainer-1.tar.gz 4.7 kB Without provenance Details for deltaxplainer-1.tar.gz

Release files / deltaxplainer-1.tar.gz

Download URL deltaxplainer-1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
988f8c443fe7f91b7d0eb8a2e6f3ced7916c2e8b33c189aab49acbeb52e998cd
BLAKE2b-256 checksum
How to use checksums
ab7519187f8506941e2248987f2d6f66a3d826bb416757ba167651bc034d5de2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Security for deltaxplainer 1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

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