SHAPley Interaction Quantification (SHAP-IQ) for Explainable AI
Project description
SHAP-IQ: SHAP Interaction Quantification
An interaction may speak more than a thousand main effects.
SHAP Interaction Quantification (short SHAP-IQ) is an XAI framework extending on the well-known shap
explanations by introducing interactions to the equation.
Shapley interactions extend on indivdual Shapley values by quantifying the synergy effect between machine learning entities such as features, data points, or weak learners in ensemble models.
Synergies between these entities (also called players in game theory jargon) allows for a more intricate evaluation of your black-box models!
🛠️ Install
shapiq is intended to work with Python 3.9 and above. Installation can be done via pip
:
pip install shapiq
⭐ Quickstart
📈 Compute n-SII values
📊 Visualize your Interactions
One handy way of visualizing interaction scores (up to order 2) are network plots. You can see an example of such a plot below. The nodes represent attribution scores and the edges represent the interactions. The strength and size of the nodes and edges are proportional to the absolute value of the attribution scores and interaction scores, respectively.
from shapiq.plot import network_plot
network_plot(
first_order_values=n_sii_first_order, # first order n-SII values
second_order_values=n_sii_second_order # second order n-SII values
)
The pseudo-code above can produce the following plot (here also an image is added):
📖 Documentation
The documentation for shapiq
can be found here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file shapiq-0.0.4.tar.gz
.
File metadata
- Download URL: shapiq-0.0.4.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc288d2d184580d6769275c16b07f1ce09e0ffa7668a1c9671a133042d08b6d4 |
|
MD5 | add08e184de82346486d50657b921666 |
|
BLAKE2b-256 | ca715736df21b5a9eef0ef1dfdb00f56f9951bda9733044ab83b0cc542803e3a |
Provenance
File details
Details for the file shapiq-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: shapiq-0.0.4-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 882d23f3d81ae6b07d1397daa1746b64db166acbaaa4a8104ee6716f6e0633b1 |
|
MD5 | 7403b365120954f3fabad22a5f3d07c2 |
|
BLAKE2b-256 | 57ff226cd1ade37facc336255e60fa6e20d6a26b92f101e53168b72b1d878351 |