Generates plots for mlr3proba::PredictionSurv, depending on argument type:

• "calib" (default): Calibration plot comparing the average predicted survival distribution to a Kaplan-Meier prediction, this is not a comparison of a stratified crank or lp prediction. object must have distr prediction. geom_line() is used for comparison split between the prediction (Pred) and Kaplan-Meier estimate (KM). In addition labels are added for the x (T) and y (S(T)) axes.

# S3 method for PredictionSurv
autoplot(
object,
type = "calib",
row_ids = NULL,
times = NULL,
...
)

## Arguments

object (character(1)): Type of the plot. See description. (mlr3proba::TaskSurv) If type = "calib" then task is passed to $predict in the Kaplan-Meier learner. (integer()) If type = "calib" then row_ids is passed to $predict in the Kaplan-Meier learner. (numeric()) If type = "calib" then times is the values on the x-axis to plot over, if NULL uses all times from task. (any): Additional arguments, currently unused.

## Examples

library(mlr3)
library(mlr3proba)
library(mlr3viz)

learn = lrn("surv.coxph")
p = learn$train(task, row_ids = 1:100)$predict(task, row_ids = 101:200)