SlideShare a Scribd company logo
1 of 19
Download to read offline
FAHAD	BIN	MOSTAFA
TEXAS	TECH	UNIVERSITY
DECEMBER	09,	2020
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 1
Texas Tech University
Conjugate Gradient for Normal Equations and
Preconditioning
Outlines
Ø Linear Systems and its least square problem
Ø Arnoldi’s iteration, GMRES Method, and its Convergence
Ø Preconditioned Conjugate Gradient with Normal Equations
Ø Block Conjugate Gradient algorithms for least squares
problems
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 2
Linear Systems & Sparse Matrix
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 3
A X b
Data Source: Harwell-Boeing test matrix “A", a matrix describing
connections in a model of a diffraction column in a chemical plant which
is not SPD [1] ; Dimension of data set: 479 by 479
Matrix	Statistics	(479	x 479,	1910	entries)
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 4
Least	square	Problem	
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 5
• min	 	𝑟& '
'
	=	 𝑏 − 𝐴𝑥& '
'
;
• let’s take 𝐴-×/
and 𝑥𝜖𝑅/
. Let’s take
the initial guess 𝑥2 = 0 and the
residual will be 𝑟2 = 𝑏;
• relative residual error 𝑅𝑅𝑉 =
56789
5
• LS stopped at iteration 20 without converging
to the desired tolerance 1e-06 because the
maximum number of iterations was reached.
• The iterate returned (number 20) has relative
residual 0.0017.
• Elapsed time is 1.922524 seconds.
Arnoldi’s	iteration	and	GMRES	
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 6
• The order n Krylov subspace of 𝐴 generated by 𝑏 is,
𝐾& 𝐴, 𝑏 = 𝑠𝑝𝑎𝑛 𝑟2, 𝐴𝑏, 	𝐴'
𝑏, … , 𝐴&6A
𝑏 		for	𝑛 = 1,2, …
If the vectors 𝑏, 𝐴𝑏, 	𝐴'
𝑏, … , 𝐴&6A
𝑏 are linearly
independent, then they are the basis for 𝐾& 𝐴, 𝑏 .
Although, lim
&↑I
𝐴&
𝑏 → 𝑑𝑜𝑚𝑖𝑛𝑎𝑛𝑡	𝑒𝑖𝑔𝑒𝑛𝑣𝑒𝑐𝑡𝑜𝑟	𝑜𝑓	𝐴,
which fills the basis with many almost parallel vectors.
• 	Finally	 𝑏 𝑒A − 𝐻Y& 𝑧
'
'
→ 𝑚𝑖𝑛.	
• 	 	𝑟& '
'
	=	 𝑏 − 𝐴𝑥& '
'
= 𝑟2 − 𝐴𝑄& 𝑧 '
'
→ 𝑚𝑖𝑛.	
0 10 20 30 40 50 60 70 80 90 100
Iteration number
10-8
10
-7
10
-6
10
-5
10
-4
10
-3
10
-2
Relativeresidual
No preconditioner GMRES
ILU preconditioner GMRES
Tolerance
• Solve the preconditioned system M−1A x=b by
specifying L and U as inputs to GMRES.
• Elapsed time is 0.253678 seconds
Convergence	of	GMRES
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 7
While the GMRES convergence is a little tricky to know
in advance, the theorem above tells us some situations
when we expect rapid convergence of GMRES
1. The eigenvalues of 𝐴 are far from the origin,
2. The eigenvector matrix of 𝐴 is well-conditioned, and
3. The eigenvalues of 𝐴 are clustered.
Fast Convergence
Fact Check
Proof	
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 8
Conjugate Gradient for Normal
Equations
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 9
Conjugate Gradient for Normal Equations: 𝐴]
𝐴𝑥 = 𝐴]
𝑏
For our moto here, it is useful to recast this problem as an
equivalent optimization problem
																max
8
𝑓 𝑥 =
1
2
𝑥]
𝐴𝑥 − 𝑏]
𝑥 + 𝑐																													(5)
Note that ∇𝑓 𝑥 = 𝐴𝑥 − 𝑏, so the minimizing function 𝑓(𝑥) is
the same as solving
																									0 = ∇𝑓 𝑥 = 𝐴𝑥 − 𝑏																																							(6)
Algorithm
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 10
Algorithm for PCG:
Take 𝑥2=0, 𝑟2 = 0
Solve 𝑀	𝑟2f = 𝑟2 for 𝑟2f
Consider 𝑃2 = 𝑟2f
for 𝑛 = 1,2,3, …
𝛼& = 𝑟&6A
]
𝑟&6Aj/𝑃&6A
]
𝐴𝑃&6A;
𝑥& = 𝑥&6A + 𝛼& 𝑃&6A; # Approximate solution
𝑟& = 𝑟&6A − 𝛼& 𝐴𝑃&6A; # Update the residual
Solve 𝑀	𝑟&f = 𝑟&for	𝑟&f
𝛽& = 𝑟&
]
𝑟&f/𝑟&6A
]
𝑟&6Aj; # Gradient correction factor
𝑃& = 𝑟&f + 𝛽& 𝑃&6A; # New search Direction PCG converged at iteration 52 to a solution with relative
residual 9.1e-08.
CG	with	Normal	Equation	
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 11
𝐴]
𝐴𝑥 = 𝐴]
𝑏
Preconditioning	technique
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 12
An standard way to choose preconditioner 𝑀, such a way 𝐴m =	 𝑀6A
𝐴 which will be better clustered eigenvalues
for the GMRES method.					𝑀6A
	𝐴]
𝐴𝑥 = 𝑀6A
𝐴]
𝑏	;														𝐴m 𝑥o = 𝑏	p																																	(9)			
Which converge faster. The number of iterations required for the conjugate gradient algorithm to converge is
proportional to 𝜅 𝐴 . So, we want something like 𝜅 𝐴m ≪ 𝜅 𝐴 . In order to ensure symmetry and positive
definiteness of 𝐴m we check 𝑀6A
= 𝐿𝐿]
. So the new residual is 𝑟&v = 𝑏w − 𝐴m 𝑥&x = 𝐿]
𝐴]
𝑏 − 𝐿]
𝐴]
𝐴𝑥& = 𝐿]
𝑟&
Then we have 𝑃&
y = 𝐿6A
𝑃&	;	𝑟&f = 𝑀6A
𝑟&
Algorithm	PCGNE
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 13
Take 𝑥2=0, 𝑟2 = 0
Solve 𝑀	𝑟2f = 𝑟2 for 𝑟2f
Consider 𝑃2 = 𝑟2f
for 𝑛 = 1,2,3, …
𝛼& = 𝑟&6A
]
𝑟&6Aj/𝐴]
𝑃&6A
]
𝐴𝑃&6A;
𝑥& = 𝑥&6A + 𝛼& 𝑃&6A; # Approximate solution
𝑟& = 𝑟&6A − 𝛼& 𝐴]
𝐴𝑃&6A; # Update the residual
Solve 𝑀	𝑟&f = 𝑟&for	𝑟&f
𝛽& = 𝑟&
]
𝑟&f/𝑟&6A
]
𝑟&6Aj; # Gradient correction factor
𝑃& = 𝑟&f + 𝛽& 𝑃&6A; # New search Direction
PCGNE
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 14
Block	Conjugate	Gradient	algorithms	for	least	
squares	problems	
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 15
• Conjugate Gradient Least Squares (CGLS) algorithm
in block forms, so-called Block Conjugate Gradient
Least Squares (BCGLS) by Ji, H., & Li, Y. (2017).
• BCGLS considers a linear system in block form with s
right hand sides in the block matrix 𝐵. i.e. 𝐴𝑥 = 𝐵
• BCGLS constructs Krylov subspace in block form
𝐾& 𝐴, 𝑏 = 𝑠𝑝𝑎𝑛 𝐴]
𝑟2, 𝐴]
	𝐴𝑏, 	(𝐴]
𝐴)'
𝑏, … , (𝐴]
𝐴)&6A
𝑏
Algorithm	
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 16
Results	
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 17
Colormap of 𝐴 𝑇
𝐴	-orthogonality between Search Matrices in the first 31 iterations (left), condition number of
𝑄𝑖
𝑇
𝑄𝑖 (right up), and maximum and i minimum relative residual norms of columns in Xi (right lower) for a block
linear system with 100 right hand sides using ‘‘gre_1107’’ as the coefficient matrix along BCGLS iterations. [5]
References	
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 18
• https://math.nist.gov/MatrixMarket/collections/hb.html
• Y. Saad and M. H. Schultz, GMRES: A generalized minimal residual algorithm for solving nonsymmetric
linear systems, SIAM J. Sci. Statist. Comput., 7 (1986), pp. 856–869.
• D. C. Sorensen, Implicit application of polynomial filters in a k-step Arnoldi method, SIAM
• J. MatrixAnal. Appl., 13 (1992), pp. 357–385.
• W. A. Joubert, On the convergence behavior of the restarted GMRES algorithm for solving nonsymmetric
linear systems, Numer. Linear Algebra Appl., 1 (1994), pp. 427–447.
• Ji, H., & Li, Y. (2017). Block conjugate gradient algorithms for least squares problems. Journal of
Computational and Applied Mathematics, 317, 203-217.
DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 19

More Related Content

What's hot

Electric field of a wire
Electric field of a wireElectric field of a wire
Electric field of a wireFFMdeMul
 
Symmetrical components
Symmetrical componentsSymmetrical components
Symmetrical componentsSirat Mahmood
 
Special semiconductor devices
Special semiconductor devicesSpecial semiconductor devices
Special semiconductor devicesRAMPRAKASHT1
 
Practical of Power System Analysis (PSA)
Practical of Power System Analysis (PSA)Practical of Power System Analysis (PSA)
Practical of Power System Analysis (PSA)Aneel-k Suthar
 
Computational electromagnetics
Computational electromagneticsComputational electromagnetics
Computational electromagneticsAwaab Fakih
 
Iterative methods
Iterative methodsIterative methods
Iterative methodsKt Silva
 
Practical Shielding, EMC/EMI, Noise Reduction, Earthing and Circuit Board Layout
Practical Shielding, EMC/EMI, Noise Reduction, Earthing and Circuit Board LayoutPractical Shielding, EMC/EMI, Noise Reduction, Earthing and Circuit Board Layout
Practical Shielding, EMC/EMI, Noise Reduction, Earthing and Circuit Board LayoutLiving Online
 
Atomic emission spectra and the quantum mechanical model
Atomic emission spectra and the quantum mechanical model Atomic emission spectra and the quantum mechanical model
Atomic emission spectra and the quantum mechanical model Angbii Gayden
 
Load dispatch center
Load dispatch centerLoad dispatch center
Load dispatch centerddxdharmesh
 
Lagrange's Theorem
Lagrange's TheoremLagrange's Theorem
Lagrange's Theoremjohn1129
 
Muller method
Muller methodMuller method
Muller methodJeannie
 
transmission-lines
transmission-linestransmission-lines
transmission-linesATTO RATHORE
 
Routh hurwitz stability criterion
Routh hurwitz stability criterionRouth hurwitz stability criterion
Routh hurwitz stability criterionSouvik Dutta
 
Lecture 2 ME 176 2 Mathematical Modeling
Lecture 2 ME 176 2 Mathematical ModelingLecture 2 ME 176 2 Mathematical Modeling
Lecture 2 ME 176 2 Mathematical ModelingLeonides De Ocampo
 

What's hot (20)

Z bus building algorithm
Z bus building algorithmZ bus building algorithm
Z bus building algorithm
 
Electric field of a wire
Electric field of a wireElectric field of a wire
Electric field of a wire
 
Symmetrical and un-symmetrical fault
Symmetrical and un-symmetrical faultSymmetrical and un-symmetrical fault
Symmetrical and un-symmetrical fault
 
Unit1 8
Unit1 8Unit1 8
Unit1 8
 
Symmetrical components
Symmetrical componentsSymmetrical components
Symmetrical components
 
Thevenin theorem
Thevenin theoremThevenin theorem
Thevenin theorem
 
Special semiconductor devices
Special semiconductor devicesSpecial semiconductor devices
Special semiconductor devices
 
Practical of Power System Analysis (PSA)
Practical of Power System Analysis (PSA)Practical of Power System Analysis (PSA)
Practical of Power System Analysis (PSA)
 
Computational electromagnetics
Computational electromagneticsComputational electromagnetics
Computational electromagnetics
 
Secant Method
Secant MethodSecant Method
Secant Method
 
Iterative methods
Iterative methodsIterative methods
Iterative methods
 
Practical Shielding, EMC/EMI, Noise Reduction, Earthing and Circuit Board Layout
Practical Shielding, EMC/EMI, Noise Reduction, Earthing and Circuit Board LayoutPractical Shielding, EMC/EMI, Noise Reduction, Earthing and Circuit Board Layout
Practical Shielding, EMC/EMI, Noise Reduction, Earthing and Circuit Board Layout
 
Atomic emission spectra and the quantum mechanical model
Atomic emission spectra and the quantum mechanical model Atomic emission spectra and the quantum mechanical model
Atomic emission spectra and the quantum mechanical model
 
Load dispatch center
Load dispatch centerLoad dispatch center
Load dispatch center
 
Lagrange's Theorem
Lagrange's TheoremLagrange's Theorem
Lagrange's Theorem
 
Muller method
Muller methodMuller method
Muller method
 
transmission-lines
transmission-linestransmission-lines
transmission-lines
 
Routh hurwitz stability criterion
Routh hurwitz stability criterionRouth hurwitz stability criterion
Routh hurwitz stability criterion
 
Varactor diode
Varactor diodeVaractor diode
Varactor diode
 
Lecture 2 ME 176 2 Mathematical Modeling
Lecture 2 ME 176 2 Mathematical ModelingLecture 2 ME 176 2 Mathematical Modeling
Lecture 2 ME 176 2 Mathematical Modeling
 

Similar to Conjugate Gradient for Normal Equations and Preconditioning

Smoothed Particle Galerkin Method Formulation.pdf
Smoothed Particle Galerkin Method Formulation.pdfSmoothed Particle Galerkin Method Formulation.pdf
Smoothed Particle Galerkin Method Formulation.pdfkeansheng
 
Optimization of positive linear systems via geometric programming
Optimization of positive linear systems via geometric programmingOptimization of positive linear systems via geometric programming
Optimization of positive linear systems via geometric programmingMasaki Ogura
 
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...Xavier Llorà
 
Efficient Computation of Regret-ratio Minimizing Set: A Compact Maxima Repres...
Efficient Computation ofRegret-ratio Minimizing Set:A Compact Maxima Repres...Efficient Computation ofRegret-ratio Minimizing Set:A Compact Maxima Repres...
Efficient Computation of Regret-ratio Minimizing Set: A Compact Maxima Repres...Abolfazl Asudeh
 
Numerical limit analysis method
Numerical limit analysis methodNumerical limit analysis method
Numerical limit analysis methodkeyvanzarerami
 
Clustering coefficients for correlation networks
Clustering coefficients for correlation networksClustering coefficients for correlation networks
Clustering coefficients for correlation networksNaoki Masuda
 
Application of parallel hierarchical matrices for parameter inference and pre...
Application of parallel hierarchical matrices for parameter inference and pre...Application of parallel hierarchical matrices for parameter inference and pre...
Application of parallel hierarchical matrices for parameter inference and pre...Alexander Litvinenko
 
Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...David Gleich
 
Mimo system-order-reduction-using-real-coded-genetic-algorithm
Mimo system-order-reduction-using-real-coded-genetic-algorithmMimo system-order-reduction-using-real-coded-genetic-algorithm
Mimo system-order-reduction-using-real-coded-genetic-algorithmCemal Ardil
 
Review : Inter-slice Context Residual Learning for 3D Medical Image Segmentation
Review : Inter-slice Context Residual Learning for 3D Medical Image SegmentationReview : Inter-slice Context Residual Learning for 3D Medical Image Segmentation
Review : Inter-slice Context Residual Learning for 3D Medical Image SegmentationDongmin Choi
 
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...Chiheb Ben Hammouda
 
NIPS2007: structured prediction
NIPS2007: structured predictionNIPS2007: structured prediction
NIPS2007: structured predictionzukun
 
Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Alexander Litvinenko
 
A posteriori error estimation in an adaptive multidimensional parameterizatio...
A posteriori error estimation in an adaptive multidimensional parameterizatio...A posteriori error estimation in an adaptive multidimensional parameterizatio...
A posteriori error estimation in an adaptive multidimensional parameterizatio...Mokhtar SELLAMI
 
The best sextic approximation of hyperbola with order twelve
The best sextic approximation of hyperbola with order twelveThe best sextic approximation of hyperbola with order twelve
The best sextic approximation of hyperbola with order twelveIJECEIAES
 
Vertex Culling illustration at SBR07
Vertex Culling illustration at SBR07Vertex Culling illustration at SBR07
Vertex Culling illustration at SBR07Syoyo Fujita
 
20100515 bioinformatics kapushesky_lecture07
20100515 bioinformatics kapushesky_lecture0720100515 bioinformatics kapushesky_lecture07
20100515 bioinformatics kapushesky_lecture07Computer Science Club
 
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...Atsushi Nitanda
 

Similar to Conjugate Gradient for Normal Equations and Preconditioning (20)

Smoothed Particle Galerkin Method Formulation.pdf
Smoothed Particle Galerkin Method Formulation.pdfSmoothed Particle Galerkin Method Formulation.pdf
Smoothed Particle Galerkin Method Formulation.pdf
 
Optimization of positive linear systems via geometric programming
Optimization of positive linear systems via geometric programmingOptimization of positive linear systems via geometric programming
Optimization of positive linear systems via geometric programming
 
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
Do not Match, Inherit: Fitness Surrogates for Genetics-Based Machine Learning...
 
Efficient Computation of Regret-ratio Minimizing Set: A Compact Maxima Repres...
Efficient Computation ofRegret-ratio Minimizing Set:A Compact Maxima Repres...Efficient Computation ofRegret-ratio Minimizing Set:A Compact Maxima Repres...
Efficient Computation of Regret-ratio Minimizing Set: A Compact Maxima Repres...
 
Numerical limit analysis method
Numerical limit analysis methodNumerical limit analysis method
Numerical limit analysis method
 
Clustering coefficients for correlation networks
Clustering coefficients for correlation networksClustering coefficients for correlation networks
Clustering coefficients for correlation networks
 
Application of parallel hierarchical matrices for parameter inference and pre...
Application of parallel hierarchical matrices for parameter inference and pre...Application of parallel hierarchical matrices for parameter inference and pre...
Application of parallel hierarchical matrices for parameter inference and pre...
 
Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...
 
Statistics Assignment Help
Statistics Assignment HelpStatistics Assignment Help
Statistics Assignment Help
 
Mimo system-order-reduction-using-real-coded-genetic-algorithm
Mimo system-order-reduction-using-real-coded-genetic-algorithmMimo system-order-reduction-using-real-coded-genetic-algorithm
Mimo system-order-reduction-using-real-coded-genetic-algorithm
 
Review : Inter-slice Context Residual Learning for 3D Medical Image Segmentation
Review : Inter-slice Context Residual Learning for 3D Medical Image SegmentationReview : Inter-slice Context Residual Learning for 3D Medical Image Segmentation
Review : Inter-slice Context Residual Learning for 3D Medical Image Segmentation
 
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
 
NIPS2007: structured prediction
NIPS2007: structured predictionNIPS2007: structured prediction
NIPS2007: structured prediction
 
Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...Identification of unknown parameters and prediction with hierarchical matrice...
Identification of unknown parameters and prediction with hierarchical matrice...
 
A posteriori error estimation in an adaptive multidimensional parameterizatio...
A posteriori error estimation in an adaptive multidimensional parameterizatio...A posteriori error estimation in an adaptive multidimensional parameterizatio...
A posteriori error estimation in an adaptive multidimensional parameterizatio...
 
The best sextic approximation of hyperbola with order twelve
The best sextic approximation of hyperbola with order twelveThe best sextic approximation of hyperbola with order twelve
The best sextic approximation of hyperbola with order twelve
 
Vertex Culling illustration at SBR07
Vertex Culling illustration at SBR07Vertex Culling illustration at SBR07
Vertex Culling illustration at SBR07
 
Presentation
PresentationPresentation
Presentation
 
20100515 bioinformatics kapushesky_lecture07
20100515 bioinformatics kapushesky_lecture0720100515 bioinformatics kapushesky_lecture07
20100515 bioinformatics kapushesky_lecture07
 
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
Stochastic Gradient Descent with Exponential Convergence Rates of Expected Cl...
 

More from Fahad B. Mostafa

Multiple linear regression for energy efficacy of residential buildings
Multiple linear regression for energy efficacy of residential buildingsMultiple linear regression for energy efficacy of residential buildings
Multiple linear regression for energy efficacy of residential buildingsFahad B. Mostafa
 
Statistical multivariate analysis to infer the presence breast cancer
Statistical  multivariate analysis to infer the presence breast cancerStatistical  multivariate analysis to infer the presence breast cancer
Statistical multivariate analysis to infer the presence breast cancerFahad B. Mostafa
 
Runge kurta method of order Four and Six
Runge kurta method of order Four and SixRunge kurta method of order Four and Six
Runge kurta method of order Four and SixFahad B. Mostafa
 
Runge Kurta method of order Four and Six
Runge Kurta method of order Four and SixRunge Kurta method of order Four and Six
Runge Kurta method of order Four and SixFahad B. Mostafa
 
Fluid Flow on Vertical Surface
Fluid Flow on Vertical SurfaceFluid Flow on Vertical Surface
Fluid Flow on Vertical SurfaceFahad B. Mostafa
 

More from Fahad B. Mostafa (6)

Multiple linear regression for energy efficacy of residential buildings
Multiple linear regression for energy efficacy of residential buildingsMultiple linear regression for energy efficacy of residential buildings
Multiple linear regression for energy efficacy of residential buildings
 
Statistical multivariate analysis to infer the presence breast cancer
Statistical  multivariate analysis to infer the presence breast cancerStatistical  multivariate analysis to infer the presence breast cancer
Statistical multivariate analysis to infer the presence breast cancer
 
Runge kurta method of order Four and Six
Runge kurta method of order Four and SixRunge kurta method of order Four and Six
Runge kurta method of order Four and Six
 
Runge Kurta method of order Four and Six
Runge Kurta method of order Four and SixRunge Kurta method of order Four and Six
Runge Kurta method of order Four and Six
 
Fluid Flow on Vertical Surface
Fluid Flow on Vertical SurfaceFluid Flow on Vertical Surface
Fluid Flow on Vertical Surface
 
Fourier transforms
Fourier transforms Fourier transforms
Fourier transforms
 

Recently uploaded

Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 

Recently uploaded (20)

Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 

Conjugate Gradient for Normal Equations and Preconditioning

  • 1. FAHAD BIN MOSTAFA TEXAS TECH UNIVERSITY DECEMBER 09, 2020 DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 1 Texas Tech University Conjugate Gradient for Normal Equations and Preconditioning
  • 2. Outlines Ø Linear Systems and its least square problem Ø Arnoldi’s iteration, GMRES Method, and its Convergence Ø Preconditioned Conjugate Gradient with Normal Equations Ø Block Conjugate Gradient algorithms for least squares problems DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 2
  • 3. Linear Systems & Sparse Matrix DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 3 A X b Data Source: Harwell-Boeing test matrix “A", a matrix describing connections in a model of a diffraction column in a chemical plant which is not SPD [1] ; Dimension of data set: 479 by 479
  • 4. Matrix Statistics (479 x 479, 1910 entries) DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 4
  • 5. Least square Problem DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 5 • min 𝑟& ' ' = 𝑏 − 𝐴𝑥& ' ' ; • let’s take 𝐴-×/ and 𝑥𝜖𝑅/ . Let’s take the initial guess 𝑥2 = 0 and the residual will be 𝑟2 = 𝑏; • relative residual error 𝑅𝑅𝑉 = 56789 5 • LS stopped at iteration 20 without converging to the desired tolerance 1e-06 because the maximum number of iterations was reached. • The iterate returned (number 20) has relative residual 0.0017. • Elapsed time is 1.922524 seconds.
  • 6. Arnoldi’s iteration and GMRES DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 6 • The order n Krylov subspace of 𝐴 generated by 𝑏 is, 𝐾& 𝐴, 𝑏 = 𝑠𝑝𝑎𝑛 𝑟2, 𝐴𝑏, 𝐴' 𝑏, … , 𝐴&6A 𝑏 for 𝑛 = 1,2, … If the vectors 𝑏, 𝐴𝑏, 𝐴' 𝑏, … , 𝐴&6A 𝑏 are linearly independent, then they are the basis for 𝐾& 𝐴, 𝑏 . Although, lim &↑I 𝐴& 𝑏 → 𝑑𝑜𝑚𝑖𝑛𝑎𝑛𝑡 𝑒𝑖𝑔𝑒𝑛𝑣𝑒𝑐𝑡𝑜𝑟 𝑜𝑓 𝐴, which fills the basis with many almost parallel vectors. • Finally 𝑏 𝑒A − 𝐻Y& 𝑧 ' ' → 𝑚𝑖𝑛. • 𝑟& ' ' = 𝑏 − 𝐴𝑥& ' ' = 𝑟2 − 𝐴𝑄& 𝑧 ' ' → 𝑚𝑖𝑛. 0 10 20 30 40 50 60 70 80 90 100 Iteration number 10-8 10 -7 10 -6 10 -5 10 -4 10 -3 10 -2 Relativeresidual No preconditioner GMRES ILU preconditioner GMRES Tolerance • Solve the preconditioned system M−1A x=b by specifying L and U as inputs to GMRES. • Elapsed time is 0.253678 seconds
  • 7. Convergence of GMRES DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 7 While the GMRES convergence is a little tricky to know in advance, the theorem above tells us some situations when we expect rapid convergence of GMRES 1. The eigenvalues of 𝐴 are far from the origin, 2. The eigenvector matrix of 𝐴 is well-conditioned, and 3. The eigenvalues of 𝐴 are clustered. Fast Convergence Fact Check
  • 8. Proof DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 8
  • 9. Conjugate Gradient for Normal Equations DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 9 Conjugate Gradient for Normal Equations: 𝐴] 𝐴𝑥 = 𝐴] 𝑏 For our moto here, it is useful to recast this problem as an equivalent optimization problem max 8 𝑓 𝑥 = 1 2 𝑥] 𝐴𝑥 − 𝑏] 𝑥 + 𝑐 (5) Note that ∇𝑓 𝑥 = 𝐴𝑥 − 𝑏, so the minimizing function 𝑓(𝑥) is the same as solving 0 = ∇𝑓 𝑥 = 𝐴𝑥 − 𝑏 (6)
  • 10. Algorithm DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 10 Algorithm for PCG: Take 𝑥2=0, 𝑟2 = 0 Solve 𝑀 𝑟2f = 𝑟2 for 𝑟2f Consider 𝑃2 = 𝑟2f for 𝑛 = 1,2,3, … 𝛼& = 𝑟&6A ] 𝑟&6Aj/𝑃&6A ] 𝐴𝑃&6A; 𝑥& = 𝑥&6A + 𝛼& 𝑃&6A; # Approximate solution 𝑟& = 𝑟&6A − 𝛼& 𝐴𝑃&6A; # Update the residual Solve 𝑀 𝑟&f = 𝑟&for 𝑟&f 𝛽& = 𝑟& ] 𝑟&f/𝑟&6A ] 𝑟&6Aj; # Gradient correction factor 𝑃& = 𝑟&f + 𝛽& 𝑃&6A; # New search Direction PCG converged at iteration 52 to a solution with relative residual 9.1e-08.
  • 11. CG with Normal Equation DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 11 𝐴] 𝐴𝑥 = 𝐴] 𝑏
  • 12. Preconditioning technique DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 12 An standard way to choose preconditioner 𝑀, such a way 𝐴m = 𝑀6A 𝐴 which will be better clustered eigenvalues for the GMRES method. 𝑀6A 𝐴] 𝐴𝑥 = 𝑀6A 𝐴] 𝑏 ; 𝐴m 𝑥o = 𝑏 p (9) Which converge faster. The number of iterations required for the conjugate gradient algorithm to converge is proportional to 𝜅 𝐴 . So, we want something like 𝜅 𝐴m ≪ 𝜅 𝐴 . In order to ensure symmetry and positive definiteness of 𝐴m we check 𝑀6A = 𝐿𝐿] . So the new residual is 𝑟&v = 𝑏w − 𝐴m 𝑥&x = 𝐿] 𝐴] 𝑏 − 𝐿] 𝐴] 𝐴𝑥& = 𝐿] 𝑟& Then we have 𝑃& y = 𝐿6A 𝑃& ; 𝑟&f = 𝑀6A 𝑟&
  • 13. Algorithm PCGNE DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 13 Take 𝑥2=0, 𝑟2 = 0 Solve 𝑀 𝑟2f = 𝑟2 for 𝑟2f Consider 𝑃2 = 𝑟2f for 𝑛 = 1,2,3, … 𝛼& = 𝑟&6A ] 𝑟&6Aj/𝐴] 𝑃&6A ] 𝐴𝑃&6A; 𝑥& = 𝑥&6A + 𝛼& 𝑃&6A; # Approximate solution 𝑟& = 𝑟&6A − 𝛼& 𝐴] 𝐴𝑃&6A; # Update the residual Solve 𝑀 𝑟&f = 𝑟&for 𝑟&f 𝛽& = 𝑟& ] 𝑟&f/𝑟&6A ] 𝑟&6Aj; # Gradient correction factor 𝑃& = 𝑟&f + 𝛽& 𝑃&6A; # New search Direction
  • 14. PCGNE DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 14
  • 15. Block Conjugate Gradient algorithms for least squares problems DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 15 • Conjugate Gradient Least Squares (CGLS) algorithm in block forms, so-called Block Conjugate Gradient Least Squares (BCGLS) by Ji, H., & Li, Y. (2017). • BCGLS considers a linear system in block form with s right hand sides in the block matrix 𝐵. i.e. 𝐴𝑥 = 𝐵 • BCGLS constructs Krylov subspace in block form 𝐾& 𝐴, 𝑏 = 𝑠𝑝𝑎𝑛 𝐴] 𝑟2, 𝐴] 𝐴𝑏, (𝐴] 𝐴)' 𝑏, … , (𝐴] 𝐴)&6A 𝑏
  • 16. Algorithm DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 16
  • 17. Results DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 17 Colormap of 𝐴 𝑇 𝐴 -orthogonality between Search Matrices in the first 31 iterations (left), condition number of 𝑄𝑖 𝑇 𝑄𝑖 (right up), and maximum and i minimum relative residual norms of columns in Xi (right lower) for a block linear system with 100 right hand sides using ‘‘gre_1107’’ as the coefficient matrix along BCGLS iterations. [5]
  • 18. References DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 18 • https://math.nist.gov/MatrixMarket/collections/hb.html • Y. Saad and M. H. Schultz, GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems, SIAM J. Sci. Statist. Comput., 7 (1986), pp. 856–869. • D. C. Sorensen, Implicit application of polynomial filters in a k-step Arnoldi method, SIAM • J. MatrixAnal. Appl., 13 (1992), pp. 357–385. • W. A. Joubert, On the convergence behavior of the restarted GMRES algorithm for solving nonsymmetric linear systems, Numer. Linear Algebra Appl., 1 (1994), pp. 427–447. • Ji, H., & Li, Y. (2017). Block conjugate gradient algorithms for least squares problems. Journal of Computational and Applied Mathematics, 317, 203-217.
  • 19. DEPARTMENT OF MATHEMATICS AND STATISTICS, TEXAS TECH UNIVERSITY 19