[SciPy-User] leastsq - output integer flag
josef.pktd at gmail.com
josef.pktd at gmail.com
Mon Jun 27 13:39:25 EDT 2011
On Mon, Jun 27, 2011 at 1:06 PM, Skipper Seabold <jsseabold at gmail.com> wrote:
> On Mon, Jun 27, 2011 at 6:34 AM, Johannes Radinger
> <johradinger at googlemail.com> wrote:
>>
>> Hello,
>>
>> i am using leastsq to optimize a function. Beside the fitted output
>> variables also an integer flag
>> (number 1-4) is returned.
>> What do the numbers acutally mean?
>>
>
> If you give full_output = 1, I believe there will be message along
> with the optimization flag.
I don't remember if it's anywhere in the official docs, but the
(minpack) source has the full descriptions of the return codes, 1 is
successful completion of the optimization,... the highest return codes
mean it was not successful in finding an optimum.
Looking at the source of scipy.optimize.curve_fit shows what is
available as output of leastsq and how to use it.
Josef
>
>> Is there any simple possiblity to get a measure for the accuracy of
>> the fit/optimization, like the residuals etc.?
>>
>
> If you're interested in more goodness of fit statistics, etc. You
> might want to check out statsmodels.
>
> http://pypi.python.org/pypi/scikits.statsmodels
> http://statsmodels.sourceforge.net/
>
> (I'm about to update those docs)
>
> Skipper
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
More information about the SciPy-User
mailing list