shapiq_benchmark.computers.MoebiusComputer

class shapiq_benchmark.computers.MoebiusComputer(game)[source]

Bases: Computer[SOUM | UnanimityGame | DummyGame]

Synthetic games with a known Möbius representation, via MoebiusConverter.

Supports SOUM, UnanimityGame and DummyGame, for any number of players. Besides the indices of the converter, it returns the Möbius transform itself ("Moebius"), which is sparse.

Bind the computer to a game.

Parameters:

game (TypeVar(G, bound= Game)) – The game whose exact values the computer computes.

Raises:

UnsupportedComputationError – If the computer cannot handle the game.

classmethod supported_indices()[source]

The indices of MoebiusConverter, and "Moebius".

Return type:

tuple[Literal['SII', 'BII', 'CHII', 'Co-Moebius', 'SGV', 'BGV', 'CHGV', 'IGV', 'EGV', 'k-SII', 'STII', 'FSII', 'kADD-SHAP', 'FBII', 'SV', 'BV', 'JointSV', 'Moebius', 'Fourier', 'ELC'], ...]

classmethod supports_game(game)[source]

Games whose Möbius representation is known.

Return type:

bool

exact_values(index, order)

Compute the exact interaction values of order 1 to order.

Parameters:
  • index (Literal['SII', 'BII', 'CHII', 'Co-Moebius', 'SGV', 'BGV', 'CHGV', 'IGV', 'EGV', 'k-SII', 'STII', 'FSII', 'kADD-SHAP', 'FBII', 'SV', 'BV', 'JointSV', 'Moebius', 'Fourier', 'ELC']) – The interaction index, e.g. "k-SII".

  • order (int) – The highest interaction order.

Return type:

InteractionValues

Returns:

The interactions of order 1 to order, with the game’s empty value as baseline.

Raises:

UnsupportedComputationError – If (index, order) is not supported.

max_order()

Return the highest supported interaction order (the number of players by default).

Return type:

int

supports(index, order)

Return whether the computer can compute index up to order for its game.

Return type:

bool

game
name = 'moebius'

A short, stable name of the computer (part of ground-truth cache keys).