jaxmat.solvers.custom_optimistix_solvers#

class GaussNewtonTrustRegion[source]#

Bases: GaussNewton

Gauss-Newton algorithm, for solving nonlinear least-squares problems with a trust region search.

Arguments:

  • rtol: Relative tolerance for terminating the solve.

  • atol: Absolute tolerance for terminating the solve.

  • norm: The norm used to determine the difference between two iterates in the

    convergence criteria. Should be any function PyTree -> Scalar. Optimistix includes three built-in norms: [optimistix.max_norm][], [optimistix.rms_norm][], and [optimistix.two_norm][].

  • linear_solver: The linear solver used to compute the Newton step.

  • verbose: Whether to print out extra information about how the solve is proceeding.

    Should be a frozenset of strings, specifying what information to print out. Valid entries are step, loss, accepted, step_size, y. For example verbose=frozenset({“loss”, “step_size”}).

class NewtonTrustRegion[source]#

Bases: LevenbergMarquardt

Newton method for solving nonlinear problems with a trust region search.

Notes

This algorithm is derived from LevenbergMarquardt using a full Newton descent instead of a damped one.

Arguments:

  • rtol: Relative tolerance for terminating the solve.

  • atol: Absolute tolerance for terminating the solve.

  • norm: The norm used to determine the difference between two iterates in the

    convergence criteria. Should be any function PyTree -> Scalar. Optimistix includes three built-in norms: [optimistix.max_norm][], [optimistix.rms_norm][], and [optimistix.two_norm][].

  • linear_solver: The linear solver to use to solve the damped Newton step. Defaults to

    lineax.QR.

  • verbose: Whether to print out extra information about how the solve is proceeding.

    Should be a frozenset of strings, specifying what information to print out. Valid entries are step, loss, accepted, step_size, y. For example verbose=frozenset({“loss”, “step_size”}).

class BFGSLinearTrustRegion[source]#

Bases: AbstractBFGS

Standard BFGS algorithm, for solving minimisation problems with a linear trust region search.

rtol: float#
atol: float#
norm()#

Compute the L-infinity norm of a PyTree of arrays.

This is the largest absolute elementwise value. Considering the input x as a flat vector (x_1, …, x_n), then this computes max_i |x_i|.

Parameters:

x (PyTree[jax.Array | numpy.ndarray | numpy.bool | numpy.number | bool | int | float | complex])

Return type:

Shaped[Array, ‘’]

use_inverse: bool = True#
search: AbstractSearch = LinearTrustRegion()#
descent: AbstractDescent = NewtonDescent()#
verbose: frozenset[str] = frozenset({})#