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 KernelSHAP

    approximator for estimating the Shapley values.

  • InconsistentKernelSHAPIQ: The

    Inconsistent KernelSHAP-IQ approximator for estimating the Shapley interaction index (SII) and the k-Shapley interaction index (k-SII).

  • KernelSHAPIQ: The KernelSHAP-IQ

    approximator 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 to 2.

  • pairing_trick (bool) – If True, the pairing trick is applied to the sampling procedure. Defaults to False.

  • 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 to None.

  • random_state (int | None) – The random state of the estimator. Defaults to None.

  • **kwargs (Any) – Additional keyword arguments (not used, only for compatibility).

valid_indices: tuple[TIndices, ...] = ('kADD-SHAP',)¶

The valid indices for this approximator.