Conjugate Gradients I: Setup

Similar documents
Eigenproblems II: Computation

Optimization II: Unconstrained Multivariable

Optimization II: Unconstrained Multivariable

Iterative Linear Solvers

Linear Algebra Review

Linear Systems and LU

The Conjugate Gradient Method

Conjugate Gradient Method

Linear Systems and LU

Chapter 10 Conjugate Direction Methods

Norms, Sensitivity and Conditioning

Iterative Methods for Solving A x = b

the method of steepest descent

Ordinary Differential Equations I

Math 5630: Conjugate Gradient Method Hung M. Phan, UMass Lowell March 29, 2019

Conjugate gradient method. Descent method. Conjugate search direction. Conjugate Gradient Algorithm (294)

Topics. The CG Algorithm Algorithmic Options CG s Two Main Convergence Theorems

Notes on Some Methods for Solving Linear Systems

Lec10p1, ORF363/COS323

The Conjugate Gradient Method

Course Notes: Week 1

4.8 Arnoldi Iteration, Krylov Subspaces and GMRES

Conjugate Gradient algorithm. Storage: fixed, independent of number of steps.

Ordinary Differential Equations I

The Conjugate Gradient Method

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Bastian Steder

Singular Value Decomposition

Chapter 7 Iterative Techniques in Matrix Algebra

The Conjugate Gradient Method

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti

Math 416, Spring 2010 Gram-Schmidt, the QR-factorization, Orthogonal Matrices March 4, 2010 GRAM-SCHMIDT, THE QR-FACTORIZATION, ORTHOGONAL MATRICES

Announce Statistical Motivation Properties Spectral Theorem Other ODE Theory Spectral Embedding. Eigenproblems I

Lecture 10: October 27, 2016

Announce Statistical Motivation ODE Theory Spectral Embedding Properties Spectral Theorem Other. Eigenproblems I

Linear Independence. Stephen Boyd. EE103 Stanford University. October 9, 2017

Applied Mathematics 205. Unit V: Eigenvalue Problems. Lecturer: Dr. David Knezevic

Course Information Course Overview Study Skills Background Material. Introduction. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics

Numerical Methods - Numerical Linear Algebra

Some definitions. Math 1080: Numerical Linear Algebra Chapter 5, Solving Ax = b by Optimization. A-inner product. Important facts

Linear Algebra II. 7 Inner product spaces. Notes 7 16th December Inner products and orthonormal bases

The conjugate gradient method

Trace balancing with PEF plane annihilators

6.4 Krylov Subspaces and Conjugate Gradients

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Maren Bennewitz, Diego Tipaldi, Luciano Spinello

Part 3: Trust-region methods for unconstrained optimization. Nick Gould (RAL)

INNER PRODUCT SPACE. Definition 1

The Conjugate Gradient Algorithm

Homework 11 Solutions. Math 110, Fall 2013.

AMS526: Numerical Analysis I (Numerical Linear Algebra)

22m:033 Notes: 7.1 Diagonalization of Symmetric Matrices

EECS 275 Matrix Computation

Lecture 22. r i+1 = b Ax i+1 = b A(x i + α i r i ) =(b Ax i ) α i Ar i = r i α i Ar i

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

Preface to the Second Edition. Preface to the First Edition

MATH 235: Inner Product Spaces, Assignment 7

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz

Mathematical Methods wk 1: Vectors

Mathematical Methods wk 1: Vectors

Applied Linear Algebra

Conjugate Gradient (CG) Method

Chapter 8 Gradient Methods

Lecture 17 Methods for System of Linear Equations: Part 2. Songting Luo. Department of Mathematics Iowa State University

Lab 1: Iterative Methods for Solving Linear Systems

Final Examination. CS 205A: Mathematical Methods for Robotics, Vision, and Graphics (Fall 2013), Stanford University

Computational Linear Algebra

ITERATIVE METHODS FOR SPARSE LINEAR SYSTEMS

Mathematical optimization

Linear Regression. S. Sumitra

Applied Linear Algebra in Geoscience Using MATLAB

Programming, numerics and optimization

Conjugate-Gradient. Learn about the Conjugate-Gradient Algorithm and its Uses. Descent Algorithms and the Conjugate-Gradient Method. Qx = b.

An Iterative Descent Method

Ordinary Differential Equations I

Course Notes: Week 4

The Conjugate Gradient Method for Solving Linear Systems of Equations

Optimization methods

ON ORTHOGONAL REDUCTION TO HESSENBERG FORM WITH SMALL BANDWIDTH

Gradient Descent Methods

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Total 170. Name. Final Examination M340L-CS

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

Parallel Numerics, WT 2016/ Iterative Methods for Sparse Linear Systems of Equations. page 1 of 1

Linear Analysis Lecture 16

ECE580 Partial Solution to Problem Set 3

M.A. Botchev. September 5, 2014

TMA 4180 Optimeringsteori THE CONJUGATE GRADIENT METHOD

Conjugate Gradients: Idea

4.6 Iterative Solvers for Linear Systems

Nonlinear Optimization

Iterative Methods for Linear Systems

Convex Optimization. Problem set 2. Due Monday April 26th

8 Numerical methods for unconstrained problems

Iterative methods for Linear System

ECE 680 Modern Automatic Control. Gradient and Newton s Methods A Review

SPEEDING UP THE CONVERGENCE OF SIMPLE GRADIENT METHODS

Practice problems for Exam 3 A =

Chapter 9 Implicit integration, incompressible flows

MATH 304 Linear Algebra Lecture 20: The Gram-Schmidt process (continued). Eigenvalues and eigenvectors.

Computational Linear Algebra

Notes on PCG for Sparse Linear Systems

Transcription:

Conjugate Gradients I: Setup CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Conjugate Gradients I: Setup 1 / 22

Time for Gaussian Elimination A R n n = CS 205A: Mathematical Methods Conjugate Gradients I: Setup 2 / 22

Time for Gaussian Elimination A R n n = O(n 3 ) CS 205A: Mathematical Methods Conjugate Gradients I: Setup 2 / 22

Common Case Easy to apply, hard to invert. Sparse matrices Special structure CS 205A: Mathematical Methods Conjugate Gradients I: Setup 3 / 22

New Philosophy Iteratively improve approximation rather than solve in closed form. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 4 / 22

For Today A x = b Square Symmetric Positive definite CS 205A: Mathematical Methods Conjugate Gradients I: Setup 5 / 22

Variational Viewpoint min x A x = b [ ] 1 2 x A x b x + c CS 205A: Mathematical Methods Conjugate Gradients I: Setup 6 / 22

Gradient Descent Strategy 1. Compute search direction CS 205A: Mathematical Methods Conjugate Gradients I: Setup 7 / 22

Gradient Descent Strategy 1. Compute search direction d k f( x k 1 ) = b A x k 1 CS 205A: Mathematical Methods Conjugate Gradients I: Setup 7 / 22

Gradient Descent Strategy 1. Compute search direction d k f( x k 1 ) = b A x k 1 2. Do line search to find x k x k 1 + α k dk. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 7 / 22

Line Search Along d from x min α g(α) f( x + α d) CS 205A: Mathematical Methods Conjugate Gradients I: Setup 8 / 22

Line Search Along d from x min α g(α) f( x + α d) α = d ( b A x) d A d CS 205A: Mathematical Methods Conjugate Gradients I: Setup 8 / 22

Gradient Descent with Closed-Form Line Search d k = b A x k 1 α k = d k d k d k A d k x k = x k 1 + α k dk CS 205A: Mathematical Methods Conjugate Gradients I: Setup 9 / 22

Convergence See book. f( x k ) f( x ) f( x k 1 ) f( x ) 1 1 cond A Conclusions: Conditioning affects speed and quality Unconditional convergence (cond A 1) CS 205A: Mathematical Methods Conjugate Gradients I: Setup 10 / 22

Visualization CS 205A: Mathematical Methods Conjugate Gradients I: Setup 11 / 22

Can We Do Better? Can iterate forever: Should stop after O(n) iterations! Lots of repeated work when poorly conditioned CS 205A: Mathematical Methods Conjugate Gradients I: Setup 12 / 22

Observation f( x) = 1 2 ( x x ) A( x x ) + const. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 13 / 22

Observation f( x) = 1 2 ( x x ) A( x x ) + const. A = LL CS 205A: Mathematical Methods Conjugate Gradients I: Setup 13 / 22

Observation f( x) = 1 2 ( x x ) A( x x ) + const. A = LL = f( x) = 1 2 L ( x x ) 2 2 + const. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 13 / 22

Substitution y L x, y L x = f( y) = y y 2 2 CS 205A: Mathematical Methods Conjugate Gradients I: Setup 14 / 22

Substitution y L x, y L x = f( y) = y y 2 2 Proposition Suppose { w 1,..., w n } are orthogonal in R n. Then, f is minimized in at most n steps by line searching in direction w 1, then direction w 2, and so on. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 14 / 22

Visualization Any two orthogonal directions suffice! CS 205A: Mathematical Methods Conjugate Gradients I: Setup 15 / 22

Undoing Change of Coordinates Line search on f along w is the same as line search on f along (L ) 1 w. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 16 / 22

Undoing Change of Coordinates Line search on f along w is the same as line search on f along (L ) 1 w. 0 = w i w j = (L v i ) (L v j ) = v i (LL ) v j = v i A v j CS 205A: Mathematical Methods Conjugate Gradients I: Setup 16 / 22

Conjugate Directions A-Conjugate Vectors Two vectors v and w are A-conjugate if v A w = 0. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 17 / 22

Conjugate Directions A-Conjugate Vectors Two vectors v and w are A-conjugate if v A w = 0. Corollary Suppose { v 1,..., v n } are A-conjugate. Then, f is minimized in at most n steps by line searching in direction v 1, then direction v 2, and so on. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 17 / 22

High-Level Ideas So Far Steepest descent may not be fastest descent (surprising!) CS 205A: Mathematical Methods Conjugate Gradients I: Setup 18 / 22

High-Level Ideas So Far Steepest descent may not be fastest descent (surprising!) Two inner products: v w v, w A v A w CS 205A: Mathematical Methods Conjugate Gradients I: Setup 18 / 22

New Problem Find n A-conjugate directions. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 19 / 22

Gram-Schmidt? CS 205A: Mathematical Methods Conjugate Gradients I: Setup 20 / 22

Gram-Schmidt? Potentially unstable CS 205A: Mathematical Methods Conjugate Gradients I: Setup 20 / 22

Gram-Schmidt? Potentially unstable Storage increases with each iteration CS 205A: Mathematical Methods Conjugate Gradients I: Setup 20 / 22

Another Clue r k b A x k CS 205A: Mathematical Methods Conjugate Gradients I: Setup 21 / 22

Another Clue r k b A x k r k+1 = r k α k+1 A v k+1 CS 205A: Mathematical Methods Conjugate Gradients I: Setup 21 / 22

Another Clue r k b A x k r k+1 = r k α k+1 A v k+1 Proposition When performing gradient descent on f, span { r 0,..., r k } = span { r 0, A r 0,..., A k r 0 }. CS 205A: Mathematical Methods Conjugate Gradients I: Setup 21 / 22

Another Clue r k b A x k r k+1 = r k α k+1 A v k+1 Proposition When performing gradient descent on f, span { r 0,..., r k } = span { r 0, A r 0,..., A k r 0 }. Krylov space?! CS 205A: Mathematical Methods Conjugate Gradients I: Setup 21 / 22

Gradient Descent: Issue x k x 0 arg min v span { r 0,A r 0,...,A k 1 r 0 } f( x 0 + v) CS 205A: Mathematical Methods Conjugate Gradients I: Setup 22 / 22

Gradient Descent: Issue x k x 0 arg min v span { r 0,A r 0,...,A k 1 r 0 } f( x 0 + v) But if this did hold... Convergence in n steps! Next CS 205A: Mathematical Methods Conjugate Gradients I: Setup 22 / 22