powered by
Use rpart.plot::rpart.plot() to visualize trees fitted by light_global_surrogate().
rpart.plot::rpart.plot()
light_global_surrogate()
# S3 method for light_global_surrogate plot(x, type = 5, auto_main = TRUE, mfrow = NULL, ...)
An object of class "ggplot".
An object of class "light_global_surrogate".
Plot type, see help of rpart.plot::rpart.plot(). Default is 5.
Automatic plot titles (only if multiple trees are shown).
If multiple trees are shown in the same figure: what value of mfrow to use in graphics::par()?
mfrow
graphics::par()
Further arguments passed to rpart.plot::rpart.plot().
fit <- lm(Sepal.Length ~ ., data = iris) x <- flashlight(model = fit, label = "lm", data = iris) plot(light_global_surrogate(x))
Run the code above in your browser using DataLab