I recently came across the random search option in caret's trainControl()
Funktion. How does caret generate the parameters and is there a ways to provide some sort of user-specific input (e.g. a distributions where the parameters are sampled from)? On the website I only found this quote:
built-in models contained in caret contain code to generate random tuning parameter combinations
For example, I tried mxnet
with caret and random search:
# Train control with random search
rs_control <- trainControl(method = "boot",
number = 2,
search = "random",
verboseIter = TRUE
)
# Training
model_fit <- train(form = y ~ .,
data = df_train,
method = "avMxnet",
preProcess = c("center", "scale"),
tuneLength = 20,
trControl = rs_control
)
Using this code, caret sampled reasonable values for the number of neurons on the first layer and other parameters (learningrate, momentum, dropout and repeats) but keep the second/third layer constant at zero. Is there a ways to tell caret to sample for all three layers with a uniform distribution from e.g. [25, 150]?