LBFGSB

class pmrf.optimize.LBFGSB(gtol: float = 0.001, stepsize: float = 0.0, linesearch: str = 'zoom')

Bases: AbstractBoundedMinimizer

A L-BFGS-B optimizer in JAX.

Wrapper around jaxopt.LBFGSB.

Parameters:
  • gtol (float, default=1e-3) – The gradient norm tolerance for termination.

  • stepsize (float, default=0.0) – A fixed step size. At 0.0 or below, linesearch chooses each step instead.

  • linesearch (str, default="zoom") – Type of line search to use.

run(fn: Callable[[PyTree, Any], Any], y0: PyTree, args: Any = None, bounds: tuple[PyTree, PyTree] | None = None, max_iter: int = 1024, **kwargs) → tuple[MinimizeResult, PyTree]

Execute the minimization algorithm.

Parameters:
  • fn (callable) – The objective function to minimize.

  • y0 (PyTree) – The initial parameter guess.

  • args (Any) – Args to pass to fn.

  • bounds (tuple[PyTree, PyTree], optional) – The lower and upper edges of the box to search, shaped like y0, or None if the minimiser does not honour bounds. Edges may be infinite.

  • max_iter (int = 1024) – The maximum number of iterations to take.

  • **kwargs – Runtime arguments forward to the solver backend.

Returns:

An instance of pmrf.optimize.MinimizeResult.

Return type:

results

gtol: float = 0.001
linesearch: str = 'zoom'
stepsize: float = 0.0