Skip to main content

Reimplementation of Anchors: High-Precision Model-Agnostic Explanations.

Project description

Ginger Anchors

Implementation and Extensions of Anchors: High-Precision Model-Agnostic Explanations. The re-implementation was done in the iML lecture (WS21/22).

Contributions

  • Implementation of Anchors via the Bottom-up construction approach.
  • Implementation of Beam Search on top of the Bottom-up construction.
  • Simple interfaces with well-splitted main functions.
  • Analysis on how 𝐵, 𝛿 and 𝜖 influence the results.
  • SMAC3 as alternative anchor finder.

References

Installation

Note: swig is needed to install SMAC3. See installation instructions.

Create a conda environment

$ conda create -n GingerAnchors python=3.9
$ conda activate GingerAnchors
$ pip install ginger-anchors

Usage

You can get an explanation by setting up an Explainer and calling one of three search functions.

exp = Explainer(X_df)
anchor = exp.explain_bottom_up(instance, model, tau=0.95)
print(anchor.get_explanation())

For a more detailed example, see src/main.py.

Analysis

The plots were too large to put them into this repository. Please download them from seafile. To reproduce the raw data, run:

ginger-anchors> python src/analysis.py

A preview can be found in our writeup: analysis.md

Authors

Jim Rhotert & Julian Bilsky

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ginger_anchors-0.1.tar.gz (17.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page