QR decomposition in mpmath?

63 views
Skip to first unread message

Ken

unread,
Feb 21, 2012, 1:09:14 PM2/21/12
to mpmath
Does mpmath have any built-in routines to calculate QR matrix
decompositions? All I'm able to find is qr_solve but that doesn't
actually calculate Q or R which I need for constrained least squares.
Any suggestions?

Thanks, Ken

Fredrik Johansson

unread,
Feb 24, 2012, 4:43:11 AM2/24/12
to mpm...@googlegroups.com

Hi Ken,

Unfortunately, there's no such function provided currently. It would
be a welcome contribution.

Fredrik

Ken

unread,
Mar 28, 2012, 1:01:58 PM3/28/12
to mpmath
I'm working on a QR function that should be ready soon. How would I
go about submitting it for consideration?

Ken

Fredrik Johansson

unread,
Mar 28, 2012, 1:48:02 PM3/28/12
to mpm...@googlegroups.com
On Wed, Mar 28, 2012 at 19:01, Ken <ken....@sbcglobal.net> wrote:
> I'm working on a QR function that should be ready soon.  How would I
> go about submitting it for consideration?

Great! You can attach a patch to the issue tracker (or send it to this
list), or preferably send a pull request on github
(https://github.com/fredrik-johansson/mpmath).

Fredrik

Ken

unread,
Mar 29, 2012, 12:21:45 AM3/29/12
to mpmath
OK, I attached a file to the issue tracker (sorry, github looked way
too complicated). The algorithm factors A -> Q, R or A -> L, Q
depending on the dimensions of A. The only restriction is m > 1 and n
> 1. The matrix A can have any content (even all zeros). I've tested
it on over 200k random sized matrices (m > n, m = n, m < n) with
random integers and floats, sprinkled with rows and columns of zeros,
duplicate rows and columns, and all zeros. So far no errors. I hope
the algorithm is a useful contribution.
Ken
Reply all
Reply to author
Forward
0 new messages