Description Usage Arguments Details
Plots the marginal effects for continuous viewpoints in a
viewpoint regression model, as extracted by
get_marginal
.
1 2 3 4 5 6 7 8 9 10 11 12 | plot_marginals(
model_1,
model_2 = NULL,
model_labels = NULL,
x_lab = "Feature value",
y_lab = "Effect",
viewpoint_labels = model_1$viewpoint_labels,
fill = "blue",
alpha = 0.25,
scales = "free",
...
)
|
model_1 |
Viewpoint regression model,
as created by |
model_2 |
Optional second viewpoint regression model, to be plotted for comparison. |
model_labels |
Only relevant if a second viewpoint regression model is provided, in which case this should be a character vector of length 2 corresponding to the plot labels for these two models. |
x_lab |
(Character scalar) Label for the x axis. |
y_lab |
(Character scalar) Label for the y axis. |
viewpoint_labels |
|
fill |
(Character scalar) Fill colour for the shaded region identifying the 5th-95th percentiles of observed feature values. |
alpha |
(Numeric scalar) Alpha value for the shaded region. |
scales |
Passed to |
... |
Further arguments to pass to |
The x axis spans the 5th-95th percentiles
of theoretically possible feature values
as computed in the derivation of the model matrix
(see compute_model_matrix
).
The shaded area identifies the 5th-95th percentiles
of observed feature values when computing the model matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.