| nestcv.explain | R Documentation |
Convenience wrapper around shapr::explain() that works with nestedcv
fitted models. Returns the shapr object directly, compatible with
plot_shap_bar(), plot_shap_beeswarm(), and shapr's own print()/
plot() methods.
nestcv.explain(
model,
predict_model,
x_explain = x_train,
x_train = NULL,
approach = "independence",
phi0 = NULL,
...
)
model |
A |
predict_model |
Prediction wrapper function with signature
|
x_explain |
A matrix or data frame of feature values to compute SHAP
values for. Defaults to |
x_train |
A matrix or data frame of feature values used as the
background training data. Defaults to the original training data from
|
approach |
Character string specifying the shapr estimation approach.
Defaults to |
phi0 |
Numeric scalar; the baseline (null) prediction (i.e. the
expected model output when no features are known). Defaults to |
... |
Additional arguments passed to |
the shapr object returned by shapr::explain(). Pass it
directly to plot_shap_bar() or plot_shap_beeswarm(), or use
shapr's own print()/plot() methods on it.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.