spotOptim: optim-like spot interface

Share:

Description

Besides spot this is one of the main interfaces for using the SPOT package. It is build like the optim interface.

Usage

1
2
spotOptim(par = NULL, fn, gr = NULL, ..., lower = -Inf, upper = Inf,
  method, control = list())

Arguments

par

is a point in search interval (defines dimension)

fn

is the target function (it can also be a string with the name of a spot interface function, like "spotFuncStartBranin")

gr

gradient function, not implemented yet

...

additional parameters to be passed on to fn

lower

is a vector that defines the lower boundary of search space

upper

is a vector that defines the upper boundary of search space

method

is a string that describes which method is to be used.

control

is a list of additional settings. maxit is the number of function evaluations, all the other settings will simply be passed to SPOT (see spotGetOptions for details)

Details

It is of important to note that spot by default expects to optimize noisy functions. That means, the default settings of spot, which are also used in spotOptim, include repeats of the initial and sequentially created design points. Also, as a default OCBA is used to spread the design points for optimal usage of the function evaluation budget. OCBA will not work when there is no variance in the data. So if the user wants to optimize non-noisy functions, the following settings should be used:
control$spot.ocba <- FALSE
control$seq.design.maxRepeats <- 1
control$init.design.repeats <- 1

A call to a noisy function could look like this:
objFunction<-function(x){y=(x[1]+2)^2*(x[2]-4)^2+runif(1)}
spotOptim(par=c(1,1),fn<-objFunction,lower=c(-10,-10),upper=c(10,10),method="spotPredictRandomForest",control=list(maxit=50))

A call to a non-noisy function could look like this:
objFunction<-function(x){y=(x[1]+2)^2*(x[2]-4)^2}
spotOptim(par=c(1,1),fn<-objFunction,lower=c(-10,-10),upper=c(10,10),method="spotPredictRandomForest",control=list(maxit=50,spot.ocba=FALSE,seq.design.maxRepeats=1,init.design.repeats=1))

Value

This function returns a list with:
par parameters of the found solution
value target function value of the found solution

See Also

spot spotOptimInterface spotOptimizationInterface spotOptimizationInterfaceMco

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.