• No results found

Numerical Methods. Iterative method:

N/A
N/A
Protected

Academic year: 2021

Share "Numerical Methods. Iterative method:"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Numerical Methods

• Consider an unconstrained NP problem defined as: min

• Numerical solution methods follow an iterative update scheme:  , where  is a search direction and  is the  step size, such that the function value decreases at each step:  • Iterative method: 1. Initialize: chose  2. Check termination:  0 3. Find a suitable search direction  that obeys the descent  condition:  0

4. Search along  to find  where  attains min value  5. Return to step 2

(2)

The Iterative Method

• The general iterative method is a two‐step process:

– Finding the suitable search direction  along which the function  value locally decreases and any constraints are obeyed.

– Performing line search along  to find  1 such that  1 attains its minimum value.  • Note, – A necessary condition for  to be a descent direction is that:  0.  – If  is a descent direction, then we are assured that at least for  small positive values of  ,  . 

(3)

Line Search Problem

• Assuming a suitable search direction  has been determined, we  seek to determine a step length  , where an optimal value of 

minimizes  1 . Since both  and  are known, the projected  function value along  depends on  alone and is expressed as: 

• The problem of choosing  to minimize  1 along  thus  amounts to a single‐variable functional minimization problem,  known as the line search problem, defined as:

min α

(4)

Example: Quadratic Function

• Consider minimizing a quadratic function: 1 2 , • Let  be a given descent direction; then, the line search problem  reduces to solving the following minimization problem: min • A solution is found by setting  ′ 0,  and is given as:  • An update then follows as:  1 .

(5)

Computer Methods for Line Search Problem

• Interval reduction methods – Golden search – Fibonacci search • Approximate search methods – Arjimo’s rule • Quadrature curve fitting

(6)

Interval Reduction Methods

• The interval reduction methods find the minimum of a unimodal  function in two steps:  – Bracketing the minimum to an interval  – Reducing the interval of uncertainty to desired accuracy  • Fibonacci’s method • Golden section method • The bracketing step aims to find a three‐point pattern, such that for  1, 2, 3,   1 2 3 . The bracketing algorithm can be  started from any point in the domain of  , though a good guess  will reduce the number of steps involved. 

(7)

The Bracketing Algorithm

• The bracketing algorithm: – Initialize: choose  1, ∆, (e.g.,  1.618) – Set  2 1 ∆; evaluate  1, 2 – If  1 2, set  01, 12, 20, ∆ ∆ – Set ∆ ∆,  3 2 ∆; evaluate  3

– If  2 3, set  12, 23, 12, 23; then go to  step 3

(8)

Fibonacci’s Method

Fibonacci’s Method.  The Fibonacci’s method uses Fibonacci  numbers to achieve maximum interval reduction in a given number  of steps. The Fibonacci number sequence is generated as:  0 1 1, 1 2, 2.  • Fibonacci numbers have some interesting properties, among them: – The ratio  lim →∞ 1 5 1 2 ≅ 0.618034 is known as the golden  ratio.  – Using Fibonacci numbers, the number of interval reductions 

required to achieve a desired accuracy  is the smallest  such that  1/ , and can be specified in advance. 

– For given  1 and  , we have  2 1 1, 3 1 2, 4 2 3,  etc. 

(9)

Fibonacci Algorithm

• Initialize: specify  1, 4 1 4 1 , , : 1 • Compute   1 1;  2 1 1 1 1 4, evaluate  2 • For  1, … , 1 • Introduce   3 1 1 4, evaluate  3 – If  2 3, set  41, 13 – Else set  12, 23, 23 • Set   1 1

(10)

Golden Section Method

• The golden section method uses the golden ratio:  0.618034 in  each iteration to define intermediate points. • Initialize: specify  1, 4 1 4 1 , , : • Compute   2 1 1 4, evaluate  2 • For  1, … , 1 – Introduce   3 1 1 4, evaluate  3 – If  2 3, set  41, 13 – Else set  12, 23, 23

(11)

Integrated Bracketing and Golden Section Algorithm

• Initialize: specify  1, ∆, 0.618034, • Set  2 1 ∆; evaluate  1, 2

– If  1 2, set  01, 12, 20, ∆ ∆

• Set ∆ ∆,  4 2 ∆; evaluate  4

– If  2 4, set  12, 24, 12, 24; then go to  step 3

• Introduce   3 1 1 4, evaluate  3

– If  2 3, set  41, 13 – Else set  12, 23, 23

(12)

Approximate Search Methods

Gradient Related Condition. The search direction is gradient related if 

, 0. This condition aids in convergence.

Sufficient Descent Condition. The sufficient descent condition guards 

against  becoming too close to  . The condition is normally stated  as:  0 for a small  . Alternatively, it may be specified 

as:  2, 0. 

Sufficient Decrease Condition. The sufficient decrease condition on 

ensures that a nontrivial reduction in the function value is obtained at  each step. The condition is stated as: 

(13)

Approximate Line Search

• Alternate sufficient decrease condition (Arjimo’s rule): 0 ′ 0 , 0 1 • Curvature condition: ′ ′ 0 , 0 1 • These two conditions together with  are known as Wolfe  conditions, which are commonly used by all line search algorithms

(14)

Approximate Line Search

Bracketing the Minimum. In the bracketing step we seek an interval 

, such that  0 and  0. Since for any descent  direction,  0 0, therefore,  0 serves as initial lower bound  on  . To find an upper bound, increasing  values, e.g.,   1,2, …,  are tried. Assume that for some  0,  0 and

0; then,  serves as an upper bound. 

Estimating the Minimum. Once the minimum has been bracketed 

to a small interval, a quadratic or cubic polynomial approximation is  used to find the minimizer. If the polynomial minimizer  satisfies  Wolfe’s condition for the desired  value (say  0.5 and the 

sufficient decrease condition for the desired  value (say  0.2 ,  it is taken as the function minimizer, otherwise  is used to replace  one of the  or , and the polynomial approximation step repeated.

(15)

Quadratic Curve Fitting

• Assuming that the interval  , contains the minimum of a  unimodal function,  , a quadratic approximation of the function:  0 1 2 2 is obtained using three points  , , , where the mid‐point may be used for  • The quadratic coefficients  0, 1, 2 are obtained as:  2 1 1 1 2 0 1 2 2 • The minimum is given as:  2 1 2

(16)

Example: Approximate Search

• We wish to approximately solve the following minimization problem: 

min 2 where  2 , 0 1, 0 1

• Use Arjimo’s rule with:  0.2, and  0.1, 0.2, …, to bracket the  minimum. The Matlab commands are: >> f=@(x) x.*x+exp(‐x); mu=0.2; al=0:.1:1;  >> feval(f,al) 1.0000    0.9148    0.8587    0.8308    0.8303    0.8565    0.9088    0.9866     1.0893    1.2166    1.3679 >> 1‐mu*al 1.0000    0.9800    0.9600    0.9400    0.9200    0.9000    0.8800    0.8600     0.8400    0.8200    0.8000 • Then, the minimum is bracketed as:  0, 0.5

(17)

Example: Approximate Search

• Quadratic approximation: >> al=0; am=0.25; au=0.5; >> a2 = ((f(au)‐f(al))/(au‐al)‐(f(am)‐f(al))/(am‐al))/(au‐am); >> a1 = (f(am)‐f(al))/(am‐al)‐a2*(al+am); >> xmin = ‐a1/a2/2 = 0.3531 • The exact solution is given as:  0.3517

(18)

Computer Methods for Finding the Search Direction

• Gradient based methods – Steepest descent method – Conjugate gradient method – Quasi Newton methods • Hessian based methods  – Newton’s method

(19)

Computer Methods for Finding Search Direction

• Steepest descent method:  • Conjugate gradient methods:  ; • Newton’s method:  • Quasi‐Newton methods: – Direct Hessian update:  ∆ – Inverse Hessian update:  ∆ , • Trust region methods: 

(20)

Steepest Descent Method

• The steepest descent method is characterized by:  ,  leading to the following update rule: 1 ∙

• The step size  to minimize  1 along  can be analytically or  numerically determined  • Example: quadratic function 1 2 , Then,  1 ∙ ; Define  Then,  1 ;

(21)

Steepest Descent Algorithm

• Initialize: choose  0 • For  0,1,2, … – Compute  – Check convergence: if  , stop. – Set  – Line search problem: Find min 0 – Set  1 .  •

(22)

Example: Steepest Descent

• Consider  min 0.1 12 22, 0.22 1 2 • Initialize:  0 5,1 , 0 3.5, 0 12 • Line search problem: min 0.1 5 2 1 2 2 • Set  ′ 8.2 5 0, or  0.61 • Therefore,  1 4.390.22 , and  1 1.98

(23)

Steepest Descent Method

• The steepest descent method becomes slow close to the optimum • Note  1 0 • Hence the method progresses in a zigzag fashion • Rate of Convergence 1 ∗ ∗ 1 1 2

(24)

Preconditioning

• Preconditioning aimed at reducing the condition number of the  Hessian matrix can be employed to aid convergence of the  steepest‐descent method • Consider  0.1 12 22 , where  0.1, 1 • Define a linear transformation:  , where  10, 1 • Then,  • Since  1, the steepest descent method converges in a  single iteration

References

Related documents

Digital intimate publics need to be understood as part of larger historical shifts toward the rendering of intimate life, emotions, care, and social relations, into private

Study, Country Demographic Sample S ize/Method Level of Knowledge/ Awareness o f HPV, CC and Vaccine A cceptability/Willingnes s Strategies for Vaccination/ Increasing Awareness

The plaintiffs in drafting their complaint were at least dimly aware that they would have to plead and prove that Marathon had significant unilateral power over the market price

The important process in UZAB model is an Expert system Cognitive Analysis of Software Interface (CASI), which help designer andsoftware developer to evaluate

The authors center the stories of students, educators, and community members affected by the resegregation in a powerful narrative that blends critical race theory and

For example, communication Service Interface Function Block (SIFB) is defined to achieve communication between different applications [4]. IEC 61499 is already used

While FDI flows into the primary sector show little dependence on any of these variables, secondary and tertiary sector investments are affected in different ways by countries’