Extends an MBO control object with infill criteria and infill optimizer options.
setMBOControlTermination( control, iters = NULL, time.budget = NULL, exec.time.budget = NULL, target.fun.value = NULL, max.evals = NULL, more.termination.conds = list(), use.for.adaptive.infill = NULL )
control | [ |
---|---|
iters | [ |
time.budget | [ |
exec.time.budget | [ |
target.fun.value | [ |
max.evals | [ |
more.termination.conds | [
|
use.for.adaptive.infill | [ |
[MBOControl
].
Other MBOControl:
makeMBOControl()
,
setMBOControlInfill()
,
setMBOControlMultiObj()
,
setMBOControlMultiPoint()
fn = smoof::makeSphereFunction(1L) ctrl = makeMBOControl() # custom termination condition (stop if target function value reached) # We neglect the optimization direction (min/max) in this example. yTargetValueTerminator = function(y.val) { force(y.val) function(opt.state) { opt.path = opt.state$opt.path current.best = getOptPathEl(opt.path, getOptPathBestIndex((opt.path)))$y term = (current.best <= y.val) message = if (!term) NA_character_ else sprintf("Target function value %f reached.", y.val) return(list(term = term, message = message)) } } # assign custom termination condition ctrl = setMBOControlTermination(ctrl, more.termination.conds = list(yTargetValueTerminator(0.05))) res = mbo(fn, control = ctrl)#>#>#>#>#>#>#>#>#>print(res)#> Recommended parameters: #> x=0.144 #> Objective: y = 0.021 #> #> Optimization path #> 4 + 4 entries in total, displaying last 10 (or less): #> x y dob eol error.message exec.time cb error.model #> 1 -3.6953594 13.65568112 0 NA <NA> 0.000 NA <NA> #> 2 2.0814326 4.33236157 0 NA <NA> 0.000 NA <NA> #> 3 -2.4934847 6.21746596 0 NA <NA> 0.000 NA <NA> #> 4 2.6296002 6.91479717 0 NA <NA> 0.000 NA <NA> #> 5 1.8167531 3.30059200 1 NA <NA> 0.001 2.9284423 <NA> #> 6 0.9548314 0.91170306 2 NA <NA> 0.000 1.1170946 <NA> #> 7 -0.3845713 0.14789507 3 NA <NA> 0.000 -1.7860681 <NA> #> 8 0.1436811 0.02064425 4 NA <NA> 0.001 -0.4403414 <NA> #> train.time prop.type propose.time se mean lambda #> 1 NA initdesign NA NA NA NA #> 2 NA initdesign NA NA NA NA #> 3 NA initdesign NA NA NA NA #> 4 NA initdesign NA NA NA NA #> 5 0.020 infill_cb 0.125 2.4141499 5.34259219 1 #> 6 0.020 infill_cb 0.127 2.9398519 4.05694646 1 #> 7 0.037 infill_cb 0.134 2.0162487 0.23018064 1 #> 8 0.027 infill_cb 0.130 0.4823983 0.04205684 1