Survival Priority Lasso Learner
Source:R/learner_prioritylasso_surv_priority_lasso.R
mlr_learners_surv.priority_lasso.RdPatient outcome prediction based on multi-omics data taking practitioners’
preferences into account.
Calls prioritylasso::prioritylasso() from prioritylasso.
Prediction types
This learner returns three prediction types:
lp: a vector containing the linear predictors (relative risk scores), where each score corresponds to a specific test observation. Calculated usingprioritylasso::predict.prioritylasso().crank: same aslp.distr: a survival matrix in two dimensions, where observations are represented in rows and time points in columns. Calculated usingmlr3proba::breslow()where the Breslow estimator is used for computing the baseline hazard.
Initial parameter values
familyis set to"cox"for the Cox survival objective and cannot be changedtype.measureis set to"deviance"(cross-validation measure) and cannot be changedcox.tiesis initialized to"breslow"to keep the tie-handling behavior of earlier glmnet versions, and to silence the glmnet v5.0 warning about the upcoming default change to"efron"
Meta Information
Task type: “surv”
Predict Types: “crank”, “distr”, “lp”
Feature Types: “logical”, “integer”, “numeric”
Required Packages: mlr3, mlr3proba, prioritylasso
Parameters
| Id | Type | Default | Levels | Range |
| blocks | untyped | - | - | |
| max.coef | untyped | NULL | - | |
| block1.penalization | logical | TRUE | TRUE, FALSE | - |
| lambda.type | character | lambda.min | lambda.min, lambda.1se | - |
| standardize | logical | TRUE | TRUE, FALSE | - |
| nfolds | integer | 10 | \([3, \infty)\) | |
| foldid | untyped | NULL | - | |
| cvoffset | logical | FALSE | TRUE, FALSE | - |
| cvoffsetnfolds | integer | 10 | \([1, \infty)\) | |
| return.x | logical | TRUE | TRUE, FALSE | - |
| lambda | untyped | NULL | - | |
| grouped | logical | TRUE | TRUE, FALSE | - |
| trace.it | integer | 0 | \([0, 1]\) | |
| cox.ties | character | breslow | breslow, efron | - |
| include.allintercepts | logical | FALSE | TRUE, FALSE | - |
| use.blocks | untyped | "all" | - | |
| adaptive.order | logical | FALSE | TRUE, FALSE | - |
Scope and supported arguments
This learner intentionally exposes a focused subset of training and prediction arguments.
It is designed to work well out of the box, without requiring extensive parameter tuning.
Some arguments from cv.glmnet(), glmnet(), and predict.prioritylasso() are not included,
because they are not consistently supported or forwarded through the full train/predict path
(e.g. handling missing test data, or performing relaxed lasso fits).
Please open an issue if there is a need for supporting more learner parameters.
Custom mlr3 parameters
adaptive.order: ifTRUE, the priority order of blocks is estimated from the data following Herrmann et al. (2021), instead of using the user-supplied block order. For each block, a Ridge regression (alpha = 0) is fit usingcv.glmnet()on that block alone. The importance of a block is measured by the mean absolute coefficient (MAC) score at thelambda.minvalue (the lambda giving minimum cross-validation error). A penalty factor of1 / MACis then assigned to each block. Blocks are sorted by increasing penalty factor, i.e., blocks with larger MAC (stronger average signal) receive higher priority (come first). Also, the block‑wise penalty factors are attached to the fitted model object aslearner$model$block.penalty.factors.
This method is useful when no domain knowledge is available to specify block priority.
In this step, data are standardized by default (standardize = TRUE), but this can
be overridden by the learner's standardize parameter. lambda.min is always used
to derive the block priority.
Additional arguments such as nfolds, type.measure, weights and cox.ties (if provided) are
forwarded to each block‑wise cv.glmnet() fit.
The max.coef parameter, if supplied, it is re‑ordered accordingly to align
with the new block order.
This parameter is ignored when fewer than two blocks are provided.
It defaults to FALSE for backward compatibility.
References
Simon K, Vindi J, Roman H, Tobias H, Anne-Laure B (2018). “Priority-Lasso: a simple hierarchical approach to the prediction of clinical outcome using multi-omics data.” BMC Bioinformatics, 19. doi:10.1186/s12859-018-2344-6 .
Herrmann, M., Probst, P., Hornung, R., Jurinovic, V., Boulesteix, L. A (2021). “Large-scale benchmark study of survival prediction methods using multi-omics data.” Briefings in Bioinformatics, 22(3), 1–15. doi:10.1093/BIB/BBAA167 .
See also
as.data.table(mlr_learners)for a table of available Learners in the running session (depending on the loaded packages).Chapter in the mlr3book: https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html#sec-learners
mlr3learners for a selection of recommended learners.
mlr3cluster for unsupervised clustering learners.
mlr3pipelines to combine learners with pre- and postprocessing steps.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Super classes
mlr3::Learner -> mlr3proba::LearnerSurv -> LearnerSurvPriorityLasso
Methods
LearnerSurvPriorityLasso$new()
Creates a new instance of this R6 class.
Usage
LearnerSurvPriorityLasso$new()LearnerSurvPriorityLasso$selected_features()
Selected features, i.e. those where the coefficient is non-zero.
Examples
# Define a Task
task = tsk("grace")
# Create train and test set
ids = partition(task)
# Check task's features
task$feature_names
#> [1] "age" "los" "revasc" "revascdays" "stchange"
#> [6] "sysbp"
# Partition features to 2 blocks
blocks = list(bl1 = 1:3, bl2 = 4:6)
# Define learner
learner = lrn("surv.priority_lasso", blocks = blocks, block1.penalization = FALSE,
lambda.type = "lambda.1se", standardize = TRUE, nfolds = 5)
# Train the learner on the training ids
learner$train(task, row_ids = ids$train)
# Selected features
learner$selected_features()
#> [1] "age" "los" "revasc" "revascdays"
# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)
predictions
#>
#> ── <PredictionSurv> for 330 observations: ──────────────────────────────────────
#> row_ids time status crank lp distr
#> 1 180.0 FALSE 0.4873027 0.4873027 <list[1]>
#> 6 5.0 FALSE 1.4541773 1.4541773 <list[1]>
#> 8 2.0 FALSE 1.1603463 1.1603463 <list[1]>
#> --- --- --- --- --- ---
#> 995 0.5 TRUE 3.9088136 3.9088136 <list[1]>
#> 996 69.0 TRUE 3.9357878 3.9357878 <list[1]>
#> 1000 15.0 FALSE 3.7133697 3.7133697 <list[1]>
# Score the predictions
predictions$score()
#> surv.cindex
#> 0.7351317