mlr_pipeops_trafopred_survregr: PipeOpPredSurvRegr

mlr_pipeops_trafopred_survregrR Documentation

PipeOpPredSurvRegr

Description

Transform PredictionSurv to PredictionRegr.

Input and Output Channels

Input and output channels are inherited from PipeOpPredTransformer.

The output is the input PredictionSurv transformed to a PredictionRegr. Censoring is ignored. crank and lp predictions are also ignored.

State

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

Super classes

mlr3pipelines::PipeOp -> mlr3proba::PipeOpTransformer -> mlr3proba::PipeOpPredTransformer -> PipeOpPredSurvRegr

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
PipeOpPredSurvRegr$new(id = "trafopred_survregr")
Arguments
id

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


Method clone()

The objects of this class are cloneable with this method.

Usage
PipeOpPredSurvRegr$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_trafotask_regrsurv, mlr_pipeops_trafotask_survregr

Other Transformation PipeOps: mlr_pipeops_trafopred_regrsurv, mlr_pipeops_trafotask_regrsurv, mlr_pipeops_trafotask_survregr

Examples

## Not run: 
if (requireNamespace("mlr3pipelines", quietly = TRUE)) {
  library(mlr3)
  library(mlr3pipelines)
  library(survival)

  # simple example
  pred = PredictionSurv$new(row_ids = 1:10, truth = Surv(1:10, rbinom(10, 1, 0.5)),
    response = 1:10)
  po = po("trafopred_survregr")
  new_pred = po$predict(list(pred = pred))[[1]]
  print(new_pred)
}

## End(Not run)

mlr3proba documentation built on April 25, 2022, 5:07 p.m.