L_BFGS

L_BFGS()

Limited-memory BFGS optimizer for smooth objectives.

Use this optimizer for differentiable full-batch objectives where a quasi-Newton method is appropriate. The objective callable must accept a parameter vector and a writable gradient vector, and return the scalar objective value.

Attributes

Name Description
armijoConstant Armijo line-search constant.
factr Relative objective tolerance used by the optimizer.
maxIterations Maximum number of optimizer iterations.
maxLineSearchTrials Maximum number of line-search attempts per iteration.
maxStep Upper bound on the line-search step size.
minGradientNorm Termination tolerance based on gradient norm.
minStep Lower bound on the line-search step size.
numBasis Number of correction vectors retained in memory.
wolfe Wolfe curvature constant.

Methods

Name Description
optimize optimize(self: pyensmallen._pyensmallen.L_BFGS, objective: collections.abc.Callable[[typing.Annotated[numpy.typing.ArrayLike, numpy.float64], typing.Annotated[numpy.typing.ArrayLike, numpy.float64]], float], initial_point: typing.Annotated[numpy.typing.ArrayLike, numpy.float64]) -> numpy.typing.NDArray[numpy.float64]

optimize

L_BFGS.optimize()

optimize(self: pyensmallen._pyensmallen.L_BFGS, objective: collections.abc.Callable[[typing.Annotated[numpy.typing.ArrayLike, numpy.float64], typing.Annotated[numpy.typing.ArrayLike, numpy.float64]], float], initial_point: typing.Annotated[numpy.typing.ArrayLike, numpy.float64]) -> numpy.typing.NDArray[numpy.float64]

Optimize an objective from the provided starting point.

Parameters

Name Type Description Default
objective callable Callable with signature objective(params, gradient). The callable should write the gradient in place and return the scalar objective. required
initial_point ndarray Initial parameter vector. required

Returns

Name Type Description
ndarray Optimized parameter vector.