Learn R Programming

survcompare (version 0.2.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
)

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