mlr_acqfunctions_aei | R Documentation |
Augmented Expected Improvement.
Useful when working with noisy objectives.
Currently only works correctly with "regr.km"
as surrogate model and nugget.estim = TRUE
or given.
This AcqFunction can be instantiated via the dictionary
mlr_acqfunctions or with the associated sugar function acqf()
:
mlr_acqfunctions$get("aei") acqf("aei")
"c"
(numeric(1)
)
Constant c
as used in Formula (14) of Huang (2012) to reflect the degree of risk aversion. Defaults to 1
.
bbotk::Objective
-> mlr3mbo::AcqFunction
-> AcqFunctionAEI
y_effective_best
(numeric(1)
)
Best effective objective value observed so far.
In the case of maximization, this already includes the necessary change of sign.
noise_var
(numeric(1)
)
Estimate of the variance of the noise.
This corresponds to the nugget
estimate when using a mlr3learners as surrogate model.
new()
Creates a new instance of this R6 class.
AcqFunctionAEI$new(surrogate = NULL, c = 1)
surrogate
(NULL
| SurrogateLearner).
c
(numeric(1)
).
update()
Update the acquisition function and set y_effective_best
and noise_var
.
AcqFunctionAEI$update()
clone()
The objects of this class are cloneable with this method.
AcqFunctionAEI$clone(deep = FALSE)
deep
Whether to make a deep clone.
Huang D, Allen TT, Notz WI, Zheng N (2012). “Erratum To: Global Optimization of Stochastic Black-box Systems via Sequential Kriging Meta-Models.” Journal of Global Optimization, 54(2), 431–431.
Other Acquisition Function:
AcqFunction
,
mlr_acqfunctions
,
mlr_acqfunctions_cb
,
mlr_acqfunctions_ehvi
,
mlr_acqfunctions_ehvigh
,
mlr_acqfunctions_ei
,
mlr_acqfunctions_eips
,
mlr_acqfunctions_mean
,
mlr_acqfunctions_multi
,
mlr_acqfunctions_pi
,
mlr_acqfunctions_sd
,
mlr_acqfunctions_smsego
if (requireNamespace("mlr3learners") &
requireNamespace("DiceKriging") &
requireNamespace("rgenoud")) {
library(bbotk)
library(paradox)
library(mlr3learners)
library(data.table)
set.seed(2906)
fun = function(xs) {
list(y = xs$x ^ 2 + rnorm(length(xs$x), mean = 0, sd = 1))
}
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,
properties = "noisy")
instance = OptimInstanceBatchSingleCrit$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 = "matern5_2",
optim.method = "gen",
nugget.estim = TRUE,
jitter = 1e-12,
control = list(trace = FALSE))
surrogate = srlrn(learner, archive = instance$archive)
acq_function = acqf("aei", surrogate = surrogate)
acq_function$surrogate$update()
acq_function$update()
acq_function$eval_dt(data.table(x = c(-1, 0, 1)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.