obj.plgpEI | R Documentation |
Wrapper for Expected improvement (Gramacy)
obj.plgpEI(x, fmin, gpi, pred = predGPsep)
x |
matrix of points to calculate EI |
fmin |
best function value (y) so far |
gpi |
Gaussian process C-side object |
pred |
prediction model. Default: |
negative expected improvement
plgpEI
.
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) ## 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) res <- optim(start[1,], obj.plgpEI, method="L-BFGS-B", lower=0, upper=1, gpi=gpi, pred=predGPsep, fmin=ymin) xnew <- c(res$par, -res$value) print(xnew) deleteGPsep(gpi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.