SHAP value against the value of a single feature, the SHAP analog of a partial-dependence plot. Numeric features use a continuous x-axis; factor or character features fall back to their labels on a discrete axis.
shap_dependence(x, xvar = NULL, labels = NULL, ...)A ggplot object.
A gg_shap object.
The variable to plot. When NULL, the top-ranked variable
(largest mean absolute SHAP) is used.
Optional variable labels. One of: a named character vector
(c(Temp = "Temperature")); a labelled data frame, whose
attr(col, "label") values are read; or a two-column
key/label data frame. Variables with no label keep their raw
name. Defaults to NULL (raw names).
Unused.
gg_shap plot.gg_shap