max_crit {DiceOptim}R Documentation

Maximization of the Expected Improvement criterion

Description

For a number of control$restarts, generates a large number of random samples, then picks the one with best EI value to start L-BFGS.

Usage

max_crit(
  model,
  type = "UK",
  lower,
  upper,
  minimization = TRUE,
  control = NULL,
  proxy = FALSE,
  trcontrol = NULL,
  n.cores = 1
)

Arguments

model

an object of class km ,

type

Kriging type: "SK" or "UK"

lower, upper

vectors of lower and upper bounds for the variables to be optimized over,

minimization

logical specifying if EI is used in minimiziation or in maximization,

control

optional list of control parameters for optimization. For now only the number of restarts can be set.

proxy

Boolean, if TRUE, then EI maximization is replaced by the minimization of the kriging mean.

trcontrol

an optional list to activate the Trust-region management (see TREGO.nsteps)

n.cores

Number of cores if parallel computation is used

Value

A list with components:

par

The best set of parameters found.

value

The value of expected improvement at par.

Author(s)

Victor Picheny

Examples


set.seed(123)
library(parallel)
##########################################################
### "ONE-SHOT" EI-MAXIMIZATION OF 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(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 one step
lower <- rep(0,d) 
upper <- rep(1,d)     # domain for Branin function
oEGO <- max_crit(fitted.model1, lower=lower, upper=upper)
print(oEGO)

# graphics
n.grid <- 20
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[1], oEGO$par[2], pch=19, col="red")

[Package DiceOptim version 2.1.1 Index]