Make SHAP plots
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | do_plot_shap(
shap,
col_y = NULL,
col_id = NULL,
cols_extra = NULL,
f_import = magick::image_read,
f_export = save_plot,
do = TRUE,
overwrite = TRUE,
export = TRUE,
...,
dir = .get_dir_data(),
file = NULL,
ext = "png",
sep = "_",
prefix = "viz",
suffix = NULL,
.do = list(agg = NULL, swarm = NULL),
.f_import = list(agg = NULL, swarm = NULL),
.f_export = list(agg = purrr::partial(save_plot, width = 8, height = 8), swarm =
purrr::partial(save_plot, width = 12, height = 8)),
.export = list(agg = NULL, swarm = NULL),
.overwrite = list(agg = NULL, swarm = NULL),
.dir = list(agg = NULL, swarm = NULL),
.file = list(agg = "agg", swarm = "swarm"),
.ext = list(agg = NULL, swarm = NULL),
.path = list(agg = NULL, swarm = NULL)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.