Re: linalg[leastsqrs] in Maple V R4
- From: "lcw1964" <leslie.wright@xxxxxxxxxxxxx>
- Date: 30 Jul 2006 23:01:02 -0700
That explains a lot.
In my 72 x 9 problem, the 9x9 matrix transpose(u)&*u is not
singular--linalg[rank] returns 9--but it is illconditioned, with the
linalg[cond] returning something of the order of 5.2E11, which is huge.
No wonder why I need to set Digits to much higher than my desired
precision to get consistent results!
For some reason I thought that linalg[leastsqrs] would've used an SVD
algorithm, but from what you tell me I guess not. Press et al. in
Numerical Recipes sec. 5.13 prescribe an SVD approach for the very kind
of least squares problem I am working with. I think I can see why now.
Thanks so much for the feedback.
Les
Robert Israel wrote:
It would be nice to know more about u and bb, but I think this is
what is happening: leastsqrs works by solving the system
(u^T u) x = u^T bb. I suspect that your matrix u^T u is
ill-conditioned (or perhaps singular), which can cause
numerical problems here. Using Svd, as you have done,
should work better.
I thought that the LinearAlgebra routine LeastSquares was more
sophisticated, but an experiment showed that this is not
necessarily the case. On the other hand, in LinearAlgebra
you can use the pseudoinverse (obtained in LinearAlgebra as
MatrixInverse(..., method=pseudo)) and obtain good results.
Robert Israel israel@xxxxxxxxxxx
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
.
- References:
- linalg[leastsqrs] in Maple V R4
- From: lcw1964
- Re: linalg[leastsqrs] in Maple V R4
- From: Robert Israel
- Re: linalg[leastsqrs] in Maple V R4
- From: lcw1964
- Re: linalg[leastsqrs] in Maple V R4
- From: lcw1964
- Re: linalg[leastsqrs] in Maple V R4
- From: Robert Israel
- linalg[leastsqrs] in Maple V R4
- Prev by Date: Re: linalg[leastsqrs] in Maple V R4
- Next by Date: Re: linalg[leastsqrs] in Maple V R4
- Previous by thread: Re: linalg[leastsqrs] in Maple V R4
- Next by thread: Re: linalg[leastsqrs] in Maple V R4
- Index(es):
Relevant Pages
|