
Plot partial dependence for tree-based models
Source:R/supervised-trees.R
tl_plot_partial_dependence.RdPlot partial dependence for tree-based models
Value
A ggplot object. Its data has a
var_value column and the mean prediction over the model's
training rows, y, at each value. For classification, y
is a mean class probability and a class column says which
class: the positive class (the second level) alone for a two-class
model, and every class, one line each, for more.
Examples
# \donttest{
model <- tl_model(mtcars, mpg ~ ., method = "forest")
tl_plot_partial_dependence(model, var = "wt")
# }