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

explain_predictions_ functions should return top_k features by magnitude of SHAP value #1360

Closed
freddyaboulton opened this issue Oct 28, 2020 · 0 comments · Fixed by #1374
Closed
Assignees
Milestone

Comments

@freddyaboulton
Copy link
Contributor

Currently, the explain_predictions_ functions accept a top_k_features argument. By design, this returns the features with the top_k highest and top_k smallest shap values for a total of 2 * top_k features.

The idea was to give users a sense of what drives a particular prediction up vs down but this approach can include some irrelevant information. For example, consider a prediction where every feature has a positive SHAP value but 10 features have really high Shap values and the smallest 5 have shap values close to 0. Passing top_k=5, would include the 5 features with near-zero shap values. It would be better to just return the 10 features with the highest shap value by magnitude.

FYI @kmax12

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 a pull request may close this issue.

1 participant