plot.light_global_surrogate: Plot Global Surrogate Trees

View source: R/plot_light_global_surrogate.R

plot.light_global_surrogateR Documentation

Plot Global Surrogate Trees

Description

Use rpart.plot::rpart.plot() to visualize trees fitted by light_global_surrogate().

Usage

## S3 method for class 'light_global_surrogate'
plot(x, type = 5, auto_main = TRUE, mfrow = NULL, ...)

Arguments

x

An object of class "light_global_surrogate".

type

Plot type, see help of rpart.plot::rpart.plot(). Default is 5.

auto_main

Automatic plot titles (only if multiple trees are shown).

mfrow

If multiple trees are shown in the same figure: what value of mfrow to use in graphics::par()?

...

Further arguments passed to rpart.plot::rpart.plot().

Value

An object of class "ggplot".

See Also

light_global_surrogate()

Examples

fit <- lm(Sepal.Length ~ ., data = iris)
x <- flashlight(model = fit, label = "lm", data = iris)
plot(light_global_surrogate(x))

flashlight documentation built on May 31, 2023, 6:19 p.m.