A new R6 and much more modular implementation for single- and multicrit Bayesian optimization. We are really not done here! Very prelim code, so beware!

tic CRAN status StackOverflow Mattermost

List of some Ideas

Simple Example

```{r example} set.seed(1) library(bbotk) library(mlr3mbo) library(paradox) library(mlr3learners)

obfun = ObjectiveRFunnew(fun = function(xs)sum(unlist(xs)2), domain = ParamSetnew(list(ParamDbl$new(“x”, -5, 5))), id = “test” )

terminator = trm(“evals”, n_evals = 20)

instance = OptimInstanceSingleCrit$new( objective = obfun, terminator = terminator )

design = generate_design_lhs(obfundomain, 4)data instance$eval_batch(design)

surrogate = SurrogateSingleCritLearner$new(learner = lrn("regr.km")) acqfun = AcqFunctionCB$new(surrogate = surrogate) acqopt = AcqOptimizerFromOptimizer$new( opt("random_search", batch_size = 100), trm("evals", n_evals = 100) ) bayesopt_soo(instance, acq_function, acq_optimizer) plot(y~batch_nr, instance$archive$data()[batch_nr>1,], type = “b”)


## Multipoint through constant liar

```{r cl_example}
instance = OptimInstanceSingleCrit$new(
  objective = obfun, 
  terminator = terminator
)
design = generate_design_lhs(obfun$domain, 4)$data
instance$eval_batch(design)

surrogate = SurrogateSingleCritLearner$new(learner = lrn("regr.km"))
acqfun = AcqFunctionCB$new(surrogate = surrogate)
acqopt = AcqOptimizerFromOptimizer$new(
  opt("random_search", batch_size = 100), 
  trm("evals", n_evals = 100)
)
bayesopt_mpcl(instance, acq_function, acq_optimizer)
plot(y~batch_nr, instance$archive$data()[batch_nr>1,], type = "b")