
SHAP Variable Attributions across Survival and Joint Models
Source:R/explain_survival.R
predict_parts_shap.RdComputes individual observation SHAP attributions: using time-dependent
SurvSHAP(t) via survex::predict_parts(type = "survshap") for survival
explainers, and DALEX::predict_parts(type = "shap") for classification/regression
explainers.
Usage
predict_parts_shap(
explainer,
new_observation,
type = c("auto", "shap", "survshap"),
...
)Arguments
- explainer
An explainer object produced by
explain_survival(),explain_joint(), orDALEX::explain().- new_observation
A 1-row data frame containing the observation to explain.
- type
Character specifying the attribution type:
"auto"(the default),"shap", or"survshap".- ...
Additional arguments passed to
survex::predict_parts()orDALEX::predict_parts().
Value
A predict_parts attribution object, printable and plottable with plot().