Skip to contents

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.

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.

Examples

if (FALSE) {
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)
}
}