{ } Raw JSON

bundles / scipy 1.17.1 / scipy / optimize / _lsq / common / solve_lsq_trust_region

function

scipy.optimize._lsq.common:solve_lsq_trust_region

source: /scipy/optimize/_lsq/common.py :57

Signature

def   solve_lsq_trust_region ( n m uf s V Delta initial_alpha = None rtol = 0.01 max_iter = 10 )

Summary

Solve a trust-region problem arising in least-squares minimization.

Extended Summary

This function implements a method described by J. J. More [1] and used in MINPACK, but it relies on a single SVD of Jacobian instead of series of Cholesky decompositions. Before running this function, compute: U, s, VT = svd(J, full_matrices=False).

Parameters

n : int

Number of variables.

m : int

Number of residuals.

uf : ndarray

Computed as U.T.dot(f).

s : ndarray

Singular values of J.

V : ndarray

Transpose of VT.

Delta : float

Radius of a trust region.

initial_alpha : float, optional

Initial guess for alpha, which might be available from a previous iteration. If None, determined automatically.

rtol : float, optional

Stopping tolerance for the root-finding procedure. Namely, the solution p will satisfy abs(norm(p) - Delta) < rtol * Delta.

max_iter : int, optional

Maximum allowed number of iterations for the root-finding procedure.

Returns

p : ndarray, shape (n,)

Found solution of a trust-region problem.

alpha : float

Positive value such that (J.T*J + alpha*I)*p = -J.T*f. Sometimes called Levenberg-Marquardt parameter.

n_iter : int

Number of iterations made by root-finding procedure. Zero means that Gauss-Newton step was selected as the solution.

Aliases

  • scipy.optimize._lsq.common.solve_lsq_trust_region