min_quantile {DiceOptim}R Documentation

Minimization of the Kriging quantile.

Description

Minimization, based on the package rgenoud of the kriging quantile.

Usage

min_quantile(
  model,
  beta = 0.1,
  type = "UK",
  lower,
  upper,
  parinit = NULL,
  control = NULL
)

Arguments

model

a Kriging model of "km" class

beta

Quantile level (default value is 0.1)

type

Kriging type: "SK" or "UK"

lower

vector containing the lower bounds of the variables to be optimized over

upper

vector containing the upper bounds of the variables to be optimized over

parinit

optional vector containing the initial values for the variables to be optimized over

control

optional list of control parameters for optimization. One can control "pop.size" (default : [N=3*2^dim for dim<6 and N=32*dim otherwise]), "max.generations" (12), "wait.generations" (2) and "BFGSburnin" (2) of function "genoud" (see genoud). Numbers into brackets are the default values

Value

A list with components:

par

the best set of parameters found.

value

the value of the krigign quantile at par.

Author(s)

Victor Picheny

David Ginsbourger

Examples



##########################################################################
###    KRIGING QUANTILE SURFACE AND OPTIMIZATION PERFORMED BY GENOUD  ####
###    FOR AN ORDINARY KRIGING MODEL                                  ####
### OF THE BRANIN FUNCTION KNOWN AT A 12-POINT LATIN HYPERCUBE DESIGN ####
##########################################################################
set.seed(10)

# Set test problem parameters
doe.size <- 10
dim <- 2
test.function <- get("branin2")
lower <- rep(0,1,dim)
upper <- rep(1,1,dim)
noise.var <- 0.2

# Generate DOE and response
doe <- as.data.frame(matrix(runif(doe.size*dim),doe.size))
y.tilde <- rep(0, 1, doe.size)
for (i in 1:doe.size)  {y.tilde[i] <- test.function(doe[i,]) 
+ sqrt(noise.var)*rnorm(n=1)}
y.tilde <- as.numeric(y.tilde)

# Create kriging model
model <- km(y~1, design=doe, response=data.frame(y=y.tilde),
     covtype="gauss", noise.var=rep(noise.var,1,doe.size), 
     lower=rep(.1,dim), upper=rep(1,dim), control=list(trace=FALSE))

# Optimisation using max_kriging.quantile
res <- min_quantile(model, beta=0.1, type = "UK", lower=c(0,0), upper=c(1,1)) 
X.genoud <- res$par

# Compute actual function and criterion on a grid
n.grid <- 12 # Change to 21 for a nicer picture
x.grid <- y.grid <- seq(0,1,length=n.grid)
design.grid <- expand.grid(x.grid, y.grid)
names(design.grid) <- c("V1","V2")
nt <- nrow(design.grid)
crit.grid <- apply(design.grid, 1, kriging.quantile, model=model, beta=.1)

# # 2D plots
z.grid <- matrix(crit.grid, n.grid, n.grid)
tit <- "Green: best point found by optimizer"
filled.contour(x.grid,y.grid, z.grid, nlevels=50, color = topo.colors,
plot.axes = {title(tit);points(model@X[,1],model@X[,2],pch=17,col="blue"); 
points(X.genoud[1],X.genoud[2],pch=17,col="green");
axis(1); axis(2)})


[Package DiceOptim version 2.1.1 Index]