Description Usage Arguments Details References Examples
This functions extends the EI function supplied by the package
archive package DiceOptim. This extension 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.
1 |
x |
A vector representing the input for which one wishes to calculate EI. |
model |
An object of class |
control |
An optional list of control parameters, some of them passed to the EI function. One can control:
|
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 improvement of the objective. Another important consideration is that, by default, the value of the plugin passed to the EI is the best feasible observed value.
Forrester, A., Sobester, A., & Keane, A. (2008). Engineering design via surrogate modelling: a practical guide. John Wiley & Sons.
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.