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. 3 5475
Colin J. Williams wrote: Tim Leslie wrote:
On 31 May 2005 03:12:49 -0700, venkat <vv********@yah oo.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.ls tsq 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Vamshi |
last post by:
I do have some problems. Can any one help me out?
1.Ordered squares. A 6-digit number STWXYZ is an ordered number if the
diff between first 3 dig, STW and last three XYZ is 1. For example
123124 or 124123 are ordered num. A number is a square if it is equal
to the product of one whole number mul by itself.An ordered square is
both an ordered...
|
by: nikie |
last post by:
I'm a little bit stuck with NumPy here, and neither the docs nor
trial&error seems to lead me anywhere:
I've got a set of data points (x/y-coordinates) and want to fit a
straight line through them, using LMSE linear regression. Simple
enough. I thought instead of looking up the formulas I'd just see if
there isn't a NumPy function that does...
|
by: Ben Voigt [C++ MVP] |
last post by:
I'm trying to construct a compelling example of the need for a language
feature, with full support for generics, to introduce all static members and
nested classes of another type into the current name search scope.
i.e. a very simple application would be
class ManyComputations
{
calling System.Math;
|
by: jacob navia |
last post by:
As many people know, I think that garbage collection is a good
solution for many memory allocation problems.
I am aware however, that nothing is "the silver bullet", not
even the GC.
A recent article in slashdot
http://developers.slashdot.org/article.pl?sid=07/11/17/0552247
proves that.
|
by: navon2 |
last post by:
Hi
I need to find x that will minimize Ax-b=0, under the inequality
constraints Cx<d.
Actually the constraints in my problem are only upper and lower bounds
to x values.
x is 4x1 vector, A is about 100x4 (and b is of course 100x1(.
What is the appropriate algorithm?
Is there any C / C++ code available?
I succeeded solving the...
| |
by: J.SanTanA |
last post by:
Hello All!
Any one know where can I find some php code (or "php-able" code)
implementing least squares method?
Thx in advance and pls excuse my poor eng
|
by: Fett |
last post by:
I am trying to find a wrapper to do linear programming within python.
I am using an ubuntu machine and I have apt-get'd lp_solve, which
works just fine. If someone knows of a wrapper that will work with
that that'd be great.
I also heard that scipy has a wrapper, however, I can't find any
documentation on it, nor can I seem to find it with...
|
by: Evelien |
last post by:
Dear python-users,
I am trying to do a non-linear least squares fitting. Maybe trying is
not the best word, as I already succeeded in that. At the moment I am
using leastSquaresFit from Scientific Python. I know of other least
squares routines, such as the one in scipy.optimize and I believe
there is also one in numpy. Now here is my...
|
by: fordie1000 |
last post by:
Hi,
I have performed a fit to data using scipy's 'leastsq' function. However,
I wanted to be able to weight the fit by individual errors on the data points.
Here is an example of what I'm doing at the moment :
# fitting functions for the data
fitfunc = lambda p,x: p + p*x
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |