Skip to content

365 potentially remove interactionvaluesvalues #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Advueu963
Copy link
Collaborator

@Advueu963 Advueu963 commented Jun 10, 2025

This pull request addresses #365 and #385 by changing InteractionValues.values and InteractionValues.interaction_lookup them into properties. Introducing InteractionValues.interactions as the main part working with interactions.
We remove finalize_computed_interactions and incorporate it into the __init__ of InteractionValues.

Removal of finalize_computed_interactions:

  • Updated all approximate methods in various approximator modules (owen.py, stratified.py, montecarlo/_base.py, permutation/sii.py, permutation/stii.py, permutation/sv.py, regression/_base.py, sparse/_base.py) to directly return InteractionValues with the target_index property included. This eliminates the need for the finalize_computed_interactions function. [1] [2] [3] [4] [5] [6] [7] [8]

  • Updated the explain_function in tabular.py and tree/explainer.py to replace calls to finalize_computed_interactions with direct instantiation of InteractionValues. [1] [2]

Simplification of imports:

These changes improve the maintainability of the code by reducing complexity and removing unnecessary dependencies.

@Advueu963 Advueu963 linked an issue Jun 10, 2025 that may be closed by this pull request
@Advueu963 Advueu963 self-assigned this Jun 10, 2025
@Advueu963 Advueu963 linked an issue Jun 10, 2025 that may be closed by this pull request
@mmschlk
Copy link
Owner

mmschlk commented Jun 18, 2025

This is amazing ... but we really gotta be careful integrating this haha 😂

@mmschlk
Copy link
Owner

mmschlk commented Jul 3, 2025

We could add this logic actually also to our game class ... I don't see if there is something which speaks against this.

@mmschlk mmschlk mentioned this pull request Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redo Finalize Interaction Values Potentially remove InteractionValues.values
2 participants