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)
|
Loading required package: mlr
Loading required package: ParamHelpers
Loading required package: smoof
Loading required package: BBmisc
Loading required package: checkmate
Warning messages:
1: replacing previous import 'BBmisc::isFALSE' by 'backports::isFALSE' when loading 'ParamHelpers'
2: replacing previous import 'BBmisc::isFALSE' by 'backports::isFALSE' when loading 'mlrMBO'
Computing y column(s) for design. Not provided.
[mbo] 0: x=-0.403,-0.917 : y = -0.631 : 0.0 secs : initdesign
[mbo] 0: x=0.543,0.249 : y = 0.541 : 0.0 secs : initdesign
[mbo] 0: x=-0.721,0.196 : y = 0.714 : 0.0 secs : initdesign
[mbo] 0: x=0.823,-0.342 : y = 0.342 : 0.0 secs : initdesign
[mbo] 0: x=0.158,0.701 : y = 0.67 : 0.0 secs : initdesign
[mbo] 1: x=-1,-1 : y = 0.158 : 0.0 secs : infill_cb
[mbo] 2: x=-0.0395,-0.897 : y = -0.78 : 0.0 secs : infill_cb
[mbo] 3: x=-0.153,-0.854 : y = -0.73 : 0.0 secs : infill_cb
Recommended parameters:
x=-0.0395,-0.897
Objective: y = -0.780
Optimization path
5 + 3 entries in total, displaying last 10 (or less):
x1 x2 y dob eol error.message exec.time cb
1 -0.40285148 -0.9167219 -0.6313221 0 NA <NA> 0.000 NA
2 0.54266802 0.2489728 0.5408972 0 NA <NA> 0.002 NA
3 -0.72098463 0.1957773 0.7143478 0 NA <NA> 0.000 NA
4 0.82277888 -0.3420953 0.3415034 0 NA <NA> 0.000 NA
5 0.15788233 0.7006005 0.6696037 0 NA <NA> 0.000 NA
6 -0.99975597 -0.9999215 0.1580834 1 NA <NA> 0.000 -0.7874602
7 -0.03950051 -0.8969160 -0.7798458 2 NA <NA> 0.000 -0.7462996
8 -0.15295929 -0.8536134 -0.7302638 3 NA <NA> 0.000 -0.9355319
error.model train.time prop.type propose.time se mean lambda
1 <NA> NA initdesign NA NA NA NA
2 <NA> NA initdesign NA NA NA NA
3 <NA> NA initdesign NA NA NA NA
4 <NA> NA initdesign NA NA NA NA
5 <NA> NA initdesign NA NA NA NA
6 <NA> 0.255 infill_cb 0.122 0.1955507 -0.5919096 1
7 <NA> 0.661 infill_cb 0.042 0.1983255 -0.5479741 1
8 <NA> 0.042 infill_cb 0.049 0.2151662 -0.7203658 1
Loading required package: grid
Attaching package: 'grid'
The following object is masked from 'package:BBmisc':
explode
Loading required package: gridExtra
Loading required package: akima
Loading required package: reshape2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.