Live data from Hacker News

Introduction to the Conjugate Gradient Method Without Agonizing Pain (1994) [pdf]

cs.cmu.edu

1–10 of 16 posts

Re: Introduction to the Conjugate Gradient Method Without Agonizing Pain (1994) [pdf]

#4
I remember being handed this back when I was taking numerical analysis for the first time. It's an old document, but still useful.

IMO the critical pieces of CG that make it a favorable choice for many problems in scientific computing are

1) the fact that it can be performed matrix free

2) its rapid convergence behavior on operators with clusters of eigenvalues (useful for low rank structures)

Thet being said, practically speaking, even if I know my operator is positive semi definite, I often find minres out performing cg. There's a nice paper comparing that, "CG versus MINRES: An Empirical Comparison".

Re: Introduction to the Conjugate Gradient Method Without Agonizing Pain (1994) [pdf]

#5
Shewchuk’s work on mesh generation is nothing short of a masterpiece. I will always direct people to the source of his Triangle code as an example of what good, literate C code should look like. His Berkeley page is here: https://people.eecs.berkeley.edu/~jrs/

Re: Introduction to the Conjugate Gradient Method Without Agonizing Pain (1994) [pdf]

#6
post #4

I remember being handed this back when I was taking numerical analysis for the first time. It's an old document, but still useful. IMO the critical pieces of CG that make it a favorable choice for many problems in scientific computing are 1) the fact that it can be performed matrix free 2) its rapid convergence behavior on operators with clusters of eigenvalues (useful for low rank structures) Thet being said, practi…

"minres outperforming cg" likely depends on the stopping criterion, since different norms are used.

Re: Introduction to the Conjugate Gradient Method Without Agonizing Pain (1994) [pdf]

#7
post #6
post #4

I remember being handed this back when I was taking numerical analysis for the first time. It's an old document, but still useful. IMO the critical pieces of CG that make it a favorable choice for many problems in scientific computing are 1) the fact that it can be performed matrix free 2) its rapid convergence behavior on operators with clusters of eigenvalues (useful for low rank structures) Thet being said, practi…

"minres outperforming cg" likely depends on the stopping criterion, since different norms are used.

Yes, to (grossly) summarize the conclusion of the paper: minres can outperform CG on the backwards error ||r_k|| / ||x_k|| whereas CG can outperform minres on the absolute error ||x^* - x_k|| and the energy norm ||x^* - x_k||_A.

Re: Introduction to the Conjugate Gradient Method Without Agonizing Pain (1994) [pdf]

#10
post #9

Important to note that this method only works on Hermitian (usually AKA symmetric) and positive-definite matrices, both of which are often pretty big qualifiers.

Did positive definite not imply Hermitian? I feel like I'm forgetting my linear algebra.

Edit: Yup, Wikipedia agrees "this condition implies that M is Hermitian"; see their counterexample with a complex vector: https://en.wikipedia.org/wiki/Definite_matrix#Consistency_be...

Note: Crucially, this is specific to the field of complex numbers (hence the discussion of Hermitian vs. just symmetry). For the field of real numbers, PSD does not imply symmetry, though that's commonly assumed for convenience.

Post reply on HN