prtools.jax.lbfgs#

lbfgs(fun, x0, gtol=None, maxiter=None, callback=None)[source]#

Minimize a scalar function of one or more variables using the L-BFGS algorithm

Parameters:
  • fun (callable) – The objective function to be minimied

  • x0 (jax.Array) – Initial guess

  • gtol (float) – Iteration stops when l2_norm(grad) <= gtol

  • maxiter (int) – Maximum number of iterations

  • callback (callable, optional) –

    A callable called after each iteration with the signature

    callback(intermediate_result: JaxOptimizeResult)
    

    where intermediate_result is a JaxOptimizeResult.

Returns:

res – The optimization result. See JaxOptimizeResult for a description of attributes.

Return type:

JaxOptimizeResult