View source: R/as_prediction_surv.R
as_prediction_surv | R Documentation |
Convert object to a PredictionSurv.
as_prediction_surv(x, ...)
## S3 method for class 'PredictionSurv'
as_prediction_surv(x, ...)
## S3 method for class 'data.frame'
as_prediction_surv(x, ...)
x |
(any) |
... |
(any) |
PredictionSurv.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.