SHAP importance beeswarm plot
plot_shap_beeswarm(
shap,
x,
cex = 0.25,
corral = "random",
corral.width = 0.7,
scheme = c("deepskyblue2", "purple3", "red"),
sort = TRUE,
top = NULL,
...
)
A ggplot2 plot
a matrix of SHAP values
a matrix or dataframe of feature values containing only features
values from the training data. The rows must match rows in shap
. If a
dataframe is supplied it is converted to a numeric matrix using
data.matrix()
.
Scaling for adjusting point spacing. See
ggbeeswarm::geom_beeswarm()
.
String specifying method used to corral points. See
ggbeeswarm::geom_beeswarm()
.
Numeric specifying width of corral, passed to
geom_beeswarm
Colour scheme as a vector of 3 colours
Logical whether to sort predictors by mean absolute SHAP value.
Sets a limit on the number of variables plotted or NULL
to plot
all variables. If top
is set then variables are sorted and sort
is
overrode.
Other arguments passed to ggbeeswarm::geom_beeswarm()
e.g.
size
.