Calls penalized::penalized().

  • distr is predicted using penalized::predict()

  • crank is predicted as the expectation of the survival distribution, distr

The penalized and unpenalized arguments in the learner are implemented slightly differently than in penalized::penalized(). Here, there is no parameter for penalized but instead it is assumed that every variable is penalized unless stated in the unpenalized parameter, see examples.

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

LearnerSurvPenalized$new()
mlr_learners$get("surv.penalized")
lrn("surv.penalized")

Meta Information

  • Type: "surv"

  • Predict Types: distr, crank

  • Feature Types: integer, numeric, factor, ordered

  • Properties: importance

  • Packages: penalized distr6

References

Goeman JJ (2009). “L1Penalized Estimation in the Cox Proportional Hazards Model.” Biometrical Journal, NA--NA. doi: 10.1002/bimj.200900028 .

See also

Super classes

mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvPenalized

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage

LearnerSurvPenalized$new()


Method importance()

The importance scores are extracted from the model slot variable.importance.

Usage

LearnerSurvPenalized$importance()

Returns

Named numeric().


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerSurvPenalized$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

library(mlr3) task = tgen("simsurv")$generate(20) learner = lrn("surv.penalized") resampling = rsmp("cv", folds = 2) resample(task, learner, resampling)
#> 1234 #> 1234
#> <ResampleResult> of 2 iterations #> * Task: simsurv #> * Learner: surv.penalized #> * Warnings: 0 in 0 iterations #> * Errors: 0 in 0 iterations
# specifying penalized and unpenalized variables task = tgen("simsurv")$generate(20) learner = lrn("surv.penalized", unpenalized = c("height")) learner$train(task)
#> 1234
learner$model@penalized
#> treatment weight #> 0.97867392 0.02127612
learner$model@unpenalized
#> height #> 0.008976014