Description Usage Arguments Details Value See Also
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.
1 2 | optim_refit(xsol, fun, maximize = TRUE, maxit = 5000, reltol = 1e-08,
xopt)
|
xsol |
Potential solution vector of length |
fun |
Objective function to be maximized (or minimized), with first argument the length- |
maximize |
Logical, whether a maximum or a minimum of the objective function is sought. |
maxit |
Maximum number of iterations for |
reltol |
Relative tolerance for convergence of |
xopt |
Optional refit solution calculated externally from an optimization algorithm of choice (see 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
.
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)
.
summary
, print
, and diff
for optrefit
objects are available; see summary.optrefit
, print.optrefit
, and diff.optrefit
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.