Learn R Programming

flashlight (version 0.8.0)

plot.light_global_surrogate: Plot Global Surrogate Trees

Description

Using rpart.plot, trees fitted by light_global_surrogate are visualized.

Usage

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

Value

An object of class ggplot2.

Arguments

x

An object of class light_global_surrogate.

type

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

auto_main

Automatic plot titles (only if multiple trees are shown in the same figure).

mfrow

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

...

Further arguments passed to rpart.plot.

See Also

light_global_surrogate.

Examples

Run this code
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