472,119 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

Generalized Linear Least Squares Problems

Hi,

I want to solve linear least sqaure problem( min||c-Ax||2 subject to
Bx=d ). How do I do it in python. lapack has a routine for doing this
(DGGLSE). Can I access this from python?

TIA,
venkat.

Jul 19 '05 #1
3 5391
On 31 May 2005 03:12:49 -0700, venkat <vv********@yahoo.com> wrote:
Hi,

I want to solve linear least sqaure problem( min||c-Ax||2 subject to
Bx=d ). How do I do it in python. lapack has a routine for doing this
(DGGLSE). Can I access this from python?

Check out scipy, in particular the linear algebra package.

http://www.scipy.org/documentation/a...py.linalg.html

Cheers,

Tim
TIA,
venkat.

--
http://mail.python.org/mailman/listinfo/python-list

Jul 19 '05 #2
Tim Leslie wrote:
On 31 May 2005 03:12:49 -0700, venkat <vv********@yahoo.com> wrote:
Hi,

I want to solve linear least sqaure problem( min||c-Ax||2 subject to
Bx=d ). How do I do it in python. lapack has a routine for doing this
(DGGLSE). Can I access this from python?
Check out scipy, in particular the linear algebra package.

http://www.scipy.org/documentation/a...py.linalg.html

Cheers,

Tim

Or you could try numarray, available for use with Python 2.4

http://sourceforge.net/project/showf...ease_id=329948

Colin W.
TIA,
venkat.

--
http://mail.python.org/mailman/listinfo/python-list

Jul 19 '05 #3
Colin J. Williams wrote:
Tim Leslie wrote:
On 31 May 2005 03:12:49 -0700, venkat <vv********@yahoo.com> wrote:
Hi,

I want to solve linear least sqaure problem( min||c-Ax||2 subject to
Bx=d ). How do I do it in python. lapack has a routine for doing this
(DGGLSE). Can I access this from python?


Check out scipy, in particular the linear algebra package.

http://www.scipy.org/documentation/a...py.linalg.html

Cheers,

Tim


Or you could try numarray, available for use with Python 2.4


Neither of these solve the generalized least squares problem.

However, it is easier to add to scipy.linalg. Look at the file
scipy/Lib/linalg/generic_flapack.py and copy and modify the block for
DGELSS to work for DGGLSE. Then modify the Python function
scipy.linalg.lstsq to take the optional extra arguments and do the
generalized problem. Finally, contribute your changes back to scipy and
win the accolades you deserve.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Vamshi | last post: by
15 posts views Thread by nikie | last post: by
49 posts views Thread by Ben Voigt [C++ MVP] | last post: by
84 posts views Thread by jacob navia | last post: by
1 post views Thread by J.SanTanA | last post: by
8 posts views Thread by Fett | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.