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

Fix shap_values compatibility with shap>=0.43.0 by adjusting check_additivity parameter handling for TreeExplainer #872

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

jcreinhold
Copy link
Contributor

@jcreinhold jcreinhold commented Apr 4, 2024

This addresses the issue where the shap_values method in EconML did not correctly set check_additivity=False for shap>=0.43.0 due to a class name change from Tree to TreeExplainer​.

See #866 for details.

@jcreinhold
Copy link
Contributor Author

Adding @kbattocchi for review.

@jcreinhold jcreinhold marked this pull request as draft April 8, 2024 15:35
@jcreinhold jcreinhold marked this pull request as ready for review April 9, 2024 18:26
Copy link
Collaborator

@kbattocchi kbattocchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! As I mentioned in the linked issue, if you also want to tackle passing a seed to SHAP, that would be even better, but we'll take the contribution as-is if not.

@jcreinhold
Copy link
Contributor Author

Great! I'm happy to add the seed functionality, but I think it's be best to add it to another PR. Ideally, I'll be able to add it within a week or so, but I might get pulled into something which will push back that timeline.

…ditivity parameter handling for TreeExplainer

Signed-off-by: Jacob Reinhold <jcreinhold@gmail.com>
@kbattocchi kbattocchi enabled auto-merge (squash) April 10, 2024 17:08
@kbattocchi kbattocchi merged commit 6800095 into py-why:main Apr 11, 2024
78 checks passed
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.

shap_values for tree-based models doesn't set check_additivity=False as expected
2 participants