surv_ceteris_paribus function

Helper functions for predict_profile.R

Helper functions for predict_profile.R

Helper functions for predict_profile.R

Helper functions for predict_profile.R

surv_ceteris_paribus(x, ...) ## S3 method for class 'surv_explainer' surv_ceteris_paribus( x, new_observation, variables = NULL, categorical_variables = NULL, variable_splits = NULL, grid_points = 101, variable_splits_type = "uniform", center = FALSE, output_type = "survival", ... )

Arguments

  • x: an explainer object - model preprocessed by the explain() function
  • ...: other parameters, currently ignored
  • new_observation: a new observation for which predictions need to be explained
  • variables: character, names of the variables to be included in the calculations
  • categorical_variables: character vector, names of variables that should be treated as categories (factors are included by default)
  • variable_splits: named list of splits for variables, in most cases created with internal functions. If NULL then it will be calculated based on validation data available in the explainer
  • grid_points: maximum number of points for profile calculations. Note that the final number of points may be lower than grid_points. Will be passed to internal function. By default 101.
  • variable_splits_type: character, decides how variable grids should be calculated. Use "quantiles" for percentiles or "uniform" (default) to get uniform grid of points.

Returns

A data.frame containing the result of the calculation.

  • Maintainer: Mikołaj Spytek
  • License: GPL (>= 3)
  • Last published: 2023-10-24