mlr_pipeops_crankcompose | R Documentation |
Uses a predicted distr
in a PredictionSurv to estimate (or 'compose') a crank
prediction.
This PipeOp can be instantiated via the
dictionary mlr3pipelines::mlr_pipeops or with the associated sugar
function mlr3pipelines::po()
:
PipeOpCrankCompositor$new() mlr_pipeops$get("crankcompose") po("crankcompose")
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.
The $state
is left empty (list()
).
method
:: character(1)
Determines what method should be used to produce a continuous ranking from the distribution.
Currently only mort
is supported, which is the sum of the cumulative hazard, also called expected/ensemble mortality, see Ishwaran et al. (2008).
For more details, see get_mortality()
.
overwrite
:: logical(1)
If FALSE
(default) and the prediction already has a crank
prediction, then the compositor returns the input prediction unchanged.
If TRUE
, then the crank
will be overwritten.
mlr3pipelines::PipeOp
-> PipeOpCrankCompositor
new()
Creates a new instance of this R6 class.
PipeOpCrankCompositor$new(id = "crankcompose", param_vals = list())
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.
clone()
The objects of this class are cloneable with this method.
PipeOpCrankCompositor$clone(deep = FALSE)
deep
Whether to make a deep clone.
Sonabend, Raphael, Bender, Andreas, Vollmer, Sebastian (2022). “Avoiding C-hacking when evaluating survival distribution predictions with discrimination measures.” Bioinformatics. ISSN 1367-4803, \Sexpr[results=rd]{tools:::Rd_expr_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.
pipeline_crankcompositor
Other survival compositors:
mlr_pipeops_compose_breslow_distr
,
mlr_pipeops_distrcompose
,
mlr_pipeops_responsecompose
## Not run:
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$predict(list(pred))[[1L]]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.