Skip to main content

XAI-metrics

A package for analysis and evaluating metrics for machine learning models explainability.

Installation

Install from PyPI:

pip install xai-metrics

Usage

Examples of usage:

  • Perturbation based on permutation importances
from xai_metrics import examine_interpretation

X_train.columns = ['0','1','2','3']
X_test.columns = ['0','1','2','3']
xgb_model = xgb.XGBClassifier()
xgb_model.fit(X_train, y_train)
perm = PermutationImportance(xgb_model, random_state=1).fit(X_test, y_test)
perm_importances = perm.feature_importances_

examine_interpretation(xgb_model, X_test, y_test, perm_importances, epsilon=4, resolution=50, proportionality_mode=0)

Perturbation based on permutation importances

  • Perturbation based on local importances
from xai_metrics import examine_local_fidelity

examine_local_fidelity(xgb_model, X_test, y_test, epsilon=3)

Perturbation based on permutation importances

  • Gradual elimination
from xai_metrics import gradual_elimination

gradual_elimination(f_forest, f_X_test, f_y_test, f_shap)

Perturbation based on permutation importances

See here for notebooks with full examples of usage.

Metadata

Release files for xai-metrics 0.0.2

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

Source distribution (sdist)

Source distribution for xai-metrics 0.0.2
File Size Uploaded Provenance Actions
xai-metrics-0.0.2.tar.gz 5.2 kB Without provenance Details for xai-metrics-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xai-metrics 0.0.2
File Interpreter ABI Platform Actions
xai_metrics-0.0.2-py3-none-any.whl Python 3 none any Details for xai_metrics-0.0.2-py3-none-any.whl

Total release size: 11.6 kB

Release files / xai-metrics-0.0.2.tar.gz

Download URL xai-metrics-0.0.2.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d5fa4818095be5ba1263f83cc2bc13f6ca145b85827fcf57c735734b81e5f8ce
BLAKE2b-256 checksum
How to use checksums
c25376b8582ebcfaa9a7ec3a5e2d3bfb4625c35c70a8802d63a02660cdf0b5c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / xai_metrics-0.0.2-py3-none-any.whl

Download URL xai_metrics-0.0.2-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f38b181f47e4ec1b05fcb4078f56e29aa77ddb0227c60edc4c2d9474d710b03
BLAKE2b-256 checksum
How to use checksums
7c9c6618a8a74e7506cf3e2d4970217466d566af90748f8237f8dbc573c0ea64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Security for xai-metrics 0.0.2

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

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