bfgs | R Documentation |
Implements the Broyden-Fletcher-Goldfarb-Shanno algorithm for function minimization.
bfgs(x0, f_, g_, min.x = rep(-Inf, length(x0)),
max.x = rep(Inf, length(x0)), prec = 1e-05,
verbose = FALSE)
x0 |
Tthe initial solution guess |
f_ |
The function to be minimized |
g_ |
The gradient of f_ |
min.x |
lower bounds |
max.x |
upper bounds |
prec |
|
verbose |
if TRUE diplay iteration nformation |
The function attempts to find
argmin_x s.t. min.x < x < max.x coord-wise f(x)
A list
Apart from returning the maximizer x, it also returns the function value f(x) the gradient f'(x), and the inverse hessian f”(x)^-1.
Giuseppe Ragusa
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.