SHAP importance bar plot
plot_shap_bar(
shap,
x,
sort = TRUE,
labels = c("Negative", "Positive"),
top = NULL
)A ggplot2 plot
a matrix of SHAP values, or the shapr object returned by
nestcv.explain()/shapr::explain()
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().
Logical whether to sort predictors by mean absolute SHAP value
Character vector of labels for directionality
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.