buildBO | R Documentation |
Bayesian Optimization Model Interface
buildBO(x, y, control = list())
x |
matrix of input parameters. Rows for each point, columns for each parameter. |
y |
one column matrix of observations to be modeled. |
control |
list of control parameters:
|
an object of class "spotBOModel"
,
with a predict
method and a print
method.
Basically a list, with the options and found parameters for the model which has to be passed to the predictor function:
x
sample locations
y
observations at sample locations (see parameters)
min
min y val
thetaLower
lower boundary for theta (see parameters)
thetaUpper
upper boundary for theta (see parameters)
algTheta
algorithm to find theta (see parameters)
budgetAlgTheta
budget for the above mentioned algorithm (see parameters)
lambdaLower
lower boundary for log10lambda, default is -6
lambdaUpper
upper boundary for log10lambda, default is 0
dmodeltheta
vector of activity parameters
dmodellambda
regularization constant (nugget)
mu
mean mu
ssq
sigma square
Psi
matrix large Psi
Psinv
inverse of Psi
nevals
number of Likelihood evaluations during MLE
Forrester, Alexander I.J.; Sobester, Andras; Keane, Andy J. (2008). Engineering Design via Surrogate Modelling - A Practical Guide. John Wiley & Sons.
Gramacy, R. B. Surrogates. CRC press, 2020.
Jones, D. R., Schonlau, M., and Welch, W. J. Efficient global optimization of expensive black-box functions. Journal of Global Optimization 13, 4 (1998), 455–492.
predict.spotBOModel
## Reproduction of Gramacy's classic EI illustration with data from Jones et al. ## Generates Fig. 7.6 from the Gramacy book "Surrogates". x <- c(1, 2, 3, 4, 12) y <- c(0, -1.75, -2, -0.5, 5) ## Build BO Model m1 <- buildBO(x = matrix(x, ncol = 1), y = matrix(y, ncol=1), control = list(target="ei")) xx <- seq(0, 13, length=1000) yy <- predict(object = m1, newdata = xx) m <- which.min(y) fmin <- y[m] mue <- matrix(yy$y, ncol = 1) s2 <- matrix(yy$s, ncol = 1) ei <- matrix(yy$ei, ncol = 1) ## Plotting the Results (similar to Fig. 7.6 in Gramacy's Surrogate book) par(mfrow=c(1,2)) plot(x, y, pch=19, xlim=c(0,13), ylim=c(-4,9), main="predictive surface") lines(xx, mue) lines(xx, mue + 2*sqrt(s2), col=2, lty=2) lines(xx, mue - 2*sqrt(s2), col=2, lty=2) abline(h=fmin, col=3, lty=3) legend("topleft", c("mean", "95% PI", "fmin"), lty=1:3, col=1:3, bty="n") plot(xx, ei, type="l", col="blue", main="EI", xlab="x", ylim=c(0,max(ei)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.