Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Weighted least squares' topicStudent Support Forum > General > Archives > "Weighted least squares"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Tamas Huszak
05/28/12 2:00pm

In Response To 'Re: Weighted least squares'
---------
Hi!

My code works so far without errors until this point. I'm only looking for a simple way to program the wighted LSQ problem.
So far I came up with:
Inverse[Transpose[A].W.A].Transpose[A].W.b
where: W is the weights matrix
but this does not produce a result, because my matrix is badly conditioned, so I tried
PseudoInverse instead of Inverse
but got the problem, that when using a simple IdentityMatrix for W, which is supposed to give the same result as LeastSquares[A,b], but it doesent.
Maybe my math is wrong, or the PseudoInverse cuts off too many values I don't know.
I've attached both the notebook and the data as well.

Thomas

Attachment: WLSQ.zip, URL: ,

Subject (listing for 'Weighted least squares')
Author Date Posted
Weighted least squares Tamas Huszak 05/25/12 04:02am
Re: Weighted least squares yehuda 05/27/12 03:16am
Re: Re: Weighted least squares Tamas Huszak 05/28/12 2:00pm
< Previous CommentHelp | Reply To Comment | Reply To Topic