shapiq.approximator.RegressionFSIIΒΆ

class shapiq.approximator.RegressionFSII(n, max_order=2, *, pairing_trick=False, sampling_weights=None, random_state=None, **kwargs)[source]ΒΆ

Bases: Regression[Literal[β€˜FSII’, β€˜SV’]]

Estimates the FSII values using KernelSHAP.

The Faithful KernelSHAP regression is described in Tsai et al. (2023) Tsai et al. [2023]. The method estimates the Faithful Shapley interaction index (FSII).

See also

  • KernelSHAP: The KernelSHAP

    approximator for estimating the Shapley values.

  • KernelSHAPIQ: The KernelSHAPIQ

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

Initialize the RegressionFSII 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[Literal['FSII', 'SV'], ...] = ('FSII', 'SV')ΒΆ

The valid indices for the RegressionFSII approximator.