API Reference#

This page contains the API reference for public objects and functions in shapiq.

shapiq.explainer

This module contains the explainer for the shapiq package.

shapiq.approximator

This module contains the approximators to estimate the Shapley interaction values.

shapiq.plot

This module contains all plotting functions for the shapiq package.

shapiq.utils

This module contains utility functions for the shapiq package.

Approximators#

shapiq.approximator.ShapIQ

The ShapIQ estimator.

shapiq.approximator.PermutationSamplingSII

Permutation Sampling approximator for the SII (and k-SII) index.

shapiq.approximator.PermutationSamplingSTI

Permutation Sampling approximator for the Shapley Taylor Index (STI).

shapiq.approximator.RegressionFSI

Estimates the FSI values [1] using the weighted least square approach.

Plotting#

shapiq.plot.network

This module contains the network plots for the shapiq package.

Utils#

shapiq.utils.powerset

Return a powerset of an iterable as tuples with optional size limits.

shapiq.utils.get_explicit_subsets

Enumerates all subsets of the given sizes and returns a one-hot matrix.

shapiq.utils.split_subsets_budget

Determines which subset sizes can be computed explicitly and which sizes need to be sampled.