You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the conversion from a sparse Möbius representation to another index, sometimes many value 0 interactions are added to the returned InteractionValues.
This is because interactions are added to the interaction_dict, even if their coefficient is 0.
@landonbutler, thanks for pointing this out! If moebius_val * val_distributed is zero do not need to be added to the interaction dictionaries. You are right! If this is not not too much of a problem currently, you could take a look at InteractionValues.sparsify() which does this (however only post hoc and requiring another loop over the interactions.
Nevertheless, the creation could still be optimized further and I will keep track of this here. :)
During the conversion from a sparse Möbius representation to another index, sometimes many value 0 interactions are added to the returned InteractionValues.
This is because interactions are added to the interaction_dict, even if their coefficient is 0.
shapiq/shapiq/game_theory/moebius_converter.py
Lines 125 to 130 in f3e9e7f
shapiq/shapiq/game_theory/moebius_converter.py
Lines 199 to 204 in f3e9e7f
shapiq/shapiq/game_theory/moebius_converter.py
Lines 275 to 280 in f3e9e7f
Alternatively, the returned InteractionValue could be sparsified upon return.
The text was updated successfully, but these errors were encountered: