optimizers {PhotoGEA} | R Documentation |
Optimizers
Description
These functions return optimizers that meet requirements for the
optim_fun
input argument of fit_c3_aci
,
fit_c3_variable_j
, fit_c4_aci
, and
fit_c4_aci_hyperbola
. Essentially, they are wrappers for
optimizers from other libraries that serve to standardize their inputs and
outputs.
Usage
optimizer_deoptim(itermax, VTR = -Inf)
optimizer_hjkb(tol, maxfeval = Inf, target = Inf)
optimizer_nlminb(rel.tol, eval.max = 200, iter.max = 200, abs.tol = 0)
optimizer_nmkb(tol, maxfeval = 2000, restarts.max = 10)
optimizer_null()
Arguments
tol |
A convergence tolerance value; to be passed to |
maxfeval |
A maximum value for the number of function evaluations to allow during
optimization; to be passed to |
target |
A real number restricting the absolute function value; to be passed to
|
rel.tol |
A relative convergence tolerance value; to be passed to
|
eval.max |
A maximum value for the number of function evaluations; to be passed to
|
iter.max |
A maximum value for the number of iterations; to be passed to
|
abs.tol |
An absolute convergence tolerance value; to be passed to
|
restarts.max |
A maximum value for the number of restarts allowed during optimization;
to be passed to |
itermax |
The maximum number of generations to be used; to be passed to
|
VTR |
The value to be reached; to be passed to |
Details
optimizer_deoptim
is a wrapper for DEoptim
.
optimizer_hjkb
is a wrapper for hjkb
.
optimizer_nlminb
is a wrapper for nlminb
.
optimizer_nmkb
is a wrapper for nmkb
.
optimizer_null
simply returns the initial guess without doing any
optimization; it can be useful for viewing initial guesses.
See the documentation for those functions for more information about how the optimizers work.
Value
Each of these functions returns an optimizer function optim_fun
. The
returned optim_fun
function has four input arguments: an initial guess
(guess
), an error function (fun
), lower bounds (lower
),
and upper bounds (upper
). It returns a list with four named elements:
par
, convergence
, feval
, and convergence_msg
.
Examples
# Here we just show examples of the optim_fun results. Other examples using the
# optimizers can be found throughout PhotoGEA, such as in the user guides and
# the documentation for fit_c3_aci, fit_c4_aci, etc.
optimizer_deoptim(200)
optimizer_hjkb(1e-7)
optimizer_nlminb(1e-7)
optimizer_nmkb(1e-7)
optimizer_null()