Description Usage Arguments Value Examples
Use lbfgs function from the lbfgs package but pass in a single function that returns both the function and gradient together in a list. Useful when the function and gradient are expensive to calculate and can be calculated faster together than separate.
1 | lbfgs_share(fngr, vars, ...)
|
fngr |
A function that returns a list of two elements: the function value and the gradient value. |
vars |
Initial values for the parameters to be optimized over. Will be passed to lbfgs as vars argument. |
... |
Other arguments passed to lbfgs |
Result from running lbfgs on the given function
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.