Created
April 17, 2021 09:24
-
-
Save RaphaelS1/af71c30562157ae3b43dcb60cbf6e3f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(mlr3) | |
library(mlr3proba) | |
## get the `whas` task from mlr3proba | |
whas <- tsk("whas") | |
## create our own task from the rats dataset | |
rats_data <- survival::rats | |
## convert characters to factors | |
rats_data$sex <- factor(rats_data$sex, levels = c("f", "m")) | |
rats <- TaskSurv$new("rats", rats_data, time = "time", event = "status") | |
## combine in list | |
tasks <- list(whas, rats) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment