Helper functions for predict_parts.R
an explainer object - model preprocessed by the explain()
function
new observations for which predictions need to be explained
a character, either "survival"
or "chf"
. Determines which type of prediction should be used for explanations.
additional parameters, passed to internal functions
a positive integer, number of observations used as the background data
a two element numeric vector or matrix of one row and two columns, the first element being the true observed time and the second the status of the observation, used for plotting
a character, either "kernelshap"
for use of kernelshap
library (providing faster Kernel SHAP with refinements), "exact_kernel"
for exact Kernel SHAP estimation, or "treeshap"
for use of treeshap
library (efficient implementation to compute SHAP values for tree-based models).
a character, either "integral"
, "integral_absolute"
, "mean_absolute"
, "max_absolute"
, or "sum_of_squares"
A list, containing the calculated SurvSHAP(t) results in the result
field
[1] Krzyziński, Mateusz, et al. "SurvSHAP(t): Time-dependent explanations of machine learning survival models." Knowledge-Based Systems 262 (2023): 110234