mlr_acqfunctions_aei {mlr3mbo} | R Documentation |
Acquisition Function Augmented Expected Improvement
Description
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.
Dictionary
This AcqFunction can be instantiated via the dictionary
mlr_acqfunctions or with the associated sugar function acqf()
:
mlr_acqfunctions$get("aei") acqf("aei")
Parameters
-
"c"
(numeric(1)
)
Constantc
as used in Formula (14) of Huang (2012) to reflect the degree of risk aversion. Defaults to1
.
Super classes
bbotk::Objective
-> mlr3mbo::AcqFunction
-> AcqFunctionAEI
Public fields
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 thenugget
estimate when using a mlr3learners as surrogate model.
Methods
Public methods
Inherited methods
Method new()
Creates a new instance of this R6 class.
Usage
AcqFunctionAEI$new(surrogate = NULL, c = 1)
Arguments
surrogate
(
NULL
| SurrogateLearner).c
(
numeric(1)
).
Method update()
Updates acquisition function and sets y_effective_best
and noise_var
.
Usage
AcqFunctionAEI$update()
Method clone()
The objects of this class are cloneable with this method.
Usage
AcqFunctionAEI$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
References
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.
See Also
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_pi
,
mlr_acqfunctions_sd
,
mlr_acqfunctions_smsego
Examples
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)))
}