: Some code that returns the partial dependence values for a given set of variables for a gbm.step model. In the future this function will work for other decision trees

partial_dependence(x, var, ...)

Arguments

x
a gbm.step object
var
a set of variables you want to retrieve partial dependence for
...
extra arguments you might want to pass downstream

Note

This requires the loading of the `gbm.step` function. Hopefully sometime soom I can just write this in vanilla R myself. Future extensions will allow for this function to work for `rpart`, `gbm`, `gbm.step`, and `randomForest`.