powered by
Cross-validates Survival Random Forest
survsrf_cv( df, predict.factors, fixed_time = NaN, outer_cv = 3, inner_cv = 3, repeat_cv = 2, randomseed = NaN, return_models = FALSE, tuningparams = list(), max_grid_size = 10, verbose = FALSE, suppresswarn = TRUE )
list of outputs
data, "time" and "event" should describe survival outcome
list of predictor names
time at which performance is maximized
number of cross-validation folds for model validation
number of cross-validation folds for hyperparameters' tuning
number of CV repeats, if NaN, runs once
random seed to control tuning including data splits
if all models are stored and returned
if given, list of hyperparameters, list(mtry=c(), nodedepth=c(),nodesize=c()), otherwise a wide default grid is used
number of random grid searches for model tuning
FALSE(default)/TRUE
TRUE/FALSE, TRUE by default
# \donttest{ rfcores_old<- options()$rf.cores; options(rf.cores = 1) df <- simulate_nonlinear() srf_cv <- survsrf_cv(df, names(df)[1:4]) summary(srf_cv) options(rf.cores=rfcores_old) # }
Run the code above in your browser using DataLab