TREGO.nsteps {DiceOptim} | R Documentation |
Trust-region based EGO algorithm.
Description
Executes nsteps iterations of the TREGO 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
) over either the entire search space
or restricted to a trust region. The trust region is updated at each iteration
based on a sufficient decrease condition.
Usage
TREGO.nsteps(
model,
fun,
nsteps,
lower,
upper,
control = NULL,
kmcontrol = NULL,
trcontrol = NULL,
trace = 0,
n.cores = 1,
...
)
Arguments
model |
an object of class |
fun |
the objective function to be minimized, |
nsteps |
an integer representing the desired number of iterations, |
lower , upper |
vector of lower and upper bounds for the variables to be optimized over, |
control |
an optional list of control parameters for optimization.
For now only the number of |
kmcontrol |
an optional list representing the control variables for the re-estimation of the kriging model. |
trcontrol |
an optional list of control parameters for the trust-region scheme:
|
trace |
between -1 (no trace) and 3 (full messages) |
n.cores |
number of cores used for EI maximisation |
... |
additional parameters to be given to |
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 |
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 |
all.success |
a vector of Boolean indicating the successful steps according to the sufficient decrease condtion |
all.steps |
a vector of Boolean indicating which steps were global |
all.sigma |
history of trust region size |
all.x0 |
history of trust region centers |
local.model |
if trcontrol$local.model=TRUE, the latest local model |
Author(s)
Victor Picheny
References
Diouane, Picheny, Le Riche, Scotto Di Perrotolo (2021), TREGO: a Trust-Region Framework for Efficient Global Optimization, ArXiv
See Also
Examples
set.seed(123)
###############################################################
### 10 ITERATIONS OF TREGO 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))
# TREGO n steps
nsteps <- 5
lower <- rep(0, d)
upper <- rep(1, d)
oEGO <- TREGO.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)