# NOT RUN {
library(mlr3)
task = tsk("rats")
learner = lrn("surv.coxph")
learner$train(task)
p = learner$predict(task)
# convert to a data.table
tab = as.data.table(p)
# convert back to a Prediction
as_prediction_surv(tab)
# }
Run the code above in your browser using DataLab