Competing Risks Cox Learner with Likelihood Based Boosting
Source:R/learner_CoxBoost_cmprsk_coxboost.R
mlr_learners_cmprsk.coxboost.RdFits a competing risks Cox model using likelihood based boosting.
Calls CoxBoost::CoxBoost() or CoxBoost::cv.CoxBoost() from package
CoxBoost.
Predicts cumulative incidence functions (one CIF matrix per cause, rows = observations,
columns = times).
If times are not provided for prediction, the unique event times (across causes)
from the training set are used by default.
Meta Information
Task type: “cmprsk”
Predict Types: “cif”
Feature Types: “integer”, “numeric”
Required Packages: mlr3, mlr3cmprsk, mlr3extralearners, CoxBoost
Parameters
| Id | Type | Default | Levels | Range |
| cv | logical | - | TRUE, FALSE | - |
| maxstepno | integer | 100 | \([0, \infty)\) | |
| K | integer | 10 | \([2, \infty)\) | |
| type | character | verweij | verweij, naive | - |
| folds | untyped | NULL | - | |
| minstepno | integer | 50 | \([0, \infty)\) | |
| start.penalty | numeric | - | \((-\infty, \infty)\) | |
| iter.max | integer | 10 | \([1, \infty)\) | |
| upper.margin | numeric | 0.05 | \([0, 1]\) | |
| unpen.index | untyped | - | - | |
| standardize | logical | TRUE | TRUE, FALSE | - |
| stepno | integer | 100 | \([0, \infty)\) | |
| penalty | numeric | - | \((-\infty, \infty)\) | |
| criterion | character | pscore | pscore, score, hpscore, hscore | - |
| stepsize.factor | numeric | 1 | \((-\infty, \infty)\) | |
| sf.scheme | character | sigmoid | sigmoid, linear | - |
| pendistmat | untyped | - | - | |
| connected.index | untyped | - | - | |
| x.is.01 | logical | FALSE | TRUE, FALSE | - |
| return.score | logical | TRUE | TRUE, FALSE | - |
| trace | logical | FALSE | TRUE, FALSE | - |
| cmprsk | character | - | csh, ccsh | - |
| coupled.strata | logical | TRUE | TRUE, FALSE | - |
| at.step | untyped | - | - | |
| times | untyped | - | - |
Custom mlr3 parameters
cv: IfTRUE, uses cross-validation withCoxBoost::cv.CoxBoost()to select the optimal number of boosting steps, then refits the final model usingCoxBoost::CoxBoost()with this value. Initialized toFALSEby default.penalty: If set to"optimCoxBoostPenalty", usesCoxBoost::optimCoxBoostPenalty()to determine the optimal penalty value and number of steps (viaCoxBoost::cv.CoxBoost()) for the final model.
Initial parameter values
cmprsk: Type of competing risks analysis. Initialized to"csh"(cause-specific hazards) which models each cause separately, treating other causes as censored."ccsh"(combined cause-specific hazards) is another option which combines information across causes for variable selection using a joint criterion.
References
Binder, Harald, Allignol, Arthur, Schumacher, Martin, Beyersmann, Jan (2009). “Boosting for high-dimensional time-to-event data with competing risks.” Bioinformatics, 25(7), 890–896.
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/basics.html#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 -> mlr3cmprsk::LearnerCompRisks -> LearnerCompRisksCoxboost
Methods
Method selected_features()
Returns the set of cause-specific selected features which have non-zero coefficients.
Calls the internal coef.CoxBoost() function.
Arguments
at_step(
integer(1))
Which boosting step to get the coefficients for. If no step is given (default), the final boosting step is used.cause(
integer(1))
Integer value indicating the event of interest.
Returns
(character()) vector of feature names.
Examples
# Define the Learner
learner = lrn("cmprsk.coxboost", stepno = 10)
print(learner)
#>
#> ── <LearnerCompRisksCoxboost> (cmprsk.coxboost): Likelihood-based Boosting for C
#> • Model: -
#> • Parameters: cv=FALSE, stepno=10, cmprsk=csh
#> • Packages: mlr3, mlr3cmprsk, mlr3extralearners, and CoxBoost
#> • Predict Types: [cif]
#> • Feature Types: integer and numeric
#> • Encapsulation: none (fallback: -)
#> • Properties: selected_features and weights
#> • Other settings: use_weights = 'use'
# Define a Task
task = tsk("pbc")
task$col_roles$feature = c("age", "chol", "copper", "platelet", "trig",
"albumin", "alk.phos", "ast", "bili", "protime")
# Stratification based on event
task$set_col_roles(cols = "status", add_to = "stratum")
# Create train and test set
ids = partition(task)
# Train the learner on the training ids
learner$train(task, row_ids = ids$train)
print(learner$model)
#> cause '1':
#> 10 boosting steps resulting in 3 non-zero coefficients
#> partial log-likelihood: -53.47794
#>
#> cause '2':
#> 10 boosting steps resulting in 6 non-zero coefficients
#> partial log-likelihood: -298.9053
print(learner$selected_features(cause = 1)) # for cause = 1
#> [1] "age" "chol" "trig"
print(learner$selected_features(cause = 2)) # for cause = 2
#> [1] "age" "copper" "platelet" "albumin" "bili" "protime"
# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)
# Score the predictions
predictions$score()
#> cmprsk.auc
#> 0.8861008