R: PipeOpTaskRegrSurv

mlr_pipeops_trafotask_regrsurv {mlr3proba} | R Documentation

## PipeOpTaskRegrSurv

### Description

Transform TaskRegr to TaskSurv.

### Input and Output Channels

Input and output channels are inherited from PipeOpTaskTransformer.

The output is the input TaskRegr transformed to a TaskSurv.

### State

The `$state` is a named `list` with the `$state` elements inherited from PipeOpTaskTransformer.

### Parameters

The parameters are

- `status :: (numeric(1))`
  If `NULL` then assumed no censoring in the dataset. Otherwise should be a vector of `0/1`s of same length as the prediction object, where `1` is dead and `0` censored.

### Super classes

`mlr3pipelines::PipeOp` -> `mlr3proba::PipeOpTransformer` -> `mlr3proba::PipeOpTaskTransformer` -> `PipeOpTaskRegrSurv`

### Methods

#### Public methods

- `PipeOpTaskRegrSurv$new()`

- `PipeOpTaskRegrSurv$clone()`

Inherited methods

- `mlr3pipelines::PipeOp$predict()`

- `mlr3pipelines::PipeOp$print()`

- `mlr3pipelines::PipeOp$train()`

#### Method `new()`

Creates a new instance of this R6 class.

##### Usage

    PipeOpTaskRegrSurv$new(id = "trafotask_regrsurv")

##### Arguments

`id`

  (`character(1)`)
  Identifier of the resulting object.

#### Method `clone()`

The objects of this class are cloneable with this method.

##### Usage

    PipeOpTaskRegrSurv$clone(deep = FALSE)

##### Arguments

`deep`

  Whether to make a deep clone.

### See Also

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`

### Examples

    ## 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)

[Package mlr3proba version 0.3.2 Index]