Description Usage Arguments Value Examples
See mbo_parallel for all parallelization options.
1 2 3 4 5 6 7 8 |
fun |
[ |
design |
[ |
learner |
[ |
control |
[ |
show.info |
[ |
more.args |
[list] |
[MBOSingleObjResult
| MBOMultiObjResult
]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # simple 2d objective function
obj.fun = makeSingleObjectiveFunction(
fn = function(x) x[1]^2 + sin(x[2]),
par.set = makeNumericParamSet(id = "x", lower = -1, upper = 1, len = 2)
)
# create base control object
ctrl = makeMBOControl()
# do three MBO iterations
ctrl = setMBOControlTermination(ctrl, iters = 3L)
# use 500 points in the focussearch (should be sufficient for 2d)
ctrl = setMBOControlInfill(ctrl, opt.focussearch.points = 500)
# create initial design
des = generateDesign(n = 5L, getParamSet(obj.fun), fun = lhs::maximinLHS)
# start mbo
res = mbo(obj.fun, design = des, control = ctrl)
print(res)
## Not run:
plot(res)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.