plot_shap_bar | R Documentation |
SHAP importance bar plot
plot_shap_bar(
shap,
x,
sort = TRUE,
labels = c("Negative", "Positive"),
top = NULL
)
shap |
a matrix of SHAP values |
x |
a matrix or dataframe of feature values containing only features
values from the training data. The rows must match rows in |
sort |
Logical whether to sort predictors by mean absolute SHAP value |
labels |
Character vector of labels for directionality |
top |
Sets a limit on the number of variables plotted or |
A ggplot2 plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.