Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Least Square Problems Lecture 11 Vu Xuan Quynh K53 Advanced Maths, Ha Noi University of Sciences

September 26, 2011

Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

1 Least Square Problems

The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

The Problem Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

We wish to find a vector x ∈ Cn that satisfies Ax = b, where A ∈ Cmn and b ∈ Cm Ingeneral,such a problem has no solution ( In the case, b ∈ / range(A)) We say that a rectangular system of equations with m > n is overdetermined. The vector known as the residual: r = b − Ax ∈ Cm (11.1) The problem takes the following form: Given A ∈ Cmn , m ≥ n, b ∈ Cm find x ∈ Cn such that kb − Axk2 is minimized. (11.2)

Example 11.1.Polynomial Interpolation Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Suppose we are given m distinct points x1 , x2 , · · · , xm ∈ C and data y1 , y2 , · · · , ym ∈ C There exists a unique polynomial interpolant to these data has form: p(x) = c0 + c1 x + · · · + cm−1 x m−1

(11.3)

with the property: p(xi ) = yi . We have  1 1  1  . . . 1

the following system: x1 x2 x3

(x1 )2 · · · (x2 )2 · · · (x3 )2 · · ·

xm (xm )2 · · ·

    c0 (x1 )m−1 y1  c1   y2  (x2 )m−1          (x3 )m−1    c2  =  y3    · · ·  · · ·  m−1 (xm ) cm−1 ym

Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Figure: Degree 10 polynomial interpolant to eleven data points. The axis scales are not given, as these have no effect on the picture

Example 11.2. Polynomial Least Squares Fitting Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Without changing the data points,we can do better by reducing the degree of the polynomial: p(x) = c0 + c1 x + c2 x 2 + · · · + cn−1 x n−1 for some n < m (11.5) Such a polynomial is a least square fit to the data if it minimizes the sum of the squares of these deviation from the data: m X |(p(xi ) − yi )|2 (11.6) i =1

Example 11.2. Polynomial Least Squares Fitting Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

This sum of squares is equal to the square of the norm of the residual, (kr k2 )2 , for the rectangular Vandermonde system:      y1 1 x1 · · · (x1 )n−1   y2   1 x2 · · · (x2 )n−1  c0       1 x3 · · · (x3 )n−1   c1  ≈  y3   ···      · · ·  . . . cn−1 n−1 1 xm · · · (xm ) ym

Example 11.2. Polynomial Least Squares Fitting Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Figure: Degree 7 polynomial least squares fit to the same eleven data points.

Theorem 11.1 Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Let A ∈ Cm×n (m ≥ n) and b ∈ Cm be given. A vector x ∈ Cn minimizes the residual norm kr k2 = kb − Axk2 , thereby solving the least squares problem(11.2), if and only if r ⊥ range(A), that is, A∗ r = 0 (11.8) or equivalently, A∗ Ax = A∗ b

(11.9)

or again equivalently, Pb = Ax

(11.10)

where P ∈ Cm×n is the orthogonal projector onto range (A). The n × n system of equations (11.9), known as the normal equations, is nonsingular if and only if A has full rank. Consequently the solution x is unique if and only if A has full rank.

Orthogonal Projection and the Normal Equations Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Figure: Formulation of the least squares problem (11.2) in terms of the orthogonal projection.

Proof Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

(11.8) and (11.9) are equivalent because of r = b − Ax. (11.8) and (11.10) are equivalent follows the properties of orthogonal projectors. Suppose z 6= y is another point in range(A). Since z − y is orthogonal to b − y , the Pythagorean theorem gives: kb − zk22 = kb − y k22 + ky − zk22 > kb − y k22 , as required. if A∗ A is singular, then A∗ Ax = 0 for some nonzero x, ⇒ x ∗ A∗ Ax = 0 Thus, Ax = 0 ⇒ A is rank-deficent. Conversely, if A is rank-deficent, then Ax = 0 for some nonze x, ⇒ A∗ Ax = 0 so, A∗ A is singular. By (11.9) ⇒ the uniqueness of x.

Pseudoinverse Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

If A has full rank then the solution x to the least squares problem(11.2) is unique and given by x = (A∗ A)−1 A∗ b. The matrix is known as the pseudoinverse of A, denote by A+ : A+ = (A∗ A)−1 A∗ ∈ Cm×n Summarize: the problem is to compute one or both of the vectors: x = A+ b, y = Pb where A+ is the pseudoinverse of A, and P is the orthogonal projector onto range (A)

Normal Equations Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

The classical way to solve least squares problems is to solve the normal equations (11.9) If A has full rank, this is a square,hermitian positive definite system of equations of dimension n. ⇒ The standard method of solving such a system by Cholesky factorization.

Algorithm 11.1 Least squares via Normal Equations Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Algorithm 11.1 1 Form the matrix A∗ A and the vector A∗ b. 2 the Cholesky factorization A∗ A = R ∗ R. 3 the lower-triangular system R ∗ w = A∗ b for w. 4 Solve the upper-triangular system Rx = w for x. 5 A∗ A requires only mn2 flops. 3 Cholesky factorization requires n3 flops. 3 ⇒ total operation count: ∼ mn2 + n3 flops.

Algorithm 11.1 Least squares via Normal Equations Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Algorithm 11.1 1 Form the matrix A∗ A and the vector A∗ b. 2 the Cholesky factorization A∗ A = R ∗ R. 3 the lower-triangular system R ∗ w = A∗ b for w. 4 Solve the upper-triangular system Rx = w for x. 5 A∗ A requires only mn2 flops. 3 Cholesky factorization requires n3 flops. 3 ⇒ total operation count: ∼ mn2 + n3 flops.

QR Factorization Least Square Problems Vu Xuan Quynh

The ”modern classical” method for solving least squares problems is based upon reduced QR factorization.

Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Algorithm 11.2 1 2 3 4

b R. b Compute the reduced QR factorization A = Q ∗ b b. Compute the vector Q b =Q b ∗ b for x. Solve the upper-triangular system Rx n3 2 Work for Algorithm 11.2: ∼ 2mn − 2 3 flops.

QR Factorization Least Square Problems Vu Xuan Quynh

The ”modern classical” method for solving least squares problems is based upon reduced QR factorization.

Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

Algorithm 11.2 1 2 3 4

b R. b Compute the reduced QR factorization A = Q ∗ b b. Compute the vector Q b =Q b ∗ b for x. Solve the upper-triangular system Rx n3 2 Work for Algorithm 11.2: ∼ 2mn − 2 3 flops.

Algorithm 11.3 Least Squares via SVD Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

b ΣV b ∗. Compute the reduced SVD A = U b ∗b . Compute the vector U

b =U b ∗ b for w. Solve the diagonal system Σw Set x = Vw .

Work for Algorithm 11.3: ∼ 2mn2 + 11n3 flops.

Comparison Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

When speed is the only consideration, Algorithm 11.1 may be the best. Since solving the normal equations is not always stable in the presence of rounding errors, so the Algorithm 11.2 instead as the standard method for least square problems. If A is close to rank-deficient the Algorithm 11.2 has less than ideal stability properties and we use Algorithm 11.3, based on the SVD.

Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

[Lloyd N.Trefethen and David Bau] Nurmerical Linear Algebra (SIAM, 1997) [Golub, Gene H.; Van Loan, Charles F] Matrix Computations, 3rd edition, Johns Hopkins University Press [James W. Demmel ] Applied Numerical Linear Algebra (SIAM, 1997)

Thank You Least Square Problems Vu Xuan Quynh Outline Least Square Problems The Problem Example:Polynomial Data-Fitting Orthogonal Projection and the Normal Equations Pseudoinverse Normal Equations QR Factorization SVD Comparison of Algorithms

THANKS FOR YOUR ATTENTION!

Least Square Problems - Lecture 11 -

Outline. Least Square. Problems. The Problem. Example:Polynomial. Data-Fitting. Orthogonal. Projection and the Normal. Equations. Pseudoinverse. Normal. Equations. QR Factorization. SVD. Comparison of. Algorithms. Least Square Problems. Lecture 11. Vu Xuan Quynh. K53 Advanced Maths, Ha Noi University of ...

253KB Sizes 3 Downloads 147 Views

Recommend Documents

Comparison of Recent Least Square Approaches for ...
Abstract: Image fusion is a useful technique toward the better analysis of multimodal medical images. In this paper some methods are presented for image ...

Practice Problems for Lecture 6
(a) Stock A has expected return 10% and standard deviation 15%, and stock B has expected return 12% and standard deviation 13%. Then, no investor will buy stock A. (b) Diversification means that the equally weighted portfolio is optimal. (c) The CAPM

EE 396: Lecture 10-11
From your physics class, we know that the speed of the curve squared divided by the radius of curvature is the normal component of acceleration : cpp(p) · N(p) = |cp(p)|2. R(p). = |cp(p)|2κ(p). (20) where κ(p) is one over the radius of curvature;

Homework (11). Square tool post .pdf
Homework (11). Square tool post .pdf. Homework (11). Square tool post .pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Homework (11). Square ...

2016-11-15 Washington Square West.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. 2016-11-15 ...

Treatment Effects, Lecture 1: Counterfactual problems ...
A hard-line view is expressed by Holland (and Rubin):. “NO CAUSATION WITHOUT ... by simply adding and subtracting the term in the middle. The observed ... The ATT, on the other hand, is the average treatment effect actually experienced in ...

CS425_ Computer Networks_ Lecture 11.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. CS425_ ...

Lecture 11 — November 22, 2016 Volkswagen Emissions ... - GitHub
Emissions Workshop, an academic conference, in May 2014. Regulators and ... “This VW Diesel Scandal is Much Worse Than a Re- call.” 21 September 2015.

Comparison of Square Comparison of Square-Pixel and ... - IJRIT
Square pixels became the norm because there needed to be an industry standard to avoid compatibility issues over .... Euclidean Spaces'. Information and ...

Prospect Square-De Courcy Square ACA.pdf
Teresa Place and the northern section of Prospect Avenue. The majority of ... Prospect Avenue was. constructed ... Prospect Square-De Courcy Square ACA.pdf.

SQUARE DANCE -
Form a marketing and advertising co-op of the country's most successful and knowledgeable ... Implement and encourage the use of various social media.

SQUARE DANCE -
o All 80 two couple calls (Basic thru Plus) have already been filmed and are ... Hosting live webinars (teleconferencing and video conferencing) on a variety of ...

SQUARE CUSHION.pdf
Page 1 of 1. SQUARED FELT CUSHION PATTERN. CUT 1. DECORATIVE PATTERN PIECES. ON FOLD. MAIN CUSHION. FOLD LINE. CUT 4 CUT 4. CUT 10.

Least Angle Regression
tions, and interactions between variables), to survival and other additional regression models, and to ..... The advantage over stepwise procedures is that the best set of two predictors need not include the predictor that was best in isolation. The

Lecture 7
Nov 22, 2016 - Faculty of Computer and Information Sciences. Ain Shams University ... A into two subsequences A0 and A1 such that all the elements in A0 are ... In this example, once the list has been partitioned around the pivot, each sublist .....

square pyramid.pdf
Sign in. Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying.

Square land.pdf
Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Square land.pdf. Square land.

LECTURE - CHECKLIST
Consider hardware available for visual aids - Computer/ Laptop, LCD ... Decide timing- 65 minutes for lecture and 10 minutes for questions and answers.

Lecture 3
Oct 11, 2016 - request to the time the data is available at the ... If you want to fight big fires, you want high ... On the above architecture, consider the problem.

Little Square App.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Little Square ...

on the Square
manager again. He has done a great job keeping the pool in great shape as well as becoming very good at fixing things that break! We will also have many familiar guards returning but we are always looking for new guards. Anyone interested should call