| mlr_pipeops_trafotask_regrsurv | R Documentation |
Transform TaskRegr to TaskSurv.
Input and output channels are inherited from PipeOpTaskTransformer.
The output is the input TaskRegr transformed to a TaskSurv.
The $state is a named list with the $state elements inherited from PipeOpTaskTransformer.
The parameters are
status :: (numeric(1))
If NULL then assumed no censoring in the dataset. Otherwise should be a vector of 0/1s
of same length as the prediction object, where 1 is dead and 0 censored.
mlr3pipelines::PipeOp -> mlr3proba::PipeOpTransformer -> mlr3proba::PipeOpTaskTransformer -> PipeOpTaskRegrSurv
new()Creates a new instance of this R6 class.
PipeOpTaskRegrSurv$new(id = "trafotask_regrsurv")
id(character(1))
Identifier of the resulting object.
clone()The objects of this class are cloneable with this method.
PipeOpTaskRegrSurv$clone(deep = FALSE)
deepWhether to make a deep clone.
Other PipeOps:
PipeOpPredTransformer,
PipeOpTaskTransformer,
PipeOpTransformer,
mlr_pipeops_survavg,
mlr_pipeops_trafopred_regrsurv,
mlr_pipeops_trafopred_survregr,
mlr_pipeops_trafotask_survregr
Other Transformation PipeOps:
mlr_pipeops_trafopred_regrsurv,
mlr_pipeops_trafopred_survregr,
mlr_pipeops_trafotask_survregr
## Not run:
if (requireNamespace("mlr3pipelines", quietly = TRUE)) {
library(mlr3)
library(mlr3pipelines)
task = tsk("boston_housing")
po = po("trafotask_regrsurv")
# assume no censoring
new_task = po$train(list(task_regr = task, task_surv = NULL))[[1]]
print(new_task)
# add censoring
task_surv = tsk("rats")
task_regr = po("trafotask_survregr", method = "omit")$train(list(task_surv, NULL))[[1]]
print(task_regr)
new_task = po$train(list(task_regr = task_regr, task_surv = task_surv))[[1]]
new_task$truth()
task_surv$truth()
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.