Closed zmjones closed 9 years ago
I pushed a first draft. Didn't test much, and needs more functionality, but works for basic examples. Class of partial dependence is now c("pd", "data.frame") so every method for dfs still works.
so it turns out we can't properly use the plot generic because its first two arguments are x, y and our function doesn't use that. the dispatch seems to work but i think CRAN will reject it. i changed it to plot_pd for now.
i also changed the coloring you were doing in the interaction plots to faceting. i am open to changing it back though. i am not sure what i did was a good solution either. maybe what we could do is discretize the facetting variable and use that instead. we will have this issue with the multivariate interaction plots too.
we need to give all the output from partial dependence a simple s3 class, and then there should be a plot generic for the bivariate pd output. the output from partial_dependence should still operate like a normal data.frame though.