shap_dependence: SHAP dependence plot

View source: R/plot.gg_shap.R

shap_dependenceR Documentation

SHAP dependence plot

Description

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.

Usage

shap_dependence(x, xvar = NULL, ...)

Arguments

x

A gg_shap object.

xvar

The variable to plot. When NULL, the top-ranked variable (largest mean absolute SHAP) is used.

...

Unused.

Value

A ggplot object.

See Also

gg_shap plot.gg_shap


ggRandomForests documentation built on Aug. 4, 2026, 5:09 p.m.