Learn R Programming

survcompare (version 0.3.0)

survsrfstack_cv: Cross-validates stacked ensemble of the CoxPH and Survival Random Forest models

Description

Cross-validates stacked ensemble of the CoxPH and Survival Random Forest models

Usage

survsrfstack_cv(
  df,
  predict.factors,
  fixed_time = NaN,
  outer_cv = 3,
  inner_cv = 3,
  repeat_cv = 2,
  randomseed = NaN,
  return_models = FALSE,
  useCoxLasso = FALSE,
  tuningparams = list(),
  max_grid_size = 10,
  verbose = FALSE,
  suppresswarn = TRUE,
  impute = 0,
  impute_method = "missForest"
)

Arguments

df

data, "time" and "event" should describe survival outcome

predict.factors

list of predictor names

fixed_time

time at which performance is maximized

outer_cv

number of cross-validation folds for model validation

inner_cv

number of cross-validation folds for hyperparameters' tuning

repeat_cv

number of CV repeats, if NaN, runs once

randomseed

random seed to control tuning including data splits

return_models

TRUE/FALSE, if TRUE returns all CV objects

useCoxLasso

if CoxLasso is used (TRUE) or not (FALSE, default)

tuningparams

if given, list of hyperparameters, list(mtry=c(), nodedepth=c(),nodesize=c()), otherwise a wide default grid is used

max_grid_size

number of random grid searches for model tuning

verbose

FALSE(default)/TRUE

suppresswarn

TRUE/FALSE, TRUE by default

impute

0/1/2/3 for no imputation / option 1 (proper way) / option 2 (faster way) / option 3 (complete cases), more in documentation and vignette

impute_method

"missForest"