Generalized linear models with elastic net regularization. Calls glmnet::cv.glmnet() from package glmnet.

Format

R6::R6Class() inheriting from LearnerSurv.

Details

The distr predict.type is derived by multiplying the risk returned from glmnet::cv.glmnet() with a baseline hazard/survival calculated from survival::survfit(). The choice of estimator can be determined by the estimator hyper-parameter.

Construction

LearnerSurvGlmnet$new()
mlr_learners$get("surv.glmnet")
lrn("surv.glmnet")

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.glmnet") resampling = rsmp("cv", folds = 3) resample(task, learner, resampling)
#> <ResampleResult> of 3 iterations #> * Task: simsurv #> * Learner: surv.glmnet #> * Performance: 0.500 [surv.harrells_c] #> * Warnings: 0 in 0 iterations #> * Errors: 0 in 0 iterations