-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
game theory 🎲📕Game theory related issuesGame theory related issuesmaintenance 🔨Code enhancements, tests and maintenanceCode enhancements, tests and maintenance👌good first issueAn issue which should be a good first issue for getting into the library.An issue which should be a good first issue for getting into the library.
Milestone
Description
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
val_distributed = distribution_weights[moebius_size, len(interaction)] # Check if Möbius value is distributed onto this interaction if interaction in base_interaction_dict: base_interaction_dict[interaction] += moebius_val * val_distributed else: base_interaction_dict[interaction] = moebius_val * val_distributed shapiq/shapiq/game_theory/moebius_converter.py
Lines 199 to 204 in f3e9e7f
val_distributed = distribution_weights[moebius_size, len(interaction)] # Check if Möbius value is distributed onto this interaction if interaction in stii_dict: stii_dict[interaction] += moebius_val * val_distributed else: stii_dict[interaction] = moebius_val * val_distributed shapiq/shapiq/game_theory/moebius_converter.py
Lines 275 to 280 in f3e9e7f
val_distributed = distribution_weights[moebius_size, len(interaction)] # Check if Möbius value is distributed onto this interaction if interaction in fii_dict: fii_dict[interaction] += moebius_val * val_distributed else: fii_dict[interaction] = moebius_val * val_distributed
Alternatively, the returned InteractionValue could be sparsified upon return.
mmschlk
Metadata
Metadata
Assignees
Labels
game theory 🎲📕Game theory related issuesGame theory related issuesmaintenance 🔨Code enhancements, tests and maintenanceCode enhancements, tests and maintenance👌good first issueAn issue which should be a good first issue for getting into the library.An issue which should be a good first issue for getting into the library.
Projects
Status
📋 Backlog