plot.EBM | R Documentation |
Provides an interactive visualization for a given explanation(s).
## S3 method for class 'EBM'
plot(
x,
term = NULL,
local = FALSE,
X = NULL,
y = NULL,
init_score = NULL,
interactive = FALSE,
n_terms = NULL,
geom = c("point", "col", "bar"),
mapping = NULL,
aesthetics = list(),
horizontal = FALSE,
uncertainty = TRUE,
width = 0.5,
alpha = 0.5,
fill = "grey",
display = c("viewer", "markdown", "url"),
viewer = c("browser", "rstudio"),
full_dashboard = FALSE,
...
)
x |
A fitted |
term |
Character string specifying which term to plot. For interaction
effect, you can supply a pair (e.g., |
local |
Logocial indicating whether to display local explanations
( |
X |
Data frame or matrix of samples. Unless |
y |
Optional vector of response values corresponding to |
init_score |
Optional. Either a model that can generate scores or
per-sample initialization score. If samples scores it should be the same
length as |
interactive |
Logical indicating whether to produce an interactive plot
based on HTML. Default is |
n_terms |
Integer specifying the maximum number of variable
importance scores to plot. Default is |
geom |
Character string specifying which type of plot to construct for terms associated with categorical features. Current options are:
Default is |
mapping |
Set of aesthetic mappings created by aes-related functions and/or tidy eval helpers. See example usage below. |
aesthetics |
List specifying additional arguments passed on to
layer. These are often aesthetics, used to set an aesthetic
to a fixed value, like |
horizontal |
Logical indicating whether or not term plots for
categorical features should be flipped horzintally. Default is |
uncertainty |
Logical indicating whether or not to also display
uncertainty via error bars on the main effect plots. Default is |
width |
Numeric specifying the width of the error bars displayed in bar/ dot plots for categorical features. Default is 0.5. |
alpha |
Numeric between 0 and 1 specifying the level of transparency to use when displaying uncertainty in plots for continuous features. Default is 0.5. |
fill |
Character string specifying the fill color to use when displaying
uncertainty in plots for continuous features. Default is |
display |
Character string specifying how the results should be
displayed whenever |
viewer |
Character string specifying how the results should be viewed.
Current choices are |
full_dashboard |
Logical indicating whether or not to display the full
interpret dashboard. Default is |
... |
Additional optional arguments. Currently only passed onto levelplot() for heatmaps of interaction effects. |
When interactive = FALSE
(the default), the output is either a
ggplot object when visualizing term importance scores or
main effects, or a trellis object when visualizing
pairwise interaction effects. When interactive = TRUE
, the return value
depends on display
argument. When display = "url"
, a character string
is returned giving the URL for displaying the HTML-based visualization.
Otherwise, the results are viewed as requested (i.e., in a browser, built-in
viewer, or displayed in rendered HTML output).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.