This is a wrapper around the PipeOpCrankCompositor pipe operation, which simplifies graph creation.

crankcompositor(
  learner,
  method = c("mean", "median", "mode"),
  param_vals = list()
)

Arguments

learner

LearnerSurv object for which a crank is composed (or over-written)

method

One of mean, mode, or median; abbreviations allowed. Used to determine how crank is estimated from the predicted distr. Default is mean.

param_vals

Additional parameters to pass to the learner.

Value

mlr3pipelines::GraphLearner

Details

For full details see PipeOpCrankCompositor.

Examples

if (FALSE) { library(mlr3) library(mlr3pipelines) task = tgen("simsurv")$generate(20) ranger.crank = crankcompositor(learner = lrn("surv.coxph"), method = "median") resample(task, ranger.crank, rsmp("cv", folds = 2))$predictions() }