# NOT RUN {
library(mlr3)
library(mlr3proba)
library(mlr3viz)
learn = lrn("surv.coxph")
task = tsk("unemployment")
p = learn$train(task, row_ids = 1:300)$predict(task, row_ids = 301:400)
# calibration by comparison of average prediction to Kaplan-Meier
autoplot(p, type = "calib", task = task, row_ids = 301:400)
# Distribution-calibration (D-Calibration)
autoplot(p, type = "dcalib")
# Predictions
autoplot(p, type = "preds")
# }
Run the code above in your browser using DataLab