Expected Improvement.
Dictionary
This AcqFunction can be instantiated via the dictionary
mlr_acqfunctions or with the associated sugar function acqf()
:
$get("ei")
mlr_acqfunctionsacqf("ei")
References
Jones, R. D, Schonlau, Matthias, Welch, J. W (1998). “Efficient Global Optimization of Expensive Black-Box Functions.” Journal of Global optimization, 13(4), 455--492.
Super classes
bbotk::Objective
-> mlr3mbo::AcqFunction
-> AcqFunctionEI
Public fields
y_best
(
numeric(1)
)
Best objective function value observed so far. In the case of maximization, this already includes the necessary change of sign.
Methods
Method new()
Creates a new instance of this R6 class.
Usage
AcqFunctionEI$new(surrogate = NULL)
Arguments
surrogate
(
NULL
| SurrogateLearner).
Examples
if (requireNamespace("mlr3learners") &
requireNamespace("DiceKriging") &
requireNamespace("rgenoud")) {
library(bbotk)
library(paradox)
library(mlr3learners)
library(data.table)
fun = function(xs) {
list(y = xs$x ^ 2)
}
domain = ps(x = p_dbl(lower = -10, upper = 10))
codomain = ps(y = p_dbl(tags = "minimize"))
objective = ObjectiveRFun$new(fun = fun, domain = domain, codomain = codomain)
instance = OptimInstanceSingleCrit$new(
objective = objective,
terminator = trm("evals", n_evals = 5))
instance$eval_batch(data.table(x = c(-6, -5, 3, 9)))
learner = lrn("regr.km",
covtype = "matern3_2",
optim.method = "gen",
nugget.stability = 10^-8,
control = list(trace = FALSE))
surrogate = srlrn(learner, archive = instance$archive)
acq_function = acqf("ei", surrogate = surrogate)
acq_function$surrogate$update()
acq_function$update()
acq_function$eval_dt(data.table(x = c(-1, 0, 1)))
}
#> acq_ei
#> 1: 4.129765
#> 2: 4.610817
#> 3: 5.095141