Docsity

Unconstrained Optimization: Methods and Applications, Study notes of Mathematical Methods for Numerical Analysis and Optimization

Partial preview of the text

Download Unconstrained Optimization: Methods and Applications and more Study notes Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Gradient-based Methods for Optimization. Part I.

Nathan L. Gibson [email protected] Department of MathematicsOregon State University

OSU – AMC Seminar, Nov. 2007 – p. 1

Outline^ •^ Unconstrained Optimization^ •^ Newton’s Method^ •^ Inexact Newton^ •^ Quasi-Newton^ •^ Nonlinear Least Squares^ •^ Gauss-Newton Method^ •^ Steepest Descent^ •^ Levenberg-Marquardt Method

OSU – AMC Seminar, Nov. 2007 – p. 2

Sample Problem^ Parameter Identification^ Consider′′^ u

′^ +^ cu+^ ku

= 0;^ u(0) =

′ u; u(0) = 0 0

where^ u^ represents the motion of an unforcedharmonic oscillator (e.g., spring). We may assume

u^0

is known, and data

M {u}is given for some timesj j=^

tj

on the interval

[0, T^ ].

Now we can state a

parameter identification

problem

to be: find

x^ = [c, k

T^ ]such that the solution

u(t)^ to

(1) using parameters

x^ is (as close as possible to)

uj

when evaluated at times

t.j^

OSU – AMC Seminar, Nov. 2007 – p. 4

Objective Function^ Consider the following formulation of the ParameterIdentification problem:Find^ x=[

T^ c, k]such that the following objectivefunction is minimized: f^ (x) =

M∑ 1 |u(t 2 j= ;^ x)^ −^ uj j

This is an example of a

nonlinear least squares problem.

OSU – AMC Seminar, Nov. 2007 – p. 5

Convergence Rates^ The sequence

∞ {x}k k=^ is said to converge to

∗^ xwith

rate^ p^ and rate constant

C^ if ∗ ‖x−^ x‖k+1^ lim∗p^ k→∞ ‖x−^ x‖k^

=^ C.

-^ Linear :^ p^ = 1^ and

0 < C <

1 , such that error

decreases. • Quadratic

:^ p^ = 2, doubles correct digits per iteration. • Superlinear

: If^ p^ = 1

,^ C^ = 0. Faster than linear. Includes quadractic convergence, but alsointermediate rates.

OSU – AMC Seminar, Nov. 2007 – p. 7

Necessary Conditions^ Theorem 1

Let^ f^ be twice continuously differentiable, and let

∗^ x be a local minimizer of

f^.

Then

∗ ∇f (x) = 0

and the^ Hessian

(^2) of f , ∇f ∗ (x) , is^ positive

semidefinite

Recall^ A^

positive semidefinite

means T^ xAx^ ≥^ 0 ∀x^ ∈^

N^ R.

Equation (2) is called the

first-order necessary condition

OSU – AMC Seminar, Nov. 2007 – p. 8

Sufficient Conditions^ Theorem 2

Let^ f^ be twice continuously differentiable in a neighborhood of

∗ x , and let ∗ ∇f^ (x) = 0 and the^ Hessian

(^2) of f , ∇f ∗ (x) , be^ positive

semidefinite

∗. Then x is a local minimizer of

f^.

Note: second derivative information is required to becertain, for instance, if

f^ (x) =^ x

3.^ OSU – AMC Seminar, Nov. 2007 – p. 10

Quadratic Objective Functions^ Suppose

(^1) f (x) = 2 T^ xHx^ −^

T^ xb

then we have that

(^2) ∇f^ (x) =

H

and if^ H^ is symmetric (assume it is)

∇f^ (x) =

Hx^ −^ b. Therefore, if

H^ is positive semidefinite, then the unique minimizer

∗^ xis the solution to∗^ Hx =^ b.^

OSU – AMC Seminar, Nov. 2007 – p. 11

Newton Step^ The solution to (3) is computed by solving

(^2) ∇f^ (x)sk

=^ −∇fk (x)k

for the Newton Step

N s. Then the Newton update isk^ defined by

x=^ xk+^

N+ s.k k^

Note: the step

N shas both direction and length.k^ Variants of Newton’s Method modify one or both ofthese.

OSU – AMC Seminar, Nov. 2007 – p. 13

Standard Assumptions^ Assume that

∗^ f and x satisfy the following

  1. Let^ f^ be twice continuously differentiable and

(^2) ‖∇f^ (x)^

(^2) − ∇f^ (y) ‖ ≤^ γ‖x^ −

y‖.

∗ 2. ∇f (x

(^2) 3. ∇f^ (x ∗)^ is^ positive definite

OSU – AMC Seminar, Nov. 2007 – p. 14

Problems (and solutions)^ •^ Need derivatives^ •^ Use finite difference approximations^ •^ Needs solution of linear system at each iteration^ •^ Use iterative linear solver like CG(Inexact Newton)^ •^ Hessians are expensive to find (and factor)^ •^ Use chord (factor once) or Shamanskii^ •^ Use Quasi-Newton (update

Hto getk^

H)k+

-^ Use Gauss-Newton (first order approximateHessian)

OSU – AMC Seminar, Nov. 2007 – p. 16

Nonlinear Least Squares^ Recall,

(^1) f (x) = 2 M∑^ |u(t;^ xj^ j=

(^2) ) − u|.j

Then for^ x

T = [c, k] ∇f^ (x) =

[∑M^ ∂uj=

(t;x)j^ (u(tj^ ∂c^

;^ x)^ −^ u) j^ ∑M^ ∂u(t j=

;x)j (u(t;^ j^ ∂k

] x) − u)j ′T = R(x) R(x)

where^ R(

x) = [u(t

;^ x)^ −^ u 11 ,... , u(tM

;^ x)^ −^ u M

T^ ]is

called the

residual.

OSU – AMC Seminar, Nov. 2007 – p. 17

Gauss-Newton Method^ The equation defining the Newton step

(^2) ∇f^ (x)sk

=^ −∇fk (x)k

becomes^ R

′T^ ′ (x)R(k

x)s=^ −∇kk^

f^ (x)k ′T^ = −R(x)R(xk

).k

We define the Gauss-Newton step as the solution

GN sk

to this equation.You can expect close to

quadratic

convergence for

small residual problems. Otherwise, not even

linear^ is

guaranteed.

OSU – AMC Seminar, Nov. 2007 – p. 19

Numerical Example^ •^ Recall

′′^ ′^ u+^ cu+

ku^ = 0;^ u

(0) =^ u;^0

′ u(0) = 0

-^ Let the true parameters be

∗^ x= [c, k

T^ ]= [1,^ 1]

T^.

Assume we have

M^ = 100

data^ ufrom equallyj^ spaced time points on

[0,^ 10].

-^ We will use the initial iterate

x= [1.^10

T, 1 .05]

with Newton’s Method and Gauss-Newton. • We compute gradients with forward differences,analytical

2 ×^2 matrix inverse, and use

ode15s

for time stepping the ODE.

OSU – AMC Seminar, Nov. 2007 – p. 20