Docsity

Nonlinear Least Squares Problems - Algorithms - Lecture Slides | MATH 693A, Study notes of Mathematics

Partial preview of the text

Download Nonlinear Least Squares Problems - Algorithms - Lecture Slides | MATH 693A and more Study notes Mathematics in PDF only on Docsity!

Nonlinear Least Squares Nonlinear Least Squares...

Numerical Optimization

Lecture Notes

Nonlinear Least Squares Problems — Algorithms

Peter Blomgren,

〈[email protected]〉

Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research Center San Diego State University San Diego, CA 92182- http://terminus.sdsu.edu/

Fall 2009

Nonlinear Least Squares Nonlinear Least Squares...

Outline

(^1) Nonlinear Least Squares The Problem Formulation, and Basics... The Gauss-Newton Method

(^2) Nonlinear Least Squares... The Levenberg-Marquardt Method

Nonlinear Least Squares Nonlinear Least Squares...

The Problem Formulation, and Basics... The Gauss-Newton Method

The Nonlinear Least Squares Problem: Algorithms

We now turn our attention to the solution of the nonlinear least

squares problem.

Of course, we could just use our unconstrained nonlinear

minimization methods as-is. However, as always we would like to

implement the most efficient algorithms possible. In order to

achieve this, we should take the special structure of the gradient

and Hessian into consideration.

The first algorithm carries the name of two of the giants of

mathematics — Gauss^1 and Newton^2!

(^1) — Johann Carl Friedrich Gauss (30 Apr 1777 – 23 Feb 1855). (^2) — Sir Isaac Newton (4 Jan 1643 — 31 Mar 1727).

Nonlinear Least Squares Nonlinear Least Squares...

The Problem Formulation, and Basics... The Gauss-Newton Method

The Gauss-Newton Method

The Gauss-Newton method can be viewed as a modification of Newton’s method with line search. Instead of generating the Newton search directions ¯pN k as solutions of the linear systems (^) [ ∇^2 f (¯xk )

]

¯pN k = −∇f (¯xk ),

we use the particular form of the Hessian, and exclude the second order term from it. Thus we get the Gauss-Newton search directions ¯pGN k as the solutions of the linear systems [ J(¯xk )T^ J(¯xk )

]

¯pGN k = −J(¯xk )T¯r(¯xk ).

This simple modification has many advantages over the standard Newton’s method.

Nonlinear Least Squares Nonlinear Least Squares...

The Problem Formulation, and Basics... The Gauss-Newton Method

The Gauss-Newton Method: Advantages 2 of 2

  1. When^ J(¯xk ) has full rank and^ ∇f^ (¯xk )^6 =^ ¯^0 , the Gauss-Newton direction ¯pGN k is a descent direction, and works for line-search. We have

[¯pGN k ]T^ ∇f (¯x) = [¯pGN k ]T^ J(¯xk )T¯rk = −[¯pGN k ]T^ J(¯xk )T^ J(¯xk )¯pGN k = −‖J(¯xk )¯pGN k ‖^22 ≤ 0

where the final inequality is strict unless we are in a stationary point.

  1. The Gauss-Newton equations are very similar to the^ normal equations for the linear least squares problem. ¯pGN k is the solution of the linear least squares problem

¯pGN k = arg min ¯p∈Rn^

‖J(¯xk )¯p + ¯r(¯xk )‖^22

Therefore, we can use our knowledge of solutions to the linear least squares problem to find the Gauss-Newton search direction.

Nonlinear Least Squares Nonlinear Least Squares...

The Problem Formulation, and Basics... The Gauss-Newton Method

The Gauss-Newton–Linear-Least-Squares Connection

The connection to the linear least squares problem shows another

motivation for the Gauss-Newton step.

Instead of building a quadratic model of the objective f (¯x), we

form a linear model of the vector function

¯r(¯x + ¯p) ≈ ¯r(¯x) + J(¯x)¯p

The step ¯pGN^ is obtained by using this model in the expression

f (¯x) = 12 ‖¯r(¯x)‖^22 , and minimizing over ¯p.

Nonlinear Least Squares Nonlinear Least Squares...

The Problem Formulation, and Basics... The Gauss-Newton Method

Gauss-Newton: Convergence Theorem

Theorem

Suppose that each residual function rj (¯x) is Lipschitz continuously

differentiable in a neighborhood of N of the level set

L(¯x 0 ) = {¯x ∈ Rn^ : f (¯x) ≤ f (¯x 0 )},

and that the Jacobians satisfy the uniform full-rank condition

‖J(¯x)¯z‖ 2 ≥ γ‖¯z‖ 2 , γ > 0.

Then, if the iterates {¯xk } are generated by the Gauss-Newton

method with step lengths αk that satisfy the Wolfe conditions, we

have

lim

k→∞

J(¯xk )T¯rk = 0.

Nonlinear Least Squares Nonlinear Least Squares...

The Problem Formulation, and Basics... The Gauss-Newton Method

Gauss-Newton: Breaking the Convergence Theorem

If the Jacobian is rank deficient, i.e.

‖J(¯x)¯z‖ 2 6 ≥ γ‖¯z‖ 2 , γ > 0 , then the coefficient matrix J(¯xk )T^ J(¯xk ) is singular. However, the system J(¯xk )T^ J(¯xk )¯pGN k = −J(¯xk )T^ ∇f (¯xk ) still has a least-squares solution since it is equivalent to the minimization problem

¯pGN k = arg min ¯p∈Rn^ ‖J(¯xk )¯p + ¯r(¯xk )‖^22.

In this case, there are infinitely many solutions of the form

¯x∗^ =

i : σi 6 =

¯uTi ¯r 0 σi

i : σi =

τi ¯vi.

The convergence result falls since the search direction may become perpendicular to∑ ∇f (¯xk ) (thus the Zoutendijk condition ∞ k=0 cos

(^2) θk ‖∇f (¯xk )‖ (^2) < ∞ does not show convergence).

Nonlinear Least Squares Nonlinear Least Squares...

The Problem Formulation, and Basics... The Gauss-Newton Method

Gauss-Newton: Local Convergence Rate 2 of 2

We have the result

‖¯xk+1 − ¯x∗‖ ≤

[

J(¯x∗)T^ J(¯x∗)

]− 1

Hr (¯x∗)

s(¯x∗)

· ‖¯xk − ¯x∗‖+O

‖¯xk − ¯x∗‖^2

  • Unless s(¯x∗) < 1, we cannot expect Gauss-Newton to converge

at all.

  • In the small-residual case, it is usually true that s(¯x∗) ≪ 1, and

we have very rapid convergence^1 of the Gauss-Newton method.

  • When Hr (¯x∗) = 0, the rate of convergence is quadratic.

(^1) Note that the convergence rate is actually linear , but we do not “feel” the linear term until ‖¯xk − ¯x∗‖ < s(¯x∗). If s(¯x∗) is small enough (smaller than the required tolerance on ¯xN ≈ ¯x∗), then this will not slow down the method.

Nonlinear Least Squares Nonlinear Least Squares... The Levenberg-Marquardt Method

The Levenberg-Marquardt Method: Introduction

Levenberg and Marquardt are slightly less famous than Gauss and Newton. The Levenberg-Marquardt method is the trust-region equivalent of the Gauss-Newton method. The Levenberg-Marquardt method avoids one of the weaknesses of the Gauss-Newton method, the (global convergence) behavior when the Jacobian J(¯x) is rank-deficient (or nearly rank-deficient) [see slide 11]. Since the second-order Hessian component is still ignored, the local convergence properties of the LM- and GN-methods are similar. The original description of the LM-method (first published in 1944) did not make the connection with the trust-region concept. The connection was made by Mor´e in 1978.

Nonlinear Least Squares Nonlinear Least Squares... The Levenberg-Marquardt Method

Levenberg-Marquardt vs. Gauss-Newton

If the Gauss-Newton step ¯pGN k lies inside the trust region, i.e. ‖¯pGN k ‖ ≤ ∆k , then ¯pLM k = p¯GN k. Otherwise, there is a λ > 0 such that ‖¯pLM k ‖ = ∆k and [ J(¯xk )T^ J(¯xk ) + λI

]

¯pLM k = −J(¯xk )T¯rk.

This can be interpreted as the normal equations for the linear least squares problem

¯pk = arg min ¯p∈Rn

[

J√(¯xk ) λI

]

¯p +

[

¯rk 0

]∥∥

2 .

As in the Gauss-Newton case, this equivalence yields a way of solving the subproblem without computing the matrix-matrix product J(¯xk )T^ J(¯xk ) and its Cholesky factorization.

Nonlinear Least Squares Nonlinear Least Squares... The Levenberg-Marquardt Method

The Levenberg-Marquardt Method: Implementation 1/

In order to find the value of λ which gives ‖¯pLM k ‖ = ∆k , we can apply the root-finding algorithm from Lecture#9 (Nearly Exact Solutions to the Subproblem). However, due to the special structure Bk = J(¯xk )T^ J(¯xk ), the approximate Hessian is always positive semi-definite, hence the Cholesky factorization cannot break down for any λ(j)^ > 0. The structure of Bk can further be exploited to get the Cholesky factorization R λT Rλ = JT^ J + λI , by means of the QR-factorization [ Rλ 0

]

= Q λT

[

√J

λI

]

Qλ orthogonal Rλ upper triangular

Nonlinear Least Squares Nonlinear Least Squares... The Levenberg-Marquardt Method

The Levenberg-Marquardt Method: Implementation 3/

In the scaled case, the trust-region subproblem, and the two characterizations of the solution become:

¯pLM k = arg min ¯p∈Rn

‖J(¯xk )¯p + ¯rk ‖^22 , subject to ‖Dk¯p‖ ≤ ∆k ,

[ J(¯xk )T^ J(¯xk ) + λD^2 k

]

¯pLM k = −J(¯xk )¯rk ,

¯pk = arg min ¯p∈Rn

[

√J(¯xk^ ) λDk

]

¯p +

[

¯rk 0

]∥

2 .

The convergence properties are preserved even though Dk is allowed to change from iteration-to-iteration, within certain bounds. If D^2 k = diag extract(JTk Jk ), then the algorithm is invariant under diagonal scaling of ¯x.

Nonlinear Least Squares Nonlinear Least Squares... The Levenberg-Marquardt Method

Large-Residual Problems 1 of 3

In all the previous discussion we have assumed, explicitly or

implicitly, that the approximation

∇^2 f (¯x) ≈ J(¯x)T^ J(¯x),

works well. However, when the neglected second order part of the

Hessian

∑m

j=

rj (¯x)∇^2 rj (¯x),

is large, the approximation does not produce good results.

The question looms large: What should be done in this case?