Generates variable importance or prediction explanations for a fitted
triageR_model, using the DALEX framework under the hood.
Usage
tr_explain(
model,
method = c("permutation", "shap"),
newdata = NULL,
observation = 1
)Arguments
- model
A fitted
triageR_modelobject fromtr_fit().- method
Character. One of
"permutation"(global variable importance) or"shap"(SHAP values for a single prediction).- newdata
Optional data frame to explain predictions on. If
NULL, uses the training data.- observation
Integer. Row index of the observation to explain, only used when
method = "shap". Defaults to 1.
