plot.LearnerSurv {mlr3proba}R Documentation

Visualization of fitted LearnerSurv objects

Description

Wrapper around predict.LearnerSurv and plot.VectorDistribution.

Usage

## S3 method for class 'LearnerSurv'
plot(
  x,
  task,
  fun = c("survival", "pdf", "cdf", "quantile", "hazard", "cumhazard"),
  row_ids = NULL,
  newdata,
  ...
)

Arguments

x

(LearnerSurv)

task

(TaskSurv)

fun

(character)
Passed to distr6::plot.VectorDistribution

row_ids

(integer())
Passed to Learner$predict

newdata

(data.frame())
If not missing Learner$predict_newdata is called instead of Learner$predict.

...

Additional arguments passed to distr6::plot.VectorDistribution

Examples

## Not run: 
library(mlr3)
task = tsk("rats")

# Prediction Error Curves for prediction object
learn = lrn("surv.coxph")
learn$train(task)

plot(learn, task, "survival", ind = 10)
plot(learn, task, "survival", row_ids = 1:5)
plot(learn, task, "survival", newdata = task$data()[1:5, ])
plot(learn, task, "survival", newdata = task$data()[1:5, ], ylim = c(0, 1))

## End(Not run)

[Package mlr3proba version 0.4.2 Index]