optim_refit: Refined optimization test.

Description Usage Arguments Details Value See Also

Description

If the potential solution is indeed a local optimum of the objective function, and if it is used to initialize a second optimization, then original and "refined" solutions ought to be close.

Usage

1
2
optim_refit(xsol, fun, maximize = TRUE, maxit = 5000, reltol = 1e-08,
  xopt)

Arguments

xsol

Potential solution vector of length nx.

fun

Objective function to be maximized (or minimized), with first argument the length-nx parameter vector over which optimization is to take place. Should return a scalar result.

maximize

Logical, whether a maximum or a minimum of the objective function is sought.

maxit

Maximum number of iterations for optim refit (see Details).

reltol

Relative tolerance for convergence of optim refit (see Details).

xopt

Optional refit solution calculated externally from an optimization algorithm of choice (see Details).

Details

By default, a so-called **refi**ned op(**t**)imization (or refit) test is performed by running the default Nelder-Mead simplex method provided by optim, initialized by the potential solution xsol. Only a simplified interface to optim's control parameters are provided here.

Alternatively, the refit test can be performed with any optimization algorithm of choice. This is done externally, with the refined solution passed to optim_refit via the argument xopt.

Value

An object of class optrefit inheriting from optcheck, with elements:

xsol

The potential solution.

ysol

The value of fun(xsol).

maximize

Logical indicating whether the potential solution should maximize or minimize the objective function.

xopt

The solution found by the general-purpose optimizer.

yopt

The function value at the optimal solution, i.e., fun(xopt).

See Also

summary, print, and diff for optrefit objects are available; see summary.optrefit, print.optrefit, and diff.optrefit.


mlysy/optimCheck documentation built on May 25, 2019, 10:31 p.m.