Uses a predicted distr in a PredictionSurv to estimate (or 'compose') a crank prediction.
Dictionary
This PipeOp can be instantiated via the
dictionary mlr3pipelines::mlr_pipeops or with the associated sugar
function mlr3pipelines::po():
Input and Output Channels
PipeOpCrankCompositor has one input channel named "input", which takes NULL during training and PredictionSurv during prediction.
PipeOpCrankCompositor has one output channel named "output", producing NULL during training and a PredictionSurv during prediction.
The output during prediction is the PredictionSurv from the input but with the crank predict type overwritten by the given estimation method.
State
The $state is left empty (list()).
Parameters
method::character(1)
Determines what method should be used to produce a continuous ranking from the distribution. Currently onlymortis supported, which is the sum of the cumulative hazard, also called expected/ensemble mortality, see Ishwaran et al. (2008). For more details, seeget_mortality().overwrite::logical(1)
IfFALSE(default) and the prediction already has acrankprediction, then the compositor returns the input prediction unchanged. IfTRUE, then thecrankwill be overwritten.
References
Sonabend, Raphael, Bender, Andreas, Vollmer, Sebastian (2022). “Avoiding C-hacking when evaluating survival distribution predictions with discrimination measures.” Bioinformatics. ISSN 1367-4803, doi:10.1093/BIOINFORMATICS/BTAC451 , https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btac451/6640155.
Ishwaran, Hemant, Kogalur, B U, Blackstone, H E, Lauer, S M, others (2008). “Random survival forests.” The Annals of applied statistics, 2(3), 841–860.
See also
Other survival compositors:
mlr_pipeops_compose_breslow_distr,
mlr_pipeops_distrcompose,
mlr_pipeops_responsecompose
Super class
mlr3pipelines::PipeOp -> PipeOpCrankCompositor
Methods
Method new()
Creates a new instance of this R6 class.
Usage
PipeOpCrankCompositor$new(id = "crankcompose", param_vals = list())Arguments
id(
character(1))
Identifier of the resulting object.param_vals(
list())
List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction.
Examples
if (FALSE) { # \dontrun{
library(mlr3pipelines)
task = tsk("rats")
# change the crank prediction type of a Cox's model predictions
pred = lrn("surv.coxph")$train(task)$predict(task)
poc = po("crankcompose", param_vals = list(overwrite = TRUE))
poc$train(list(NULL)) # need to train first, even if nothing happens
poc$predict(list(pred))[[1L]]
} # }