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
- Paper Reference: https://homes.cs.washington.edu/~marcotcr/aaai18.pdf
- Code Reference: https://github.com/marcotcr/anchor
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
Metadata
Release files for ginger-anchors 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ginger_anchors-0.1.tar.gz | 17.8 kB | Without provenance | Details for ginger_anchors-0.1.tar.gz |
Release files / ginger_anchors-0.1.tar.gz
| Download URL | ginger_anchors-0.1.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ed375a016c820451e83de88a2ae0a4b9b2a7e770c4aebd5d5dfc073f90a5485
|
|
BLAKE2b-256 checksum How to use checksums |
4da4565209aa3e265df51bc90f1177310b200856077c5e7c4929e511ce1f811f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.10
|
Security for ginger-anchors 0.1
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.