LBFGSB
- class pmrf.optimize.LBFGSB(gtol: float = 0.001, stepsize: float = 1.0, linesearch: str = 'zoom')
Bases:
AbstractBoundedMinimizerA 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=1.0) – Initial step size for the line search.
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 (PyTree) – Bounds for y0, if any.
max_iter (int = 1024) – The maximum number of iterations to take.
**kwargs – Runtime arguments forward to the solver backend.
- Returns:
A tuple of (
pmrf.optimize.MinimizeResult, metrics)`.- Return type:
tuple
- gtol: float = 0.001
- linesearch: str = 'zoom'
- stepsize: float = 1.0