shapiq.utilsΒΆ
Low-level utility functions for working with subsets, coalitions, and modules.
Functions
Return a powerset of an iterable as tuples with optional size limits. |
|
Determines what subset sizes are paired together. |
|
Determines which subset sizes can be computed explicitly and which sizes need to be sampled. |
|
Enumerates all subsets of the given sizes and returns a one-hot matrix. |
|
Generates a lookup dictionary for interactions. |
|
Generates a lookup dictionary for interactions based on an array of coalitions. |
|
Transforms a collection of coalitions to a binary array (one-hot encodings). |
|
Transforms a 2d one-hot matrix of coalitions into a list of tuples. |
|
Counts the number of interactions for a given number of players and maximum order. |
|
Safely checks if an object is an instance of a class. |
|
Check if the optional dependency is available. |
|
Shuffle the data. |
|
Raise a deprecation warning with the given details. |