Skip to content

rhotertj/anchors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anchors

Implementation and Extensions of Anchors

Content

  • Reproduction (10): Implement Anchors via the Bottom-up Construction approach.
  • Extension (10): Implement Beam Search on top of the Bottom-up Construction.
  • Analysis (5): Perform an analysis on how 𝐵, 𝛿 and 𝜖 influence the results.
  • Alternative Optimizer (10): Replace Beam Search/Bottom-up Construction with SMAC (Bayesian Optimization)

References:

Installation

Create a conda environment

$ conda env create
$ conda activate ginger-anchors

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

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

About

Implementation of Anchors for model interpretation

Resources

Stars

Watchers

Forks

Contributors