-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
BUG: Strange base value of exact explainer #3174
Comments
Hi, A possible fix could be to add a property |
You are right, it affects even linear explainers. |
@znacer I implemented your proposal. That sounds like a good approach to me. |
Awesome, thanks @znacer and @CloseChoice |
The explainer object already accepts a What do you think, would this be acceptable? ex = shap.Explainer(true_model, masker=maskers.Independent(X, max_samples=1000), algorithm="exact") |
Good idea, that would be quite elegant, indeed. |
What do you think @CloseChoice , happy for me to close this issue for now with the approach above as a recommended way to set the masker params? |
@connortann, that's fine for me |
Issue Description
I expect the baseline of the exact explainer to equal the average prediction on the background data (masker). However, there are cases where this is not true, see example.
Minimal Reproducible Example
Expected Behavior
The average of 0, ..., 100 is 50, so I'd expect the baseline to equal 50.
Running above example with
n = 100
gives a baseline of 49.5 (as expected).Bug report checklist
Installed Versions
0.42.1
The text was updated successfully, but these errors were encountered: