Skip to contents

Wrapper around predict.LearnerSurv and plot.Matdist.

Usage

# S3 method for 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.Matdist

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.Matdist

Examples

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