Last active
April 18, 2021 08:15
-
-
Save RaphaelS1/6d493eea6630b401f891620789001e51 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(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), | |
k = p_int(lower = 1, upper = 4) | |
) | |
search_space$trafo <- function(x, param_set) { | |
x$num_nodes = rep(x$nodes, x$k) | |
x$nodes = x$k = NULL | |
return(x) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment