h_get_optimizers | R Documentation |
This function creates optimizer functions with arguments.
h_get_optimizers(
optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
optimizer_fun = h_optimizer_fun(optimizer),
optimizer_args = list(),
optimizer_control = list()
)
optimizer |
( |
optimizer_fun |
( |
optimizer_args |
( |
optimizer_control |
( |
If you want to use only the built-in optimizers:
optimizer
is a shortcut to create a list of built-in optimizer functions
passed to optimizer_fun
.
Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim()
with corresponding method)
and "nlminb" (using stats::nlminb()
).
Other arguments should go into optimizer_args
.
If you want to use your own optimizer function:
Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.
If there are other named arguments in front of these, make sure they are correctly
specified through optimizer_args
.
If the hessian can be used, please make sure its argument name is hessian
and
please add attribute use_hessian = TRUE
to the function,
using attr(fun, "use_hessian) <- TRUE
.
Named list
of optimizers created by h_partial_fun_args()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.