EI | R Documentation |
The function EI
computes the Expected
Improvement at current location x
while EI.grad
compute the gradient at x
. The current minimum of the
observations in model
can be replaced by an arbitrary
value (plugin), which is useful in particular in noisy
frameworks.
EI( x, model, plugin = NULL, type = c("UK", "SK"), minimization = TRUE, envir = NULL, proxy = FALSE ) EI.grad( x, model, plugin = NULL, type = c("UK", "SK"), minimization = TRUE, envir = NULL, proxy = FALSE )
x |
A numeric vector representing the input for which one
wishes to calculate EI. The length d of this vector must
be equal to d, the dimension of the input space used for
the kriging results in |
model |
An object of class |
plugin |
Optional scalar: if provided, it replaces the minimum of the current observations. |
type |
|
minimization |
Logical specifying if EI is used in minimization or in maximization. |
envir |
An optional environment specifying where to assign
intermediate values for future gradient calculations. Default
is |
proxy |
Optional logical. If |
The Expected Improvement (EI) is defined as
E[{ min Y(X) - Y(x) }_+ | Y(X) = y(X)]
where X is the
current design of experiments and Y is the random
process assumed to have generated the objective function
y and z_+ = max(z, 0)
denotes the positive part of a real number z. The value
of EI is non-negative but can be numerically zero close to the
inputs used in model
. The EI and its gradient are
computed using their closed forms.
The expected improvement as defined in Details
(for EI
) or its gradient (for EI.grad
). If
plugin
is specified, its provided value will replace
min Y(X) in the formula. The EI and its
gradient are numeric vectors with length 1 and d.
David Ginsbourger, Olivier Roustant and Victor Picheny.
D. Ginsbourger (2009), Multiples métamodèles pour l'approximation et l'optimisation de fonctions numériques multivariables, Ph.D. thesis, Ècole Nationale Supérieure des Mines de Saint-Ètienne.
D.R. Jones, M. Schonlau, and W.J. Welch (1998), Efficient global optimization of expensive black-box functions, Journal of Global Optimization, 13, 455-492.
J. Mockus (1988), Bayesian Approach to Global Optimization. Kluwer academic publishers.
T.J. Santner, B.J. Williams, and W.J. Notz (2003), The design and analysis of computer experiments, Springer.
M. Schonlau (1997), Computer experiments and global optimization, Ph.D. thesis, University of Waterloo.
max_EI
, EGO.nsteps
,
qEI
set.seed(123) ## ========================================================================= ## EI Surface Associated with an Ordinary Kriging Model for the Branin ## Function Known at a 9-Points Factorial Design ## ========================================================================= ## a 9-points factorial design, and the corresponding response ## =========================================================== d <- 2; n <- 9 design.fact <- expand.grid(x1 = seq(0, 1, length = 3), x2 = seq(0, 1, length = 3)) y <- apply(design.fact, 1, branin) ## model fit ## ========= fit1 <- km(~1, design = design.fact, response = y, covtype = "gauss", control = list(pop.size = 50, trace = FALSE), parinit = c(0.5, 0.5)) ## computing the EI ## ================ x <- c(x1 = 0.2, x2 = 0.4) EI(x, model = fit1) EI.grad(x, model = fit1) ## graphics ## ======== contours(object = fit1, which = character(0), grad = TRUE, other = "EI", otherGrad = "EI.grad", whereGrad = "grid", nGrid = 30) + ggtitle("Expected Improvement and its gradient")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.