fastEGO.nsteps {DiceOptim}R Documentation

Sequential EI maximization and model re-estimation, with a number of iterations fixed in advance by the user

Description

Executes nsteps iterations of the EGO method to an object of class km. At each step, a kriging model is re-estimated (including covariance parameters re-estimation) based on the initial design points plus the points visited during all previous iterations; then a new point is obtained by maximizing the Expected Improvement criterion (EI).

Usage

fastEGO.nsteps(
  model,
  fun,
  nsteps,
  lower,
  upper,
  control = NULL,
  trace = 0,
  n.cores = 1,
  ...
)

Arguments

model

an object of class km ,

fun

the objective function to be minimized,

nsteps

an integer representing the desired number of iterations,

lower

vector of lower bounds for the variables to be optimized over,

upper

vector of upper bounds for the variables to be optimized over,

control

an optional list of control parameters for EGO. One can control

"warping" whether or not a warping is applied to the outputs (default FALSE)

"cov.reestim" whether or not the covariance parameters are estimated at each step (default TRUE) "gpmean.trick" whether or not EI should be replaced periodically by the GP mean (default FALSE)

"gpmean.freq" frequency at which EI is replaced by the GP mean (default 1e4)

"always.sample" if TRUE, forces observation even if it creates poor conditioning

trace

between -1 (no trace) and 3 (full messages)

n.cores

number of cores used for EI maximisation

...

additional parameters to be given to fun

Value

A list with components:

par

a data frame representing the additional points visited during the algorithm,

value

a data frame representing the response values at the points given in par,

npoints

an integer representing the number of parallel computations (=1 here),

nsteps

an integer representing the desired number of iterations (given in argument),

lastmodel

an object of class km corresponding to the last kriging model fitted. If warping is true, y values are normalized (warped) and will not match value.

Author(s)

Victor Picheny

References

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.

See Also

EI, max_crit, EI.grad

Examples


set.seed(123)
###############################################################
### 	10 ITERATIONS OF EGO ON THE BRANIN FUNCTION, 	   ####
###	 STARTING FROM A 9-POINTS FACTORIAL DESIGN         ####
###############################################################

# a 9-points factorial design, and the corresponding response
d <- 2
n <- 9
design.fact <- expand.grid(seq(0,1,length=3), seq(0,1,length=3)) 
names(design.fact)<-c("x1", "x2")
design.fact <- data.frame(design.fact) 
names(design.fact)<-c("x1", "x2")
response.branin <- apply(design.fact, 1, branin)
response.branin <- data.frame(response.branin) 
names(response.branin) <- "y" 

# model identification
fitted.model1 <- km(~1, design=design.fact, response=response.branin, 
covtype="gauss", control=list(pop.size=50,trace=FALSE), parinit=c(0.5, 0.5))

# EGO n steps
nsteps <- 5 
lower <- rep(0,d) 
upper <- rep(1,d)     
oEGO <- fastEGO.nsteps(model=fitted.model1, fun=branin, nsteps=nsteps, lower=lower, upper=upper)
print(oEGO$par)
print(oEGO$value)

# graphics
n.grid <- 15 # Was 20, reduced to 15 for speeding up compilation
x.grid <- y.grid <- seq(0,1,length=n.grid)
design.grid <- expand.grid(x.grid, y.grid)
response.grid <- apply(design.grid, 1, branin)
z.grid <- matrix(response.grid, n.grid, n.grid)
contour(x.grid, y.grid, z.grid, 40)
title("Branin function")
points(design.fact[,1], design.fact[,2], pch=17, col="blue")
points(oEGO$par, pch=19, col="red")
text(oEGO$par[,1], oEGO$par[,2], labels=1:nsteps, pos=3)


[Package DiceOptim version 2.1.1 Index]