EI: Constrained Expected Emprovement

Description Usage Arguments Details References Examples

View source: R/optim_mego.R

Description

This functions extends the EI function supplied by the package DiceOptim. This enxtension allows usage of multiple expensive constraints. The constraints are passed to the revamped EI function embedded inside the mkm object. Currently low-cost (explicit) constraints are not allowed.

Usage

1
EI(x, model, control = NULL)

Arguments

x

A vector representing the input for which one wishes to calculate EI.

model

An object of class mkm. This model must have a single objective (model@m == 1).

control

An optional list of control parameters, some of them passed to the EI function. One can control:

minimization

logical specifying if EI is used in minimiziation or in maximization (default: TRUE)

plugin

optional scalar, if not provided, the minimum (or maximum) of the current feasible observations. If there isn't any feasible design plugin is set to NA and the algorithm returns the value of the probabilty of constraints be met.

envir

optional enviroment specifying where to assign intermediate values. Default: NULL.

Details

The way that the constraints are handled are based on the probability of feasibility. The strong assumption here is that the cost functions and the constraints are uncorrelated. With that assumption in mind, a simple closed-form solution can be derived that consists in the product of the probability that each constraint will be met and the expected improvemen of the objective. Another important consideration is that, by default, the value of the pluging passed to the EI is the best feasible observed value.

References

Forrester, A., Sobester, A., & Keane, A. (2008). Engineering design via surrogate modelling: a practical guide. John Wiley & Sons.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# --------------------------------------------
# Branin-Hoo function (with simple constraint)
# --------------------------------------------
n <- 10
d <- 2
doe <- replicate(d,sample(0:n,n))/n
fun_cost <- DiceKriging::branin
fun_cntr <- function(x) 0.2 - prod(x)
fun <- function(x) return(cbind(fun_cost(x),fun_cntr(x)))
res <- t(apply(doe, 1, fun))
model <- mkm(doe, res, modelcontrol = list(objective = 1, lower=c(0.1,0.1)))
grid <- expand.grid(seq(0,1,,25),seq(0,1,,25))
ei <- apply(grid, 1, EI, model) # this computation may take some time
contour(matrix(ei,25))
points(model@design, col=ifelse(model@feasible,'blue','red'))
points(grid[which.max(ei),], col='green')

coldfir3/moko documentation built on May 13, 2019, 8:49 p.m.