Newton’s method for finding local minima

Slides:



Advertisements
Similar presentations
Lecture 5 Newton-Raphson Method
Advertisements

Roundoff and truncation errors
Optimization.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 One-Dimensional Unconstrained Optimization Chapter.
Optimization : The min and max of a function
PHYS2020 NUMERICAL ALGORITHM NOTES ROOTS OF EQUATIONS.
Numerical Optimization
Lecture #18 EEE 574 Dr. Dan Tylavsky Nonlinear Problem Solvers.
458 Interlude (Optimization and other Numerical Methods) Fish 458, Lecture 8.
Open Methods (Part 1) Fixed Point Iteration & Newton-Raphson Methods
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Engineering Optimization
Why Function Optimization ?
Math for CSLecture 51 Function Optimization. Math for CSLecture 52 There are three main reasons why most problems in robotics, vision, and arguably every.
MATH 175: NUMERICAL ANALYSIS II Lecturer: Jomar Fajardo Rabajante IMSP, UPLB 2 nd Semester AY
Roots of Equations Chapter 3. Roots of Equations Also called “zeroes” of the equation –A value x such that f(x) = 0 Extremely important in applications.
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 8. Nonlinear equations.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Solving Non-Linear Equations (Root Finding)
Numerical Methods Applications of Loops: The power of MATLAB Mathematics + Coding 1.
Chem Math 252 Chapter 5 Regression. Linear & Nonlinear Regression Linear regression –Linear in the parameters –Does not have to be linear in the.
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Dr. Jie Zou PHY Chapter 2 Solution of Nonlinear Equations: Lecture (II)
4 Numerical Methods Root Finding Secant Method Modified Secant
linear  2.3 Newton’s Method ( Newton-Raphson Method ) 1/12 Chapter 2 Solutions of Equations in One Variable – Newton’s Method Idea: Linearize a nonlinear.
Newton-Raphson Method. Figure 1 Geometrical illustration of the Newton-Raphson method. 2.
Lecture 5 - Single Variable Problems CVEN 302 June 12, 2002.
Solving Non-Linear Equations (Root Finding)
Iteration Methods “Mini-Lecture” on a method to solve problems by iteration Ch. 4: (Nonlinear Oscillations & Chaos). Some nonlinear problems are solved.
One Dimensional Search
Chapter 10 Minimization or Maximization of Functions.
4 Numerical Methods Root Finding Secant Method Modified Secant
Optimization in Engineering Design 1 Introduction to Non-Linear Optimization.
Root Finding UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Advanced Computer Graphics Optimization Part 2 Spring 2002 Professor Brogan.
INTRO TO OPTIMIZATION MATH-415 Numerical Analysis 1.
Exam 1 Oct 3, closed book Place ITE 119, Time:12:30-1:45pm One double-sided cheat sheet (8.5in x 11in) allowed Bring your calculator to the exam Chapters.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 - Chapter 7 Optimization.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
1 M 277 (60 h) Mathematics for Computer Sciences Bibliography  Discrete Mathematics and its applications, Kenneth H. Rosen  Numerical Analysis, Richard.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
CSE 330: Numerical Methods. Introduction The bisection and false position method require bracketing of the root by two guesses Such methods are called.
P2 Chapter 8 CIE Centre A-level Pure Maths © Adam Gibson.
Newton’s method for finding local minimum
Newton-Raphson Method
Function Optimization
Ch 11.6: Series of Orthogonal Functions: Mean Convergence
4 Numerical Methods Root Finding Secant Method Modified Secant
Newton-Raphson Method
Announcements Topics: Work On:
Non-linear Minimization
Local Search Algorithms
Solution of Equations by Iteration
Numerical Analysis Lecture 7.
Non-linear Least-Squares
Newton-Raphson Method
Computers in Civil Engineering 53:081 Spring 2003
Newton-Raphson Method
6.5 Taylor Series Linearization
4 Numerical Methods Root Finding.
3.8 Newton’s Method How do you find a root of the following function without a graphing calculator? This is what Newton did.
3.8: Newton’s Method Greg Kelly, Hanford High School, Richland, Washington.
3.8: Newton’s Method Greg Kelly, Hanford High School, Richland, Washington.
Newton-Raphson Method
Local Search Algorithms
Programming assignment #1 Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
MATH 1910 Chapter 3 Section 8 Newton’s Method.
1 Newton’s Method.
Errors and Error Analysis Lecture 2
Pivoting, Perturbation Analysis, Scaling and Equilibration
Presentation transcript:

Newton’s method for finding local minima Class XII

Last time We started to consider a problem of finding minima of a function of several variables Protein folding as an example of optimization problem Local and global minima Notion of constrained minimization – the variable space is constrained to a smaller subspace

Simplest derivation If F(x) has a minimum at xm , then F’(xm) = 0. Solve for F’(xm) = 0 using Newton’s method for finding roots. Recall that for Z(x) = 0, Newton’s iterations are xn+1 = xn + h, where h = - Z(xn)/Z’(xn) Now, substitute F’(x) for Z(x) To get h = - F’(xn)/F’’(xn) So, Newton’s iterations for minimization are: xn+1 = xn - F’(xn)/F’’(xn)

Rationalize Newton’s Method Let’s Taylor expand F(x) around its minimum, xm: F(x) = F(xm) + F’(xm)(x – xm) + (1/2!)*F’’(xm)(x – xm)2 + + (1/3!)*F’’’(xm)(x – xm)3 + … Neglect higher order terms for |x – xm| << 1, you must start with a good initial guess anyway. Then F(x) ≈ F(xm) + F’(xm)(x – xm) + (1/2)*F’’(xm)(x – xm)2 But recall that we are expanding around a minimum, so F’(xm) =0. Then F(x) ≈ F(xm) + (1/2)*F’’(xm)(x – xm)2 So, most functions look like a parabola around their local minima!

Approximation for finding position of the minimum F(x) ≈ F(xm) + (1/2)*F’’(xm)(x – xm)2 Let us approximate F(x) ≈ f(x) where f(x) = b + a (x – x(m1))2 and then differentiate f(x) f’(x) = 2a (x – x(m1)) From here x(m1) - x = - f’(x) / 2a Let us consider the function f(x) and its derivatives f’(x) and f”(x) at x = x(0) and, comparing the terms of F(x) and f(x) , let us approximate a ≈ (1/2) f”(x(0)) This allows us to evaluate the position of the minimum x(m1) x(m1) = x(0) - f’(x(0)) /f”(x(0))

x(n+1) = x(n) - F’(x(n)) /F”(x(n)) Replacing f(x) by F(x) (recall that F(x) ≈ f(x) ) we have an iterative procedure: x(n+1) = x(n) - F’(x(n)) /F”(x(n)) where each found position of the minimum x(n+1) for the quadratic approximation to F(x) ≈ f(x) = b + a (x – x(m1))2 is the starting point for a next approximation of the minimum of function F(x)

Newton’s Method = Approximate the function with a parabola, iterate. Xm

Newton’s Method

Newton’s Method

Newton’s Method

Newton’s method. More informative derivation. Math 685/CSI 700 Spring 08 Newton’s method. More informative derivation. Newton’s method for finding minimum has QUADRATIC (fast) convergence rate for many (but not all!) functions, but must be started close enough to solution to converge. George Mason University, Department of Mathematical Sciences

Possible problems of Newton’s method minimization x(n+1) = x(n) - F’(x(n)) /F”(x(n)) There is also a possibility that F’’(xm) = 0 at the minimum. In this case higher order terms of the Taylor series, (1/3!)*F’’’(xm)(x – xm)3 + … , determine the behavior of F(x) near the minimum xm

Example Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Convergence. If x0 is chosen well (close to the min.), and the function is close to a quadratic near minimum, the convergence is fast, and quadratic. E.g: |x0 – xm | < 0.1, Next iteration: |x1– xm | < (0.1)2 Next: |x(2)– xm | < ((0.1)2) 2= 10-4 Next: 10-8, etc. Convergence is NOT guaranteed, same pitfalls as with locating the root (run-away, cycles, does not converge to xm, etc. ) Sometimes, convergence may be very poor even for “nice looking”, smooth functions! ) Combining Newton’s with slower, but more robust methods such as “Golden Section” often helps. No numerical method will work well for truly ill-conditioned (pathological) cases. At best, expect significant errors, at worst – completely wrong answer!

Choosing stopping criteria The usual: |xn+1 – xn | < TOL, or, better, |xn+1 – xn | < TOL*|xn+1 + xn |/2 to ensure that the given TOL is achieved for the relative accuracy. Generally, TOL ~ sqrt(εmach) or larger if full theoretical precision is not needed. But not smaller. TOL can not be smaller because, in general, F(x) is quadratic around the minimum xm, so when you are h < sqrt(εmach) away from xm, |F(xm) – F(xm+h)| < εmach, and you can no longer distinguish between values of F(x) so close to the minimum xm

The stopping criterion: more details To be more specific: we must stop iterations when |F(xn) – F(xm)| ~ εmach*|F(xn) |, else we can no longer tell F(xn) from F(xm) and further iterations are meaningless. Since |F(xn) – F(xm)| ≈ |(1/2)*F’’(xm)(xn – xm)2| , we get for this smallest |(xn – xm)| ~ sqrt(εmach)* sqrt(|2F(xn) / F’’(xm) |) ≈ ≈ sqrt(εmach)* sqrt(|2F(xn) / F’’(xn) |) = = sqrt(εmach)*|xn|*sqrt(|2F(xn) /(xn2 F’’(xn)) |) . For many functions the quantity in green | | ~1, which gives us the rule from the previous slide: stop when |xn+1 – xn | < sqrt(εmach)* |xn+1 + xn |/2