Calls glmnet::cv.glmnet().

Use LearnerSurvGlmnet and LearnerSurvCVGlmnet for glmnets without and with internal cross-validation, respectively. Tuning using the internal optimizer in LearnerSurvCVGlmnet may be more efficient when tuning lambda only. However, for tuning multiple hyperparameters, mlr3tuning and LearnerSurvGlmnet will likely give better results.

Format

R6::R6Class() inheriting from LearnerSurv.

Construction

LearnerSurvCVGlmnet$new()
mlr_learners$get("surv.cvglmnet")
lrn("surv.cvglmnet")

Meta Information

  • Type: "surv"

  • Predict Types: crank, lp

  • Feature Types: integer, numeric, factor

  • Packages: glmnet survival

References

Jerome Friedman, Trevor Hastie, Robert Tibshirani (2010). Regularization Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1), 1-22. doi: 10.18637/jss.v033.i01 .

See also

Examples

library(mlr3) task = tgen("simsurv")$generate(200) learner = lrn("surv.cvglmnet") resampling = rsmp("cv", folds = 3) resample(task, learner, resampling)
#> <ResampleResult> of 3 iterations #> * Task: simsurv #> * Learner: surv.cvglmnet #> * Warnings: 0 in 0 iterations #> * Errors: 0 in 0 iterations