shapiq.approximator.permutation.sti#
This module contains the permutation sampling algorithms to estimate STI scores.
Classes
|
Permutation Sampling approximator for the Shapley Taylor Index (STI). |
- class shapiq.approximator.permutation.sti.PermutationSamplingSTI(n, max_order, random_state=None)[source]#
Bases:
Approximator
Permutation Sampling approximator for the Shapley Taylor Index (STI).
- Parameters:
- n#
The number of players.
- max_order#
The interaction order of the approximation.
- min_order#
The minimum order to approximate.
- iteration_cost#
The cost of a single iteration of the permutation sampling.
Example
>>> from games import DummyGame >>> from approximator import PermutationSamplingSTI >>> game = DummyGame(n=5, interaction=(1, 2)) >>> approximator = PermutationSamplingSTI(n=5, max_order=2) >>> approximator.approximate(budget=200, game=game) InteractionValues( index=STI, order=2, estimated=True, estimation_budget=165, values={ (0,): 0.2, (1,): 0.2, (2,): 0.2, (3,): 0.2, (4,): 0.2, (0, 1): 0, (0, 2): 0, (0, 3): 0, (0, 4): 0, (1, 2): 1.0, (1, 3): 0, (1, 4): 0, (2, 3): 0, (2, 4): 0, (3, 4): 0 } )