Implementation and Extensions of Anchors
- 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:
- Paper Reference: https://homes.cs.washington.edu/~marcotcr/aaai18.pdf
- (Original) Code Reference: https://github.com/marcotcr/anchor
Create a conda environment
$ conda env create
$ conda activate ginger-anchorsNote: swig is needed to install smac3. See installation instructions.
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.
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.pyA preview can be found in our writeup: analysis.md