spotLoop: Sequential Parameter Optimization Main Loop

View source: R/spot.R

spotLoopR Documentation

Sequential Parameter Optimization Main Loop

Description

SPOT is usually started via the function spot. However, SPOT runs can be continued (i.e., with a larger budget specified in control$funEvals) by using spotLoop. This is the main loop of SPOT iterations. It requires the user to give the same inputs as specified for spot. Note: control$funEvals must be larger than the value used in the previous run, because it specifies the total number of function evaluations and not the additional number of evalutions.

Usage

spotLoop(x, y, fun, lower, upper, control, ...)

Arguments

x

(m,n) matrix that contains the known candidate solutions. The SPOT loop is started with these values. Each row represents one n dimensional data point. Each of the m columns represents one optimized parameter.

y

(m,p) matrix that represents observations for each point in x, Each of the m rows represents solutions for one data point.

fun

function that represents the objective function. It should receive a matrix x and return a matrix y. In case the function uses external code and is noisy, an additional seed parameter may be used, see the control$seedFun argument below for details.

lower

is a vector that defines the lower boundary of search space. This determines also the dimension of the problem.

upper

is a vector that defines the upper boundary of search space.

control

is a list with control settings for spot. See spotControl.

...

additional parameters passed to fun.

Value

This function returns a list with:

xbest

Parameters of the best found solution (matrix).

ybest

Objective function value of the best found solution (matrix).

x

Archive of all evaluation parameters (matrix).

y

Archive of the respective objective function values (matrix).

count

Number of performed objective function evaluations.

msg

Message specifying the reason of termination.

modelFit

The fit of the last build model, i.e., an object returned by the last call to the function specified by control$model.

Examples

## Most simple example: Kriging + LHS + predicted
## mean optimization (not expected improvement)

control <- list(funEvals=20)
res <- spot(,funSphere,c(-2,-3),c(1,2),control)
## now continue with larger budget.
## 5 additional runs will be performed.
control$funEvals <- 25
res2 <- spotLoop(res$x,res$y,funSphere,c(-2,-3),c(1,2),control)
res2$xbest
res2$ybest


SPOT documentation built on June 26, 2022, 1:06 a.m.