Last data update: 2014.03.03

R: Sequential multi-objective Expected Improvement maximization...
GParetoptimR Documentation

Sequential multi-objective Expected Improvement maximization and model re-estimation, with a number of iterations fixed in advance by the user

Description

Executes nsteps iterations of multi-objective EGO methods to objects of class km. At each step, kriging models are 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 one of the four multi-objective Expected Improvement criteria available.

Usage

GParetoptim(model, fn, cheapfn = NULL, crit = "SMS", nsteps, lower, upper,
  type = "UK", cov.reestim = TRUE, critcontrol = NULL,
  optimcontrol = list(method = "genoud", threshold = 1e-05, distance =
  "euclidean", notrace = FALSE), ...)

Arguments

model

list of objects of class km, one for each objective functions,

fn

the multi-objective function to be minimized (vectorial output), found by a call to match.fun,

cheapfn

optional additional fast-to-evaluate objective function (handled next with class fastfun), which does not need a kriging model, handled by a call to match.fun,

crit

choice of multi-objective improvement function: "SMS", "EHI", "EMI" or "SUR", see details below,

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,

type

"SK" or "UK" (by default), depending whether uncertainty related to trend estimation has to be taken into account,

cov.reestim

optional boolean specifying if the kriging hyperparameters should be re-estimated at each iteration,

critcontrol

optional list of parameters for criterion crit, see details,

optimcontrol

an optional list of control parameters for optimization of the selected infill criterion: "method" can be set to "discrete", "pso", "genoud" or a user defined method name (passed to match.fun). For "discrete", a matrix candidate.points must be given. For "pso" and "genoud", specific parameters to the chosen method can also be specified (see genoud and psoptim). A user defined method must have arguments like the default optim method, i.e. par, fn, lower, upper, ... and eventually control.
Option notrace can be set to TRUE to suppress printing of the optimization progresses.

...

additional parameters to be given to the objective fn.

Details

Extension of the function EGO.nsteps for multi-objective optimization.
Available infill criteria with crit are:

  • Expected Hypervolume Improvement (EHI) crit_EHI,

  • SMS criterion (SMS) crit_SMS,

  • Expected Maximin Improvement (EMI) crit_EMI,

  • Stepwise Uncertainty Reduction of the excursion volume (SUR) crit_SUR.

Depending on the selected criterion, parameters such as reference point for SMS and EHI or arguments for integration_design_optim with SUR can be given with critcontrol. Also options for checkPredict are available. More precisions are given in the corresponding help pages.

Display of results and various post-processings are available with plotGPareto.

Value

A list with components:

  • par: a data frame representing the additional points visited during the algorithm,

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

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

  • lastmodel: a list of objects of class km corresponding to the last kriging models fitted. If a problem occurs during either model updates or criterion maximization, the last working model and corresponding values are returned.

References

M. T. Emmerich, A. H. Deutz, J. W. Klinkenberg (2011), Hypervolume-based expected improvement: Monotonicity properties and exact computation, Evolutionary Computation (CEC), 2147-2154.

V. Picheny (2014), Multiobjective optimization using Gaussian process emulators via stepwise uncertainty reduction, Statistics and Computing.

T. Wagner, M. Emmerich, A. Deutz, W. Ponweiser (2010), On expected-improvement criteria for model-based multi-objective optimization. Parallel Problem Solving from Nature, 718-727, Springer, Berlin.

J. D. Svenson (2011), Computer Experiments: Multiobjective Optimization and Sensitivity Analysis, Ohio State university, PhD thesis.

Examples

set.seed(25468)
library(DiceDesign)

d <- 2

fname <- ZDT3
n.grid <- 21
test.grid = expand.grid(seq(0, 1, length.out = n.grid), seq(0, 1, length.out = n.grid))
nappr <- 15
design.grid <- maximinESE_LHS(lhsDesign(nappr, d, seed = 42)$design)$design
response.grid <- t(apply(design.grid, 1, fname))
Front_Pareto <- t(nondominated_points(t(response.grid)))

mf1 <- km(~., design = design.grid, response = response.grid[, 1])
mf2 <- km(~., design = design.grid, response = response.grid[, 2])
model <- list(mf1, mf2)

nsteps <- 2
lower <- rep(0, d)
upper <- rep(1, d)

# Optimization 1: EHI with pso
optimcontrol <- list(method = "pso", maxit = 20)
critcontrol <- list(refPoint = c(1, 10))
omEGO1 <- GParetoptim(model = model, fn = fname, crit = "EHI", nsteps = nsteps,
                     lower = lower, upper = upper, critcontrol = critcontrol,
                     optimcontrol = optimcontrol)
print(omEGO1$par)
print(omEGO1$values)

## Not run: 
# Optimization 2: SMS with discrete search
optimcontrol <- list(method = "discrete", candidate.points = test.grid)
critcontrol <- list(refPoint = c(1, 10))
omEGO2 <- GParetoptim(model = model, fn = fname, crit = "SMS", nsteps = nsteps,
                     lower = lower, upper = upper, critcontrol = critcontrol,
                     optimcontrol = optimcontrol)
print(omEGO2$par)
print(omEGO2$values)

# Optimization 3: SUR with genoud
optimcontrol <- list(method = "genoud", pop.size = 20, max.generations = 10)
critcontrol <- list(SURcontrol = list(distrib = "SUR", n.points = 100))
omEGO3 <- GParetoptim(model = model, fn = fname, crit = "SUR", nsteps = nsteps,
                     lower = lower, upper = upper, critcontrol = critcontrol,
                     optimcontrol = optimcontrol)
print(omEGO3$par)
print(omEGO3$values)

# Optimization 4: EMI with pso
optimcontrol <- list(method = "pso", maxit = 20)
critcontrol <- list(nbsamp = 200)
omEGO4 <- GParetoptim(model = model, fn = fname, crit = "EMI", nsteps = nsteps,
                     lower = lower, upper = upper, optimcontrol = optimcontrol)
print(omEGO4$par)
print(omEGO4$values)

# graphics
sol.grid <- apply(expand.grid(seq(0, 1, length.out = 100),
                              seq(0, 1, length.out = 100)), 1, fname)
plot(t(sol.grid), pch = 20, col = rgb(0, 0, 0, 0.05), xlim = c(0, 1),
     ylim = c(-2, 10), xlab = expression(f[1]), ylab = expression(f[2]))
plotGPareto(list = omEGO1, add = TRUE,
            control = list(pch = 20, col = "blue", PF.pch = 17,
                           PF.points.col = "blue", PF.line.col = "blue"))
text(omEGO1$values[,1], omEGO1$values[,2], labels = 1:nsteps, pos = 3, col = "blue")
plotGPareto(list = omEGO2, add = TRUE,
            control = list(pch = 20, col = "green", PF.pch = 17,
                           PF.points.col = "green", PF.line.col = "green"))
text(omEGO2$values[,1], omEGO2$values[,2], labels = 1:nsteps, pos = 3, col = "green")
plotGPareto(list = omEGO3, add = TRUE,
            control = list(pch = 20, col = "red", PF.pch = 17,
                           PF.points.col = "red", PF.line.col = "red"))
text(omEGO3$values[,1], omEGO3$values[,2], labels = 1:nsteps, pos = 3, col = "red")
plotGPareto(list = omEGO4, add = TRUE,
            control = list(pch = 20, col = "orange", PF.pch = 17,
                           PF.points.col = "orange", PF.line.col = "orange"))
text(omEGO4$values[,1], omEGO4$values[,2], labels = 1:nsteps, pos = 3, col = "orange")
points(response.grid[,1], response.grid[,2], col = "black", pch = 20)
legend("topright", c("EHI", "SMS", "SUR", "EMI"), col = c("blue", "green", "red", "orange"),
 pch = rep(17,4))


# Post-processing
plotGPareto(omEGO1, UQ_PF = T, UQ_PS = T, UQ_dens = T)


## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GPareto)
Loading required package: DiceKriging
Loading required package: emoa
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GPareto/GParetoptim.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GParetoptim
> ### Title: Sequential multi-objective Expected Improvement maximization and
> ###   model re-estimation, with a number of iterations fixed in advance by
> ###   the user
> ### Aliases: GParetoptim
> 
> ### ** Examples
> 
> set.seed(25468)
> library(DiceDesign)
> 
> d <- 2
> 
> fname <- ZDT3
> n.grid <- 21
> test.grid = expand.grid(seq(0, 1, length.out = n.grid), seq(0, 1, length.out = n.grid))
> nappr <- 15
> design.grid <- maximinESE_LHS(lhsDesign(nappr, d, seed = 42)$design)$design
> response.grid <- t(apply(design.grid, 1, fname))
> Front_Pareto <- t(nondominated_points(t(response.grid)))
> 
> mf1 <- km(~., design = design.grid, response = response.grid[, 1])

optimisation start
------------------
* estimation method   : MLE 
* optimisation method : BFGS 
* analytical gradient : used
* trend model : ~X1 + X2
* covariance model : 
  - type :  matern5_2 
  - nugget : NO
  - parameters lower bounds :  1e-10 1e-10 
  - parameters upper bounds :  1.827289 1.752323 
  - best initial criterion value(s) :  567.1158 

N = 2, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate     0  f=      -567.12  |proj g|=      0.87933
At iterate     1  f =      -568.62  |proj g|=             0

iterations 1
function evaluations 2
segments explored during Cauchy searches 2
BFGS updates skipped 0
active bounds at final generalized Cauchy point 2
norm of the final projected gradient 0
final function value -568.624

F = -568.624
final  value -568.623924 
converged
> mf2 <- km(~., design = design.grid, response = response.grid[, 2])

optimisation start
------------------
* estimation method   : MLE 
* optimisation method : BFGS 
* analytical gradient : used
* trend model : ~X1 + X2
* covariance model : 
  - type :  matern5_2 
  - nugget : NO
  - parameters lower bounds :  1e-10 1e-10 
  - parameters upper bounds :  1.827289 1.752323 
  - best initial criterion value(s) :  -13.98435 

N = 2, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate     0  f=       13.984  |proj g|=      0.72191
At iterate     1  f =       6.4968  |proj g|=             0

iterations 1
function evaluations 2
segments explored during Cauchy searches 2
BFGS updates skipped 0
active bounds at final generalized Cauchy point 2
norm of the final projected gradient 0
final function value 6.49676

F = 6.49676
final  value 6.496757 
converged
> model <- list(mf1, mf2)
> 
> nsteps <- 2
> lower <- rep(0, d)
> upper <- rep(1, d)
> 
> # Optimization 1: EHI with pso
> optimcontrol <- list(method = "pso", maxit = 20)
> critcontrol <- list(refPoint = c(1, 10))
> omEGO1 <- GParetoptim(model = model, fn = fname, crit = "EHI", nsteps = nsteps,
+                      lower = lower, upper = upper, critcontrol = critcontrol,
+                      optimcontrol = optimcontrol)
----------------------------
Starting optimization with : 
 The criterion EHI 
 The solver pso 
----------------------------
Ite / Crit / New x / New y 
1	/	-0.858	/	0	0	/	0	1	
2	/	-0.591	/	0.423	0	/	0.423	0.0652	

> print(omEGO1$par)
            X1 X2
[1,] 0.0000000  0
[2,] 0.4234162  0
> print(omEGO1$values)
           [,1]       [,2]
Y.new 0.0000000 1.00000000
Y.new 0.4234162 0.06515624
> 
> ## Not run: 
> ##D # Optimization 2: SMS with discrete search
> ##D optimcontrol <- list(method = "discrete", candidate.points = test.grid)
> ##D critcontrol <- list(refPoint = c(1, 10))
> ##D omEGO2 <- GParetoptim(model = model, fn = fname, crit = "SMS", nsteps = nsteps,
> ##D                      lower = lower, upper = upper, critcontrol = critcontrol,
> ##D                      optimcontrol = optimcontrol)
> ##D print(omEGO2$par)
> ##D print(omEGO2$values)
> ##D 
> ##D # Optimization 3: SUR with genoud
> ##D optimcontrol <- list(method = "genoud", pop.size = 20, max.generations = 10)
> ##D critcontrol <- list(SURcontrol = list(distrib = "SUR", n.points = 100))
> ##D omEGO3 <- GParetoptim(model = model, fn = fname, crit = "SUR", nsteps = nsteps,
> ##D                      lower = lower, upper = upper, critcontrol = critcontrol,
> ##D                      optimcontrol = optimcontrol)
> ##D print(omEGO3$par)
> ##D print(omEGO3$values)
> ##D 
> ##D # Optimization 4: EMI with pso
> ##D optimcontrol <- list(method = "pso", maxit = 20)
> ##D critcontrol <- list(nbsamp = 200)
> ##D omEGO4 <- GParetoptim(model = model, fn = fname, crit = "EMI", nsteps = nsteps,
> ##D                      lower = lower, upper = upper, optimcontrol = optimcontrol)
> ##D print(omEGO4$par)
> ##D print(omEGO4$values)
> ##D 
> ##D # graphics
> ##D sol.grid <- apply(expand.grid(seq(0, 1, length.out = 100),
> ##D                               seq(0, 1, length.out = 100)), 1, fname)
> ##D plot(t(sol.grid), pch = 20, col = rgb(0, 0, 0, 0.05), xlim = c(0, 1),
> ##D      ylim = c(-2, 10), xlab = expression(f[1]), ylab = expression(f[2]))
> ##D plotGPareto(list = omEGO1, add = TRUE,
> ##D             control = list(pch = 20, col = "blue", PF.pch = 17,
> ##D                            PF.points.col = "blue", PF.line.col = "blue"))
> ##D text(omEGO1$values[,1], omEGO1$values[,2], labels = 1:nsteps, pos = 3, col = "blue")
> ##D plotGPareto(list = omEGO2, add = TRUE,
> ##D             control = list(pch = 20, col = "green", PF.pch = 17,
> ##D                            PF.points.col = "green", PF.line.col = "green"))
> ##D text(omEGO2$values[,1], omEGO2$values[,2], labels = 1:nsteps, pos = 3, col = "green")
> ##D plotGPareto(list = omEGO3, add = TRUE,
> ##D             control = list(pch = 20, col = "red", PF.pch = 17,
> ##D                            PF.points.col = "red", PF.line.col = "red"))
> ##D text(omEGO3$values[,1], omEGO3$values[,2], labels = 1:nsteps, pos = 3, col = "red")
> ##D plotGPareto(list = omEGO4, add = TRUE,
> ##D             control = list(pch = 20, col = "orange", PF.pch = 17,
> ##D                            PF.points.col = "orange", PF.line.col = "orange"))
> ##D text(omEGO4$values[,1], omEGO4$values[,2], labels = 1:nsteps, pos = 3, col = "orange")
> ##D points(response.grid[,1], response.grid[,2], col = "black", pch = 20)
> ##D legend("topright", c("EHI", "SMS", "SUR", "EMI"), col = c("blue", "green", "red", "orange"),
> ##D  pch = rep(17,4))
> ##D 
> ##D 
> ##D # Post-processing
> ##D plotGPareto(omEGO1, UQ_PF = T, UQ_PS = T, UQ_dens = T)
> ##D 
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>