View source: R/addIterations.R
addIterations | R Documentation |
Use this function to continue optimization of a bayesOpt object.
addIterations( optObj, iters.n = 1, iters.k = 1, otherHalting = list(timeLimit = Inf, minUtility = 0), bounds = optObj$bounds, acq = optObj$optPars$acq, kappa = optObj$optPars$kappa, eps = optObj$optPars$eps, gsPoints = optObj$optPars$gsPoints, convThresh = optObj$optPars$convThresh, acqThresh = optObj$optPars$acqThresh, errorHandling = "stop", saveFile = optObj$saveFile, parallel = FALSE, plotProgress = FALSE, verbose = 1, ... )
optObj |
an object of class |
iters.n |
The total number of additional times to sample the scoring function. |
iters.k |
integer that specifies the number of times to sample FUN
at each Epoch (optimization step). If running in parallel, good practice
is to set |
otherHalting |
Same as |
bounds |
Same as |
acq |
Same as |
kappa |
Same as |
eps |
Same as |
gsPoints |
Same as |
convThresh |
Same as |
acqThresh |
Same as |
errorHandling |
Same as |
saveFile |
Same as |
parallel |
Same as |
plotProgress |
Same as |
verbose |
Same as |
... |
Same as |
By default, this function uses the original parameters used to create
optObj
, however the parameters (including the bounds) can be customized.
If new bounds are used which cause some of the prior runs to fall outside of
the bounds, these samples are removed from the optimization procedure, but
will remain in scoreSummary
. FUN
should return the same elements
and accept the same inputs as the original, or this function may fail.
An object of class bayesOpt
having run additional iterations.
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 = 1 , gsPoints = 10 ) Results <- addIterations(Results,iters.n=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.