computation of moebius transform through moebius_transform() is faster than using shapley_base_interaction(). The latter uses a loop over powerset(grand_coalition) and within loops over powerset(grand_coalition, max_size=k), where k=n for Moebius whereas moebius_transform() requires the inner loop only over powerset(subset from outer loop). While shapley_base_interaction is convenient to compute different values, I assume that other computations could also be quicker with other loops, e.g. Co-Moebius.
The base_interaction() function also allows to only compute up to order k, maybe we could add this to moebius_transform(). In general, I would support having separate functions for each index that are optimized for each index.
Originally posted by @FFmgll in #450 (review)
computation of moebius transform through
moebius_transform()is faster than usingshapley_base_interaction(). The latter uses a loop overpowerset(grand_coalition)and within loops overpowerset(grand_coalition, max_size=k), where k=n for Moebius whereasmoebius_transform()requires the inner loop only overpowerset(subset from outer loop). While shapley_base_interaction is convenient to compute different values, I assume that other computations could also be quicker with other loops, e.g. Co-Moebius.The
base_interaction()function also allows to only compute up to order k, maybe we could add this tomoebius_transform(). In general, I would support having separate functions for each index that are optimized for each index.Originally posted by @FFmgll in #450 (review)