apply_optimizer | R Documentation |
optimizer
objectThis function performs numerical optimization using an optimizer
object.
apply_optimizer(optimizer = optimizer_nlm(), objective, initial, ...)
optimizer |
An object of class |
objective |
A |
initial |
A |
... |
Additional arguments to be passed to |
A named list
, containing at least these four elements:
value
A numeric
, the value of the estimated optimum of
objective
.
parameter
A numeric
vector, the parameter vector where
the optimum of objective
is obtained.
seconds
A numeric
, the total optimization time in
seconds.
initial
A numeric
, the initial parameter values.
Appended are additional output elements of the optimizer (if not excluded by
the output_ignore
element via define_optimizer
).
define_optimizer()
for creating an optimizer
object.
apply_optimizer(optimizer_nlm(), function(x) x^4 + 3*x - 5, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.