473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

error estimation in a non-linear least squares fitting

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 question: in my search for
a good algorithm, I was not able to find any non-linear least squares
fitting routine which in the end doesn't only give me the parameters
which I asked for, but also the estimated errors on these parameters.
Is there anyone who can help me getting these errors?

Thanks in advance,
Evelien
Oct 15 '08 #1
4 5186
Evelien wrote:
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 question: in my search for
a good algorithm, I was not able to find any non-linear least squares
fitting routine which in the end doesn't only give me the parameters
which I asked for, but also the estimated errors on these parameters.
Is there anyone who can help me getting these errors?
In scipy SVN, scipy.optimize.leastsq() will also return a covariance matrix of
the estimate if using full_output=True.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Oct 15 '08 #2
Thanks Robert for your reply. I must say I am kind of disappointed if
that is the only solution. I thought that such a standard problem as
least squares fitting, would always give you an estimation of the
error bars, without having to look up how you can convert a covariance
matrix into error bars...

But thanks anyway.
Evelien
Oct 22 '08 #3
Evelien wrote:
Thanks Robert for your reply. I must say I am kind of disappointed if
that is the only solution. I thought that such a standard problem as
least squares fitting, would always give you an estimation of the
error bars, without having to look up how you can convert a covariance
matrix into error bars...
If you want an all-singing, all-dancing statistics-oriented nonlinear
least-squares interface, you can use scipy.odr. The numerical algorithm in
leastsq() outputs a covariance matrix naturally. Interpreting that to give you
statistical error bars requires some care and judgment. scipy.optimize is not a
statistical package.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Oct 22 '08 #4
Ok, then I have to look into scipy.odr to see how it can help me move
forward. Thanks Robert!
Evelien
Oct 29 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Thomas Newman | last post by:
Hi all, I have added a few files to my project in eric3. When I want to open the tree that (supposedly) shows me the classes, I get an error: ...
0
by: Sahatra Kumara | last post by:
I have the schema that was written by other people. This schema seems to be wrong. Altova XML SPY 2005 and .Net have found out the block of schema definition that contains error, namely...
7
by: Georg J. Stach | last post by:
Hi, as mentioned above I'd like to validate a simple XML-document with a simple DTD. For this, I use Java and Xerces. But, when I have tags of this form: <tag>some characters in here</tag> ...
4
by: Oenone | last post by:
I'm continuing work on getting my VB6 plug-ins to work within my VB.NET application and am making reasonable progress. I've just experienced an error that has me a bit worried though. Many of...
2
by: Charles Wilt | last post by:
I have a IBM iSeries (aka AS-400) running v5r3 of OS/400 that I access via a linked server from SQL Server 2000. The following select works fine: select * from...
4
by: Rollasoc | last post by:
Hi, We have a range of four products that can talk to our software (Written in C# & managed C++) via ethernet. Using standard socket class. This has all been working fine for a long time now,...
5
by: contactmayankjain | last post by:
Can you explain what a non-virtual thunk is? I have been getting this error when trying to link libraries that I have built with optimization. -- Regards Mayank Jain
1
by: chris fellows | last post by:
I have a C# webservice with a web method that accepts a string parameter that contains encrypted data. For some parameter values with non-alphanumeric values then the web method fails with an HTTP...
12
by: puzzlecracker | last post by:
is it even possible or/and there is a better alternative to accept input in a nonblocking manner?
4
by: Jim Rockett | last post by:
Subject: what caused a Non-numeric error in the C ++ formula below? the curveGR is name of a column of numbers > if( (curveGR+ 0.5) >= (int(curveGR) + 1) ) > cout << curveGR << " rounds to " <<...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.