Skip to content

Commit eb60872

Browse files
authored
change default optim.method in km (#285)
* change default optim.method in km
1 parent 2b7c32e commit eb60872

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

R/makeMboLearner.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#' The nugget effect is set to 10^-8 * Var(y) on each model training.
1111
#' For mixed parameter spaces the function returns a random forest regression learner.
1212
#' The method to estimate the variance is the standard deviation of the bagged predictions.
13+
#' Instead of the default \code{"BFGS"} optimization method we use rgenoud (\code{"gen"}),
14+
#' which is a hybrid algorithm, to combine global search based on genetic algorithms and local search based on gradients.
15+
#' This may improve the model fit and will produce a constant surrogate model much less frequent.
1316
#' You can override this setting in \code{...}.
1417
#'
1518
#' @template arg_control
@@ -23,7 +26,7 @@
2326
makeMboLearner = function(control, fun, ...) {
2427
par.vals = list(...)
2528
if (!hasDiscrete(getParamSet(fun), include.logical = TRUE)) {
26-
par.vals = insert(list(covtype = "matern5_2"), par.vals)
29+
par.vals = insert(list(covtype = "matern5_2", optim.method = "gen"), par.vals)
2730
base.learner = makeLearner("regr.km", predict.type = "se")
2831
if (!control$filter.proposed.points) {
2932
warningf("filter.proposed.points is not set in the control object. This might lead to the 'leading minor of order ...' error during model fit.")
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)