shap.plot.force_plot_bygroup | R Documentation |
A collective display of zoom-in plots: one plot for every group of the clustered observations.
shap.plot.force_plot_bygroup(shapobs, id = "sorted_id", y_parent_limit = NULL)
shapobs |
The dataset obtained by |
id |
the id variable. |
y_parent_limit |
set y-axis limits. |
# **SHAP force plot**
plot_data <- shap.prep.stack.data(shap_contrib = shap_values_iris,
n_groups = 4)
shap.plot.force_plot(plot_data)
shap.plot.force_plot(plot_data, zoom_in_group = 2)
# plot all the clusters:
shap.plot.force_plot_bygroup(plot_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.