| gridsearch | R Documentation |
Grid search to optimise hyperparameters for FUN
gridsearch(x, y, searchspace, FUN, nfolds = 5, nrepcv = 2, ...)
x |
|
y |
|
searchspace |
|
FUN |
|
nfolds |
|
nrepcv |
|
... |
further arguments passed to |
data.frame with tested hyperparameters and metric
iris <- subset(iris, Species != "setosa")
searchspace <- expand.grid(
mtry = c(2, 3),
num.trees = c(500, 1000)
)
## nfolds and nrepcv are too low for real world applications, and are just
## used for demonstration and to keep the run time of the examples low
gs_rusranger(
iris[-5], as.numeric(iris$Species == "versicolor"),
searchspace = searchspace, nfolds = 3, nrepcv = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.