Generalized Linear Least Squares Problems

V

venkat

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.
 
R

Robert Kern

Colin said:
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
(e-mail address removed)

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top