Learn R Programming

optimbase (version 1.0-10)

optimbase.outputcmd: Call user-defined output function

Description

Call user-defined output function.

Usage

optimbase.outputcmd(this = NULL, state = NULL, data = NULL)

Arguments

this

An optimization object.

state

The current state of the algorithm: either 'init', 'iter', or 'done'.

data

A list containing at least the following elements:

x

the current point estimate,

fval

the value of the cost function at the current point estimate,

iteration

the current iteration index,

funccount

the number of function evaluations.

Value

Do not return any data, but execute the output function defined in the outputcommand element of this.

Details

The data list argument may contain more levels than those presented above. These additional levels may contain values which are specific to the specialized algorithm, such as the simplex in a Nelder-Mead method, the gradient of the cost function in a BFGS method, etc...