Skip to content
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

MAINT refactor feature_perturbation in Tree explainers #2624

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

glemaitre
Copy link
Contributor

The switch between "interventional" to "tree_path_dependent" being silent is quite surprising.

Instead, I would propose to have an "auto" method that would switch to the method depending if the background dataset provided.

Then when providing a specific algorithm, we will in the future raise an error if the conditions are not met to run the algorithm. For the moment, I propose to raise a FutureWarning to ask the user to change to "auto" if this is really what they want (and therefore keep the code backward compatible).

I find this way more explicit, knowing that "tree_path_depedent" might have an important impact on the symmetric axiom expected by the users.

@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #2624 (75fa464) into master (45b85c1) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2624      +/-   ##
==========================================
+ Coverage   51.61%   51.64%   +0.03%     
==========================================
  Files          91       91              
  Lines       13146    13153       +7     
==========================================
+ Hits         6785     6793       +8     
+ Misses       6361     6360       -1     
Impacted Files Coverage Δ
shap/explainers/_tree.py 69.61% <100.00%> (+0.25%) ⬆️
shap/explainers/_additive.py 33.33% <0.00%> (-0.82%) ⬇️
shap/plots/_force.py 63.36% <0.00%> (+0.43%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

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.

None yet

1 participant