Problems with LDL factorization
6 views (last 30 days)
Show older comments
Hello,
I have a very large scale, overdetermined linear system (10^7 variables), arising from the discretization of a time-dependent PDE. I need to compute least squares estimate (A'*Ax = A'b) several times with a different right hand side b. To do this on modest scale problem (10^4 to 10^5) I factorize the LDL decomosition of A'A and then the solution is fast enough. I do not use Cholesky to avoid potential rounding errors. However, when the dimensions increase, LDL does not prouduce accurate decomposition (even with threshold set to 0.5). The system is increasingly ill-conditioned, so this may be the source of the problem. Do you have any suggestions?
Best, Srdan
0 Comments
Answers (2)
John D'Errico
on 7 Jun 2014
Yes, BUT if the problem is ill-conditioned, then computing A'*A is crazy, since that will make it significantly more so. If it cannot succeed because of the ill-conditioning, what does it matter if it is faster?
I would suggest trying an iterative scheme. Perhaps a version of PCCGLS (preconditioned conjugate gradient least squares) There are codes for it in MATLAB. This algorithm does not force you to form A'*A, although you will probably need a preconditioner.
Bill Greene
on 7 Jun 2014
Have you tried solving the over-determined system directly:
x = A\b;
Computing using the normal equations, A'*A, is almost certainly making your problem more ill-conditioned.
Bill
3 Comments
Bill Greene
on 7 Jun 2014
I am very surprised to hear that. I would expect that mldivide is doing a sparse qr factorization for this problem and I would expect that to be faster than an ldl composition of A'*A. You can see what mldivide is doing by putting this statement before the call:
spparms('spumoni',1);
The next experiment I would suggest is to call qr directly to solve your problem. The reason I first suggested mldivide is that it takes only one line and I thought the performance would be essentially the same as calling sparse qr and then doing a back solution with R. The qr doc page has an example of this:
Bill
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!