View source: R/ms_update_options.R
| ms_update_options | R Documentation |
This function updates the options of a modelStudio object.
WARNING: Editing default options may cause unintended behavior.
ms_update_options(object, ...)
object |
A |
... |
Options to change in the form |
An object of the r2d3, htmlwidget, modelStudio class.
TRUE Makes every plot the same height, ignores bar_width.
TRUE Display boxplots in Feature Importance and Shapley Values plots.
TRUE Should the subtitle be displayed?
label parameter from explainer.
Title of the dashboard.
Subtitle of the dashboard (makes space between the title and line).
Dashboard margins. Change margin_top for more ms_subtitle space.
Plot margins. Change margin_left for longer/shorter axis labels.
420 in px. Inner plot width.
280 in px. Inner plot height.
16 in px. Default width of bars for all plots,
ignored when scale_plot = TRUE.
2 in px. Default width of lines for all plots.
3 in px. Default point radius for all plots.
[#46bac2,#46bac2,#371ea3]
#8bdcbe for Break Down and Shapley Values bars.
#f05a71 for Break Down and Shapley Values bars.
#371ea3 for Break Down bar and highlighted line.
** is a two letter code unique to each plot, might be
one of [bd,sv,cp,fi,pd,ad,rv,fd,tv,at].
Plot-specific title. Default varies.
Plot-specific subtitle. Default is subtitle.
Plot-specific axis title. Default varies.
Plot-specific width of bars. Default is bar_width,
ignored when scale_plot = TRUE.
Plot-specific width of lines. Default is line_size.
Plot-specific point radius. Default is point_size.
Plot-specific [bar,line,point] color. Default is [bar,line,point]_color.
The input object is implemented in DALEX
Feature Importance, Ceteris Paribus, Partial Dependence and Accumulated Dependence explanations are implemented in ingredients
Break Down and Shapley Values explanations are implemented in iBreakDown
Vignettes: modelStudio - R & Python examples and modelStudio - perks and features
library("DALEX")
library("modelStudio")
# fit a model
model_titanic <- glm(survived ~., data = titanic_imputed, family = "binomial")
# create an explainer for the model
explainer_titanic <- explain(model_titanic,
data = titanic_imputed,
y = titanic_imputed$survived)
# make a studio for the model
ms <- modelStudio(explainer_titanic,
N = 200, B = 5) # faster example
# update the options
new_ms <- ms_update_options(ms,
time = 0,
facet_dim = c(1,2),
margin_left = 150)
new_ms
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.