shapiq.approximator.kADDSHAP¶
- class shapiq.approximator.kADDSHAP(n, max_order=2, *, pairing_trick=False, sampling_weights=None, random_state=None, **kwargs)[source]¶
Bases:
Regression[Literal[‘kADD-SHAP’]]The kADD-SHAP regression approximator for estimating the kADD-SHAP values.
Estimates the kADD-SHAP values using the kADD-SHAP regression algorithm. The Algorithm is described in Pelegrina et al. (2023) Pelegrina et al. [2023] and is related to Inconsistent KernelSHAP-IQ Fumagalli et al. [2024].
See also
KernelSHAP: The KernelSHAPapproximator for estimating the Shapley values.
InconsistentKernelSHAPIQ: TheInconsistent KernelSHAP-IQ approximator for estimating the Shapley interaction index (SII) and the k-Shapley interaction index (k-SII).
KernelSHAPIQ: The KernelSHAP-IQapproximator for estimating the Shapley interaction index (SII) and the k-Shapley interaction index (k-SII).
Initialize the kADD-SHAP approximator.
- Parameters:
n (
int) – The number of players.max_order (
int) – The interaction order of the approximation. Defaults to2.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.**kwargs (
Any) – Additional keyword arguments (not used, only for compatibility).