plgpEI: Expected improvement (Gramacy)

View source: R/optimLagp.R

plgpEIR Documentation

Expected improvement (Gramacy)

Description

Expected improvement (Gramacy)

Usage

plgpEI(gpi, x, fmin, pred = predGPsep)

Arguments

gpi

Gaussian process C-side object

x

matrix of points to calculate EI

fmin

best function value (y) so far

pred

prediction model. Default: predGPsep

Value

ei expected improvement

Examples


library(laGP)
library(plgp)

ninit <- 12
dim <- 2
X <- designLHD(,rep(0,dim), rep(1,dim), control=list(size=ninit))
y <- funGoldsteinPrice(X)
m <- which.min(y)
ymin <- y[m]
start <- matrix(X[m,], nrow =1)

## 1. Build SPOT BO Model
m1 <- buildBO(x = X, y = y, control = list(target="ei"))
yy <- predict(object = m1, newdata = start)
ei1 <- matrix(yy$ei, ncol = 1)
## Show mue and s
mue <- matrix(yy$y, ncol = 1)
s2 <- matrix(yy$s, ncol = 1)

## 2. Build laGP model
gpi <- newGPsep(X, y, d=0.1, g=1e-8, dK=TRUE)
da <- darg(list(mle=TRUE, max=0.5), designLHD(,rep(0,dim), rep(1,dim), control=list(size=1000)))
mleGPsep(gpi, param="d", tmin=da$min, tmax=da$max, ab=da$ab)
ei2 <- plgpEI(gpi=gpi, x=start, fmin=ymin)
deleteGPsep(gpi)


SPOT documentation built on June 26, 2022, 1:06 a.m.