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

Add partial dependence plot #985

Closed
dsherry opened this issue Jul 28, 2020 · 3 comments · Fixed by #1079
Closed

Add partial dependence plot #985

dsherry opened this issue Jul 28, 2020 · 3 comments · Fixed by #1079
Assignees
Labels
new feature Features which don't yet exist.
Milestone

Comments

@dsherry
Copy link
Contributor

dsherry commented Jul 28, 2020

https://scikit-learn.org/stable/modules/partial_dependence.html
https://christophm.github.io/interpretable-ml-book/pdp.html

@dsherry dsherry added the new feature Features which don't yet exist. label Jul 28, 2020
@dsherry dsherry added this to the August 2020 milestone Jul 28, 2020
@angela97lin angela97lin self-assigned this Aug 17, 2020
@kmax12
Copy link
Contributor

kmax12 commented Aug 17, 2020

One thing that didn't occur to me before is that we can actually use shap values to do the dependency plot. https://slundberg.github.io/shap/notebooks/plots/dependence_plot.html

I suspect we still start by just adding traditional partial deps plots, but wanted to share this since it is interesting and something to keep in mind as we develop this API.

@angela97lin
Copy link
Contributor

@kmax12 Thanks for sharing this! I agree that it'd make sense to start by adding traditional partial dependency plots, so I filed #1068 to track using SHAP values to create dependency plots to make sure this doesn't get lost when this issue is closed.

@dsherry
Copy link
Contributor Author

dsherry commented Aug 19, 2020

Discussed with @angela97lin . Takeaways:

  • For now we'll support pipelines. We won't add test coverage / docs for accepting estimators as input, unless it turns out to "just work" and only takes another couple hours to add unit test coverage
  • We'll only generate 1d plots, not 2d interaction plots
  • API:
def partial_dependence(pipeline, X, feature_name, grid_resolution=None):
    ...
def graph_partial_dependence(pipeline, X, feature_name, grid_resolution=None):
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Features which don't yet exist.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants