shapiq.game_theory.get_bernoulli_weights¶

shapiq.game_theory.get_bernoulli_weights(order)[source]¶

Returns the bernoulli weights in the k-additive approximation via SII.

For some indices like 'kADD-SHAP', the weights must be scaled with the Bernoulli numbers.

Parameters:

order (int) – The highest order of interactions.

Return type:

ndarray

Returns:

An array containing the bernoulli weights for the k-additive approximation.