| plot_partial_dependence | R Documentation |
Creates a partial dependence plot for a selected variable from a fitted earth model.
plot_partial_dependence(
earth_result,
variable,
n_grid = 50L,
response_idx = NULL
)
earth_result |
An object of class |
variable |
Character string. Name of the predictor variable to plot. |
n_grid |
Integer. Number of grid points for the partial dependence calculation. Default is 50. |
response_idx |
Integer or |
A ggplot2::ggplot object.
result <- fit_earth(mtcars, "mpg", c("cyl", "disp", "hp", "wt"))
plot_partial_dependence(result, "wt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.