getLocalOptimums {ParBayesianOptimization} | R Documentation |
Get Local Optimums of acq From a bayesOpt Object
Description
Returns all local optimums of the acquisition function, no matter the utility.
Usage
getLocalOptimums(
optObj,
bounds = optObj$bounds,
acq = optObj$optPars$acq,
kappa = optObj$optPars$kappa,
eps = optObj$optPars$eps,
convThresh = optObj$optPars$convThresh,
gsPoints = optObj$optPars$gsPoints,
parallel = FALSE,
verbose = 1
)
Arguments
optObj |
an object of class |
bounds |
Same as in |
acq |
Same as in |
kappa |
Same as in |
eps |
Same as in |
convThresh |
Same as in |
gsPoints |
Same as in |
parallel |
Same as in |
verbose |
Should warnings be shown before results are returned prematurely? |
Details
gsPoints
points in the parameter space are randomly initialized, and
the L-BFGS-B method is used to find the closest local optimum to each point.
dbscan is then used to cluster points together which converged to the same
optimum - only unique optimums are returned.
Value
A data table of local optimums, including the utility (gpUtility), the utility relative to the max utility (relUtility), and the steps taken in the L-BFGS-B method (gradCount).
Examples
scoringFunction <- function(x) {
a <- exp(-(2-x)^2)*1.5
b <- exp(-(4-x)^2)*2
c <- exp(-(6-x)^2)*1
return(list(Score = a+b+c))
}
bounds <- list(x = c(0,8))
Results <- bayesOpt(
FUN = scoringFunction
, bounds = bounds
, initPoints = 3
, iters.n = 2
, gsPoints = 10
)
print(getLocalOptimums(Results))