Examples & Tutorials¶
A collection of examples and tutorials demonstrating how to use shapiq
for computing and visualizing Shapley interactions.
Approximators¶
Examples demonstrating each approximator in shapiq on the same
synthetic cooperative game. All examples use a lightweight callable
game with 8 players so they execute in under a second.
Basics¶
Introductory examples covering core shapiq concepts: Shapley value computation,
custom cooperative games, and parallel computation.
Game Theoretic Concepts¶
Examples exploring game-theoretic concepts beyond Shapley values, such as the Core and the Egalitarian Least Core.
Language Models¶
Examples demonstrating how to explain language model predictions
using shapiq with token-based cooperative games.
Nearest Neighbor Models¶
Examples for data valuation using efficient explanations of nearest-neighbor models.
Tabular Models¶
Examples for explaining tabular machine-learning models with shapiq,
including scikit-learn, XGBoost, and TabPFN models.
Tree Models¶
Examples demonstrating TreeSHAP-IQ for explaining tree-based models, including LightGBM and custom tree structures.
Vision Models¶
Examples demonstrating how to explain image classification models
using shapiq with image patch-based cooperative games.
Visualization¶
Examples showcasing shapiq’s visualization capabilities: force plots,
beeswarm plots, SI graph plots, UpSet plots, and more.