survensemble_cv {survcompare}R Documentation

Cross-validates predictive performance for Ensemble 1

Description

Cross-validates predictive performance for Ensemble 1

Usage

survensemble_cv(
  df,
  predict.factors,
  fixed_time = NaN,
  outer_cv = 3,
  inner_cv = 3,
  repeat_cv = 2,
  randomseed = NULL,
  return_models = FALSE,
  useCoxLasso = FALSE,
  srf_tuning = list(),
  oob = TRUE
)

Arguments

df

data frame with the data, "time" and "event" for survival outcome

predict.factors

list of predictor names

fixed_time

at which performance metrics are computed

outer_cv

k in k-fold CV, default 3

inner_cv

kk in the inner look of kk-fold CV, default 3

repeat_cv

if NULL, runs once (or 1), otherwise repeats CV

randomseed

random seed

return_models

TRUE/FALSE, if TRUE returns all CV objects

useCoxLasso

TRUE/FALSE, default is FALSE

srf_tuning

list of tuning parameters for random forest: 1) NULL for using a default tuning grid, or 2) a list("mtry"=c(...), "nodedepth" = c(...), "nodesize" = c(...))

oob

TRUE/FALSE use out-of-bag predictions while tuning instead of cross-validation, TRUE by default

Value

list of outputs

Examples



df <- simulate_nonlinear()
ens_cv <- survensemble_cv(df, names(df)[1:4])
summary(ens_cv)



[Package survcompare version 0.1.2 Index]