Skip to main content

codecov GitHub - License Lint Continuous Integration Continuous Deployment PyPi package

TEACHER: Trustable Extensible Aggregator of CompreHensive Explainers

TEACHER is an open source Python Library that incorporates several state-of-the-art explainability techniques that can be used for model interpretation and explanation. The objective of the library is to be extensible with new tools and algorithms while keeping compatibility with the most used machine learning models such as scikit-learn.

This project was started in 2020 as the Ph.D. Thesis of Guillermo Tomás Fernández Martín, whose advisors are José Antonio Gámez Martín and José Miguel Puerta Callejón.

Website: https://xai-teacher.readthedocs.io/en/latest/

Installation

Dependencies

Teacher requires:

* Python (>=3.9)
* scikit-learn 
* scikit-fuzzy
* matplotlib (for plotting functions)
* deap (for compatibility with the LORE algorithm)
* imblearn (for compatibility with the LORE algorithm)

IMPORTANT Install scikit-fuzzy from their GitHub as the PyPi version is obsolete:

pip install git+https://github.com/scikit-fuzzy/scikit-fuzzy

User installation

If you already have a working installation, you can install teacher with

pip install -U teacher-xai

The documentation includes more detailed instructions.

Usage

For detailed instructions on how to use teacher, please refer to the API Reference

Supported Methods

The following list summarizes the models and explainers currently supported

  • Fuzzy Factuals and Counterfactuals: Explainer obtained from a fuzzy tree that can be used for global or local explanations
  • LORE: Local explainer generated from a neighborhood
  • FLARE: Fuzzy local explainer generated from a neighborhood

Metrics

The following list summarizes the metrics and scores that can be extracted from the explainers

General metrics

  • Coverage: How many instances are covered by the rules forming the explanation
  • Precision: How many of the instances covered by the rules forming the explanation are properly classified

Local neighborhood metrics

  • Fidelity: How good is the local explainer at mimicking the global classifier in the neighborhood
  • L-fidelity (Rule fidelity): How good is the local explainer at mimicking the global classifier in the instances of the neighborhood covered by the factual explanation
  • Cl-fidelity: How good is the local explainer at mimicking the global classifier in the instances of the neighborhood covered by the counterfactual explanation (To be implemented)
  • Hit: Does the local explainer match the global classifier result? (To be implemented)
  • C-hit: Does the local explainer match the global classifier result for tan instance built from the counterfactual rule? (To be implemented)

References and Examples

Release files for teacher-xai 1.0.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 teacher-xai 1.0.1
File Size Uploaded
teacher-xai-1.0.1.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for teacher-xai 1.0.1
File Interpreter ABI Platform
teacher_xai-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.3 MB

Release files / teacher-xai-1.0.1.tar.gz

Download URL teacher-xai-1.0.1.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
841db2695841a64caa6e7e5c815387e648cb41ae912ba7b68702865f1d4fdd25
BLAKE2b-256 checksum
How to use checksums
b74e4d00ff6a1cb7f14e4f2b365ab9de3d4100808b0f4ae2e90212b33c4eb131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / teacher_xai-1.0.1-py3-none-any.whl

Download URL teacher_xai-1.0.1-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b757799de6c1663ab022ffc508efc07c67bf83a649cfbe15776d00ef1366ebf7
BLAKE2b-256 checksum
How to use checksums
cd02fb0787f57d1f90c037c0aac53cf1d0401f123f963c4a438379e4a5295194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.0

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