Learn R Programming

live (version 1.5.13)

plot.live_explainer: Plotting white box models.

Description

Plotting white box models.

Usage

# S3 method for live_explainer
plot(x, type = "waterfall", ...)

Arguments

x

List returned by fit_explanation function.

type

Chr, "forest" or "waterfall" depending on which type of plot is to be created. if lm/glm model is used as interpretable approximation.

...

Additional parameters that will be passed to plot.broken or plot method. In particular, when number of features is large, top_features argument can be set in plot.broken.

Value

plot (ggplot2 or base)

Examples

Run this code
# NOT RUN {
# Forest plot for regression
plot(fitted_explanation1, type = "forest")
# Waterfall plot
plot(fitted_explanation1, type = "waterfall")
# Plot decision tree
plot(fitted_explanation2)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab