shapiq.approximator.SVARM¶
- class shapiq.approximator.SVARM(n, index='SV', *, random_state=None, pairing_trick=False, sampling_weights=None, **kwargs)[source]¶
Bases:
MonteCarlo[Literal[‘SV’, ‘BV’]]The SVARM approximator for estimating the Shapley value (SV).
SVARM is a MonteCarlo approximation algorithm that estimates the Shapley value. For details about the algorithm see the original paper by Kolpaczki et al. (2024) Kolpaczki et al.[1].
References
Initialize the SVARM approximator.
- Parameters:
n (
int) – The number of players.index (
Literal['SV','BV']) – The interaction index to be used. Choose from['SV', 'BV']. Defaults to'SV'.random_state (
int|None) – The random state of the estimator. Defaults toNone.pairing_trick (
bool) – IfTrue, the pairing trick is applied to the sampling procedure. Defaults toFalse.sampling_weights (
ndarray[tuple[Any,...],dtype[floating]] |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.**kwargs (
Any) – Additional keyword arguments (not used only for compatibility).