getDesign: Get design corresponding to an objective target

View source: R/getDesign.R

getDesignR Documentation

Get design corresponding to an objective target

Description

Find the design that maximizes the probability of dominating a target given by the user.

Usage

getDesign(model, target, lower, upper, optimcontrol = NULL)

Arguments

model

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

target

vector corresponding to the desired output in the objective space,

lower

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

upper

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

optimcontrol

optional list of control parameters for optimization of the selected infill criterion. "method" set the optimization method; one can choose between "discrete", "pso" and "genoud". For each method, further parameters can be set.
For "discrete", one has to provide the argument "candidate.points".
For "pso", one can control the maximum number of iterations "maxit" (400) and the population size "s" (default : max(20, floor(10+2*sqrt(length(dim)))) (see psoptim).
For "genoud", one can control, among others, "pop.size" (default : [N = 3*2^dim for dim < 6 and N = 32*dim otherwise]), "max.generations" (12), "wait.generations" (2), "BFGSburnin" (2), BFGSmaxit (N) and solution.tolerance (1e-21) of function "genoud" (see genoud). Numbers into brackets are the default values.

Value

A list with components:

  • par: best design found,

  • value: probabilitity that the design dominates the target,

  • mean: kriging mean of the objectives at the design,

  • sd: prediction standard deviation at the design.

Examples

## Not run: 

#---------------------------------------------------------------------------
# Example of interactive optimization
#---------------------------------------------------------------------------

set.seed(25468)
library(DiceDesign)

d <- 2
n.obj <- 2 
fun <- "P1" 
n.grid <- 51
test.grid <- expand.grid(seq(0, 1, length.out = n.grid), seq(0, 1, length.out = n.grid))
nappr <- 20 
design.grid <- round(maximinESE_LHS(lhsDesign(nappr, d, seed = 42)$design)$design, 1)
response.grid <- t(apply(design.grid, 1, fun))
paretoFront <- 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)
lower <- rep(0, d); upper <- rep(1, d)

sol <- GParetoptim(model, fun, crit = "SUR", nsteps = 5, lower = lower, upper = upper) 

plotGPareto(sol)

target1 <- c(15, -25)
points(x = target1[1], y = target1[2], col = "black", pch = 13)

nDesign <- getDesign(sol$lastmodel, target = target1, lower = rep(0, d), upper = rep(1, d))
points(t(nDesign$mean), col = "green", pch = 20)

target2 <- c(48, -27)
points(x = target2[1], y = target2[2], col = "black", pch = 13)
nDesign2 <- getDesign(sol$lastmodel, target = target2, lower = rep(0, d), upper = rep(1, d))
points(t(nDesign2$mean), col = "darkgreen", pch = 20)

## End(Not run)

GPareto documentation built on June 24, 2022, 5:06 p.m.