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(paradox) | |
search_space <- ps( | |
## p_dbl for numeric valued parameters | |
dropout = p_dbl(lower = 0, upper = 1), | |
weight_decay = p_dbl(lower = 0, upper = 0.5), | |
learning_rate = p_dbl(lower = 0, upper = 1), | |
## p_int for integer valued parameters | |
nodes = p_int(lower = 1, upper = 32), |
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 |
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
set_seed(1234) |
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(survivalmodels) | |
install_pycox(pip = TRUE, install_torch = TRUE) | |
install_keras(pip = TRUE, install_tensorflow = TRUE) |
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
options(repos=c( | |
mlrorg = 'https://mlr-org.r-universe.dev', | |
raphaels1 = 'https://raphaels1.r-universe.dev', | |
CRAN = 'https://cloud.r-project.org' | |
)) | |
install.packages(c("ggplot2", "mlr3benchmark", "mlr3pipelines", "mlr3proba", "mlr3tuning", | |
"survivalmodels", "mlr3extralearners")) |
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
#' riscitation - Create .ris file from R citation | |
#' | |
#' Suggests: | |
#' Package `berryFunctions` if `opendelete = TRUE`. | |
#' | |
#' Arguments | |
#' `pkg:character(1)` - Name of package to cite | |
#' `path:character(1)` - Path to write file too, should include file name but not extension | |
#' `opendelete:logical(1)` - If `TRUE` (default), opens the .ris file in the default application then deletes | |
#' the file. |
NewerOlder