shapiq.approximator.InconsistentKernelSHAPIQ¶
- class shapiq.approximator.InconsistentKernelSHAPIQ(n, max_order=2, index='k-SII', *, pairing_trick=False, sampling_weights=None, random_state=None)[source]¶
Bases:
Regression[Literal[‘k-SII’, ‘SII’, ‘SV’]]The Inconsistent KernelSHAP-IQ regression approximator.
The Inconsistent KernelSHAP-IQ regression approximator for estimating the Shapley interaction index (SII) and the k-Shapley interaction index (k-SII).
Inconsistent KernelSHAP-IQ Pelegrina et al. [2023] is a variant of the KernelSHAP-IQ estimator that does not converge to the true SII values, but often provides better estimates for lower computational budgets. The algorithm is also similar to kADD-SHAP Pelegrina et al. [2023]. For details, we refer to Fumagalli et al. (2024) Fumagalli et al. [2024].
See also
KernelSHAPIQ: The KernelSHAPIQapproximator for estimating the Shapley interaction index (SII) and the k-Shapley interaction index (k-SII).
KernelSHAP: The KernelSHAPapproximator for estimating the Shapley values.
kADDSHAP: The kADD-SHAP approximatorfor estimating the kADD-SHAP values.
RegressionFSII: The Faithful KernelSHAPapproximator for estimating the Faithful Shapley interaction index (FSII).
Initialize the Inconsistent KernelSHAP-IQ approximator.
- Parameters:
n (
int) – The number of players.max_order (
int) – The interaction order of the approximation. Defaults to2.index (
Literal['k-SII','SII','SV']) – The interaction index to be used. Choose from['k-SII', 'SII']. Defaults to'k-SII'.pairing_trick (
bool) – IfTrue, the pairing trick is applied to the sampling procedure. Defaults toFalse.sampling_weights (
ndarray|None) – An optional array of weights for the sampling procedure. The weights must be of shape(n + 1,)and are used to determine the probability of sampling a coalition of a certain size. Defaults toNone.random_state (
int|None) – The random state of the estimator. Defaults toNone.