QR Factorization and Singular Value Decomposition COS 323

Similar documents
Singular Value Decomposition. Linear Algebra (3) Singular Value Decomposition. SVD and Eigenvectors. Solving LEs with SVD

( q Modal Analysis. Eigenvectors = Mode Shapes? Eigenproblem (cont) = x x 2 u 2. u 1. x 1 (4.55) vector and M and K are matrices.

3D Geometry for Computer Graphics. Lesson 2: PCA & SVD

CHAPTER 4 RADICAL EXPRESSIONS

Lattices. Mathematical background

Chapter 9 Jordan Block Matrices

4 Inner Product Spaces

1. A real number x is represented approximately by , and we are told that the relative error is 0.1 %. What is x? Note: There are two answers.

ESS Line Fitting

GG313 GEOLOGICAL DATA ANALYSIS

Assignment 5/MATH 247/Winter Due: Friday, February 19 in class (!) (answers will be posted right after class)

Econometric Methods. Review of Estimation

MOLECULAR VIBRATIONS

III-16 G. Brief Review of Grand Orthogonality Theorem and impact on Representations (Γ i ) l i = h n = number of irreducible representations.

Mu Sequences/Series Solutions National Convention 2014

Multivariate Transformation of Variables and Maximum Likelihood Estimation

Assignment 7/MATH 247/Winter, 2010 Due: Friday, March 19. Powers of a square matrix

PGE 310: Formulation and Solution in Geosystems Engineering. Dr. Balhoff. Interpolation

Model Fitting, RANSAC. Jana Kosecka

Unsupervised Learning and Other Neural Networks

Introduction to Matrices and Matrix Approach to Simple Linear Regression

Matrix Algebra Tutorial With Examples in Matlab

A scalar t is an eigenvalue of A if and only if t satisfies the characteristic equation of A: det (A ti) =0

Ahmed Elgamal. MDOF Systems & Modal Analysis

A unified matrix representation for degree reduction of Bézier curves

Lecture Notes 2. The ability to manipulate matrices is critical in economics.

Numerical Analysis Formulae Booklet

On the construction of symmetric nonnegative matrix with prescribed Ritz values

An Introduction to. Support Vector Machine

Solving Constrained Flow-Shop Scheduling. Problems with Three Machines

C-1: Aerodynamics of Airfoils 1 C-2: Aerodynamics of Airfoils 2 C-3: Panel Methods C-4: Thin Airfoil Theory

Application of Legendre Bernstein basis transformations to degree elevation and degree reduction

Chapter 2 - Free Vibration of Multi-Degree-of-Freedom Systems - II

LINEAR REGRESSION ANALYSIS

Third handout: On the Gini Index

Some Different Perspectives on Linear Least Squares

Lecture 1: Introduction to Regression

best estimate (mean) for X uncertainty or error in the measurement (systematic, random or statistical) best

2006 Jamie Trahan, Autar Kaw, Kevin Martin University of South Florida United States of America

Transforms that are commonly used are separable

Generalized Linear Regression with Regularization

Applied Fitting Theory VII. Building Virtual Particles

CS 2750 Machine Learning. Lecture 8. Linear regression. CS 2750 Machine Learning. Linear regression. is a linear combination of input components x

Lecture 5: Interpolation. Polynomial interpolation Rational approximation

Ordinary Least Squares Regression. Simple Regression. Algebra and Assumptions.

Functions of Random Variables

ENGI 4421 Propagation of Error Page 8-01

Random Variate Generation ENM 307 SIMULATION. Anadolu Üniversitesi, Endüstri Mühendisliği Bölümü. Yrd. Doç. Dr. Gürkan ÖZTÜRK.

Lecture 8: Linear Regression

Computational Geometry

Algorithms Theory, Solution for Assignment 2

MATH 247/Winter Notes on the adjoint and on normal operators.

The number of observed cases The number of parameters. ith case of the dichotomous dependent variable. the ith case of the jth parameter

Supervised learning: Linear regression Logistic regression

( ) 2 2. Multi-Layer Refraction Problem Rafael Espericueta, Bakersfield College, November, 2006

8.1 Hashing Algorithms

Lecture Notes Types of economic variables

On Singular Value Decomposition of Rectangular Matrices

Investigating Cellular Automata

STATISTICAL PROPERTIES OF LEAST SQUARES ESTIMATORS. x, where. = y - ˆ " 1

For combinatorial problems we might need to generate all permutations, combinations, or subsets of a set.

L5 Polynomial / Spline Curves

x y exp λ'. x exp λ 2. x exp 1.

α1 α2 Simplex and Rectangle Elements Multi-index Notation of polynomials of degree Definition: The set P k will be the set of all functions:

1 Lyapunov Stability Theory

MATH 371 Homework assignment 1 August 29, 2013

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand DIS 10b

Power Flow S + Buses with either or both Generator Load S G1 S G2 S G3 S D3 S D1 S D4 S D5. S Dk. Injection S G1

Simple Linear Regression

1 Mixed Quantum State. 2 Density Matrix. CS Density Matrices, von Neumann Entropy 3/7/07 Spring 2007 Lecture 13. ψ = α x x. ρ = p i ψ i ψ i.

TESTS BASED ON MAXIMUM LIKELIHOOD

Lecture 2: Linear Least Squares Regression

Lecture 3. Sampling, sampling distributions, and parameter estimation

1 0, x? x x. 1 Root finding. 1.1 Introduction. Solve[x^2-1 0,x] {{x -1},{x 1}} Plot[x^2-1,{x,-2,2}] 3

Johns Hopkins University Department of Biostatistics Math Review for Introductory Courses

MMJ 1113 FINITE ELEMENT METHOD Introduction to PART I

Regression and the LMS Algorithm

CS 1675 Introduction to Machine Learning Lecture 12 Support vector machines

Arithmetic Mean and Geometric Mean

Lecture 3 Probability review (cont d)

Chapter 3. Linear Equations and Matrices

Multiple Regression. More than 2 variables! Grade on Final. Multiple Regression 11/21/2012. Exam 2 Grades. Exam 2 Re-grades

Summary of the lecture in Biostatistics

Feature Selection: Part 2. 1 Greedy Algorithms (continued from the last lecture)

1 Onto functions and bijections Applications to Counting

Chapter 4 (Part 1): Non-Parametric Classification (Sections ) Pattern Classification 4.3) Announcements

EECE 301 Signals & Systems

Maps on Triangular Matrix Algebras

18.413: Error Correcting Codes Lab March 2, Lecture 8

Ideal multigrades with trigonometric coefficients

MA 524 Homework 6 Solutions

UNIT 2 SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS

Lecture 7. Confidence Intervals and Hypothesis Tests in the Simple CLR Model

A conic cutting surface method for linear-quadraticsemidefinite

Johns Hopkins University Department of Biostatistics Math Review for Introductory Courses

The Selection Problem - Variable Size Decrease/Conquer (Practice with algorithm analysis)

F. Inequalities. HKAL Pure Mathematics. 進佳數學團隊 Dr. Herbert Lam 林康榮博士. [Solution] Example Basic properties

n -dimensional vectors follow naturally from the one

CHAPTER VI Statistical Analysis of Experimental Data

Kernel-based Methods and Support Vector Machines

Transcription:

QR Factorzato ad Sgular Value Decomposto COS 33

Why Yet Aother Method? How do we solve least-squares wthout currg codto-squarg effect of ormal equatos (A T A A T b) whe A s sgular, fat, or otherwse poorly-specfed? QR Factorzato Householder method Sgular Value Decomposto Total least squares Practcal otes

Revew: Codto Number Cod(A) s fucto of A Cod(A) >, bgger s bad Measures how chage put propagates to output: A cod(a) A E.g., f cod(a) 45 the ca lose log(45).65 dgts of accuracy, compared to precso of A

Normal Equatos are Bad cod(a) A A Normal equatos volves solvg A T A A T b cod(a T A) [cod(a)] E.g., f cod(a) 45 the ca lose log(45 ) 5.3 dgts of accuracy, compared to precso of A

QR Decomposto

What f we dd t have to use A T A? Suppose we are lucky : Upper tragular matrces are ce! b R

How to make A upper-tragular? Gaussa elmato? Applyg elmato yelds MA Mb Wat to fd s.t. mmzes Mb-MA Problem: Mv! v (.e., M mght stretch a vector v) Aother problem: M may stretch dfferet vectors dfferetly.e., M does ot preserve Eucldea orm.e., that mmzes Mb-MA may ot be same that mmzes Ab

QR Factorzato Fd upper-tragular R ad orthogoal Q s.t. R R A Q, so Q Does t chage least-squares soluto Q T QI, colums of Q are orthoormal.e., Q preserves Eucldea orm: Qv v T b

Goal of QR???? Q R Q A m m m m R:, upper tr. (m-), all zeros

Reformulatg Least Squares usg QR c c R c O R b Q O R Q Q b Q O R Q b A b r T T T + O R Q A because because Q preserves legths f we call c c Q T b f we choose such that Rc because Q s orthogoal (Q T QI)

Householder Method for Computg QR Decomposto

Orthogoalzato for Factorzato Rough dea: A R Q O For each -th colum of A, zero out rows + ad lower Accomplsh ths by multplyg A wth a orthogoal matr H Equvaletly, apply a orthogoal trasformato to the -th colum (e.g., rotato, reflecto) Q becomes product H * *H, R cotas zero-ed out colums

Householder Trasformato Accomplshes the crtcal sub-step of factorzato: Gve ay vector (e.g., a colum of A), reflect t so that ts last p elemets become. Reflecto preserves legth (Eucldea orm) (4, 3) (-5, )

Outcome of Householder R H HA O T where Q H H so Q HH R so A Q O

Revew: Least Squares usg QR c c R c O R b Q O R Q Q b Q O R Q b A b r T T T + O R Q A because because Q preserves legths f we call c c Q T b f we choose such that Rc because Q s orthogoal (Q T QI)

Usg Householder Iteratvely compute H, H, H ad apply to A to get R also apply to b to get Q T b c c Solve for Rc usg back-substtuto

Alteratve Orthogoalzato Methods Gves: Do t reflect; rotate stead Itroduces zeroes to A oe at a tme More complcated mplemetato tha Householder Useful whe matr s sparse Gram-Schmdt Iteratvely epress each ew colum vector as a lear combato of prevous colums, plus some (ormalzed) orthogoal compoet Coceptually ce, but suffers from subtractve cacellato

Sgular Value Decomposto

Motvato Dagoal matrces are eve cer tha tragular oes:

Motvato What f you have fewer data pots tha parameters your fucto?.e., A s fat Itutvely, ca t do stadard least squares Recall that soluto takes the form A T A A T b Whe A has more colums tha rows, A T A s sgular: ca t take ts verse, etc.

Motvato 3 What f your data poorly costras the fucto? Eample: fttg to ya +b+c

Udercostraed Least Squares Problem: f problem very close to sgular, roudoff error ca have a huge effect Eve o well-determed values! Ca detect ths: Ucertaty proportoal to covarace C (A T A) - I other words, ustable f A T A has small values More precsely, care f T (A T A) s small for ay Idea: f part of soluto ustable, set aswer to Avod corruptg good parts of aswer

Sgular Value Decomposto (SVD) Hady mathematcal techque that has applcato to may problems Gve ay m matr A, algorthm to fd matrces U, V, ad W such that A U W V T U s m ad orthoormal W s ad dagoal V s ad orthoormal

SVD Based o Householder reducto, QR decomposto, but treat as black bo: code wdely avalable e.g., Matlab: [U,W,V]svd(A,) T V U A w w

SVD The w are called the sgular values of A If A s sgular, some of the w wll be I geeral rak(a) umber of ozero w SVD s mostly uque (up to permutato of sgular values, or f some w are equal)

SVD ad Iverses Why s SVD so useful? Applcato : verses A - (V T ) - W - U - V W - U T Usg fact that verse traspose for orthogoal matrces Sce W s dagoal, W - also dagoal wth recprocals of etres of W

SVD ad the Pseudoverse A - (V T ) - W - U - V W - U T Ths fals whe some w are It s supposed to fal sgular matr Happes whe rectagular A s rak defcet Pseudoverse: f w, set /w to (!) Closest matr to verse Defed for all (eve o-square, sgular, etc.) matrces Equal to (A T A) - A T f A T A vertble

SVD ad Codto Number Sgular values used to compute Eucldea (spectral) orm for a matr: cod(a) σ (A) ma σ (A) m

SVD ad Least Squares Solvg Ab by least squares: A T A A T b (A T A) - A T b Replace wth A + : A + b Compute pseudoverse usg SVD Lets you see f data s sgular (< ozero sgular values) Eve f ot sgular, codto umber tells you how stable the soluto wll be Set /w to f w s small (eve f ot eactly )

Total Least Squares Oe fal least squares applcato Fttg a le: vertcal vs. perpedcular error

Total Least Squares Dstace from pot to le: where s ormal vector to le, a s a costat Mmze: a y d a y d χ

Total Least Squares Frst, let s preted we kow, solve for a The y m a a y χ y a y d m y m Σ Σ

Total Least Squares So, let s defe ad mmze Σ Σ m y m y y ~ ~ y ~ ~

Total Least Squares Wrte as lear system Have A Problem: lots of are solutos, cludg Stadard least squares wll, fact, retur ~ ~ ~ ~ ~ ~ 3 3 y y y y

Costraed Optmzato Soluto: costra to be ut legth So, try to mmze A subject to Epad egevectors e of A T A: where the λ are egevalues of A T A ( ) ( ) A A A A A T T T ( ) T T µ µ µ λ λ µ µ µ + + + A A e e

Costraed Optmzato To mmze µ λµ subject to set µ m, all other µ λ + µ + µ That s, s egevector of A T A wth the smallest correspodg egevalue

SVD ad Egevectors Let AUWV T, ad let be th colum of V Cosder A T A : So elemets of W are sqrt(egevalues) ad colums of V are egevectors of A T A w w T T T T T V VW VW V UWV VW U A A

Costraed Optmzato To mmze µ λµ subject to set µ m, all other µ λ + µ + µ That s, s egevector of A T A wth the smallest correspodg egevalue That s, s colum of V correspodg to smallest sgular value

Comparso of Least Squares Methods Normal equatos (A T A A T b) O(m ) (usg Cholesky) cod(a T A)[cod(A)] Cholesky fals f cod(a)~/sqrt(mache epslo) Householder Usually best orthogoalzato method O(m - 3 /3) operatos Relatve error s best possble for least squares Breaks f cod(a) ~ /(mache eps) SVD Epesve: m + 3 wth bad costat factor Ca hadle rak-defcecy, ear-sgularty Hady for may dfferet thgs