![](https://secure.gravatar.com/avatar/09764ad794a843b7c030ae5ace320f18.jpg?s=120&d=mm&r=g)
Hi all, I'm trying scipy.optimize.leastsq routine and I get the following warning message as output:
In [100]: lstSquareEstimate Out[100]: (0.029000567127575108, 'Both actual and predicted relative reductions in the sum of squares\n are at most 0.000000')
The message doesn't seem too much explicative (at least to me), and even after looking at scipy and MINPACK source codes, I've not got any further insight. Could someone try to explain what was going wrong here? Thanks in advance, Andrea.
![](https://secure.gravatar.com/avatar/4ebd883c704507c64eaebce2e0d9f627.jpg?s=120&d=mm&r=g)
Hi Well it looks as if the algorithm met one of its termination criterias ('ftol', at least mpfit (see earlier posts for mpfit) gives exactly the same message). Maybe you should post your code part which calls leastsq. Cheers, Steve Andrea Riciputi wrote:
Hi all, I'm trying scipy.optimize.leastsq routine and I get the following warning message as output:
In [100]: lstSquareEstimate Out[100]: (0.029000567127575108, 'Both actual and predicted relative reductions in the sum of squares\n are at most 0.000000')
The message doesn't seem too much explicative (at least to me), and even after looking at scipy and MINPACK source codes, I've not got any further insight. Could someone try to explain what was going wrong here?
Thanks in advance, Andrea.
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/09764ad794a843b7c030ae5ace320f18.jpg?s=120&d=mm&r=g)
I see, but what I can't understand is the meaning of the error message. By the way, if I try the example given at page 16 of "SciPy Tutorial" (by Travis), I get the same error message. Any other hint? TIA, Andrea. On 5 Apr 2005, at 15:58, steve schmerler wrote:
Hi
Well it looks as if the algorithm met one of its termination criterias ('ftol', at least mpfit (see earlier posts for mpfit) gives exactly the same message).
Maybe you should post your code part which calls leastsq.
Cheers, Steve
![](https://secure.gravatar.com/avatar/4ebd883c704507c64eaebce2e0d9f627.jpg?s=120&d=mm&r=g)
Hi What do you mean? It is rather a status message telling you why termination occured. If I try Travis's example I also get In [10]: reload mytest -------> reload(mytest) (array([-10.33422249, 32.88295995, 3.7880052 ]), 'Both actual and predicted relative reductions in the sum of squares\n are at most 0.000000') My default values are: leastsq(func, x0, args=(), Dfun=None, full_output=0, col_deriv=0, ftol=1.49012e-008, xtol=1.49012e-008, gtol=0.0, maxfev=0, epsfcn=0.0, factor=100, diag=None) The 0.0000 is in fact 'ftol' = 1.49012e-008 (in my opinion). Cheers, Steve Andrea Riciputi wrote:
I see, but what I can't understand is the meaning of the error message. By the way, if I try the example given at page 16 of "SciPy Tutorial" (by Travis), I get the same error message.
Any other hint?
TIA, Andrea.
On 5 Apr 2005, at 15:58, steve schmerler wrote:
Hi
Well it looks as if the algorithm met one of its termination criterias ('ftol', at least mpfit (see earlier posts for mpfit) gives exactly the same message).
Maybe you should post your code part which calls leastsq.
Cheers, Steve
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/09764ad794a843b7c030ae5ace320f18.jpg?s=120&d=mm&r=g)
Sorry, I had misunderstod MINPACK documentation, and I thought that the message stated a failure. If I get the point the message says that the routine has stopped because it has found the minimum of the residual function. Isn't it? Thanks, Andrea. On 5 Apr 2005, at 17:25, steve schmerler wrote:
Hi
What do you mean? It is rather a status message telling you why termination occured.
![](https://secure.gravatar.com/avatar/4ebd883c704507c64eaebce2e0d9f627.jpg?s=120&d=mm&r=g)
Andrea Riciputi wrote:
Sorry, I had misunderstod MINPACK documentation, and I thought that the message stated a failure.
If I get the point the message says that the routine has stopped because it has found the minimum of the residual function. Isn't it?
Exactly. At least a local one :) depending on the starting guess x0. Cheers, Steve
Thanks, Andrea.
On 5 Apr 2005, at 17:25, steve schmerler wrote:
Hi
What do you mean? It is rather a status message telling you why termination occured.
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/f4538f8f6440429984a3d3fbb1f32a42.jpg?s=120&d=mm&r=g)
On Apr 5, 2005, at 3:32 AM, Andrea Riciputi wrote:
Hi all, I'm trying scipy.optimize.leastsq routine and I get the following warning message as output:
In [100]: lstSquareEstimate Out[100]: (0.029000567127575108, 'Both actual and predicted relative reductions in the sum of squares\n are at most 0.000000')
The message doesn't seem too much explicative (at least to me), and even after looking at scipy and MINPACK source codes, I've not got any further insight. Could someone try to explain what was going wrong here?
Thanks in advance, Andrea.
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
Andrea, As Steve explained, this message means that the algorithm terminated normally. The documentation you are missing is here <http://www.mcs.anl.gov/~more/ANL8074a.pdf> (see page 22). -John
participants (3)
-
Andrea Riciputi
-
John Gleeson
-
steve schmerler