model_survshap(explainer,...)## S3 method for class 'surv_explainer'model_survshap( explainer, new_observation =NULL, y_true =NULL, N =NULL, calculation_method ="kernelshap", aggregation_method ="integral", output_type ="survival",...)
Arguments
explainer: an explainer object - model preprocessed by the explain() function
...: additional parameters, passed to internal functions
new_observation: new observations for which predictions need to be explained
y_true: 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
N: a positive integer, number of observations used as the background data
calculation_method: 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).
aggregation_method: a character, either "integral", "integral_absolute", "mean_absolute", "max_absolute", or "sum_of_squares"
output_type: a character, either "survival" or "chf". Determines which type of prediction should be used for explanations.
Returns
An object of class aggregated_surv_shap containing the computed global SHAP values.
Details
If specifying y_true, also new_observation must be specified. Using the argument new_observation, global SHAP values are computed for the provided data. Otherwise, global SHAP values are computed for the data, the explainer was trained with.