
Competing Risks Learner
LearnerCompRisks.RdThis Learner specializes Learner for competing risks problems:
task_typeis set to"cmprsk"Creates Predictions of class PredictionCompRisks.
The only currently available option for
predict_typesis"cif", which represents the predicted cumulative incidence function for each observation in the test set.
Super class
mlr3::Learner -> LearnerCompRisks
Methods
Method new()
Creates a new instance of this R6 class.
Usage
LearnerCompRisks$new(
id,
param_set = ps(),
predict_types = "cif",
feature_types = character(),
properties = character(),
packages = character(),
label = NA_character_,
man = NA_character_
)Arguments
id(
character(1))
Identifier for the new instance.param_set(paradox::ParamSet)
Set of hyperparameters.predict_types(
character())
Supported predict types. Must be a subset ofmlr_reflections$learner_predict_types.feature_types(
character())
Feature types the learner operates on. Must be a subset ofmlr_reflections$task_feature_types.properties(
character())
Set of properties of the Learner (see initialization method$new(). Must be a subset ofmlr_reflections$learner_properties.packages(
character())
Set of required packages. A warning is signaled by the constructor if at least one of the packages is not installed, but loaded (not attached) later on-demand viarequireNamespace().label(
character(1))
Label for the new instance.man(
character(1))
String in the format[pkg]::[topic]pointing to a manual page for this object. The referenced help package can be opened via method$help().
Examples
library(mlr3)
# get all survival learners from mlr_learners:
lrns = mlr_learners$mget(mlr_learners$keys("^cmprsk"))
names(lrns)
#> [1] "cmprsk.aalen"
# get a specific learner from mlr_learners:
mlr_learners$get("cmprsk.aalen")
#>
#> ── <LearnerCompRisksAalenJohansen> (cmprsk.aalen): Aalen Johansen Estimator ────
#> • Model: -
#> • Parameters: list()
#> • Packages: mlr3, mlr3cmprsk, and survival
#> • Predict Types: [cif]
#> • Feature Types: logical, integer, numeric, and factor
#> • Encapsulation: none (fallback: -)
#> • Properties: weights
#> • Other settings: use_weights = 'use'
lrn("cmprsk.aalen")
#>
#> ── <LearnerCompRisksAalenJohansen> (cmprsk.aalen): Aalen Johansen Estimator ────
#> • Model: -
#> • Parameters: list()
#> • Packages: mlr3, mlr3cmprsk, and survival
#> • Predict Types: [cif]
#> • Feature Types: logical, integer, numeric, and factor
#> • Encapsulation: none (fallback: -)
#> • Properties: weights
#> • Other settings: use_weights = 'use'