Skip to content

Bug: InfillOptEA does not restart #486

@rodemann

Description

@rodemann

Hello! :)
I would like to report a possible bug: infillOptEA does not restart, but only runs one time. Object best.x is returned in line 63 INSIDE the outer loop. Shouldn't it be returned in line 64, i.e. after the whole opimization could restart a few times?
I wrote a MRE below, based on the quickstart tutorial. I edited infilloptEA() so that it prints the current restart iteration. You will see that in each iteration of the mbo only "1" is printed. So with opt.restarts set to 3 (default), infillOptEA misses two restarts.

Best
Julian

library(mlrMBO)
library(mlr)
library(smoof)
# CRAN-Version of mlrMBO with print(restart.iter)in line 63 between "rownames(best.x) = NULL"
# and "return(best.x)" in the function infillOptEA 

set.seed(260320)
obj.fun = makeCosineMixtureFunction(1)
des = generateDesign(n = 5, par.set = getParamSet(obj.fun), fun = lhs::randomLHS)
des$y = apply(des, 1, obj.fun)
surr.km = makeLearner("regr.km", predict.type = "se", covtype = "matern3_2", control = list(trace = FALSE))
control = makeMBOControl()
control = setMBOControlTermination(control, iters = 10)
control = setMBOControlInfill(control, opt = "ea", crit = makeMBOInfillCritEI())

mbo(obj.fun, design = des, learner = surr.km, control = control, show.info = TRUE)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions