[SciPy-User] curve_fit error: Optional parameters not found...
josef.pktd at gmail.com
josef.pktd at gmail.com
Wed Jun 9 01:02:41 EDT 2010
On Wed, Jun 9, 2010 at 12:34 AM, Travis Oliphant <oliphant at enthought.com> wrote:
>
> On Jun 8, 2010, at 11:36 AM, Jeremy Conlin wrote:
>
>> I downloaded scipy 0.8b1 yesterday; I was excited to try out the new
>> curve_fit function. Today I have been playing with it and some of the
>> time it works. Other times I get the error:
>>
>> RuntimeError: Optimal parameters not found: Both actual and predicted
>> relative reductions in the sum of squares
>> are at most 0.000000 and the relative error between two consecutive
>> iterates is at
>> most 0.000000
>
> At the core of this routine is a nonlinear least-squares optimization. Optimization algorithms can fail to converge. It looks like that is happening here. You can try providing weights to your data-points or adjusting the function that is being fit.
>
> The "fix" could be to improve the error reporting and handling, but there are always going to be cases where the algorithm won't be able to find an optimum.
Travis,
do you have an opinion about
http://projects.scipy.org/scipy/ticket/984 (and associated
http://projects.scipy.org/scipy/ticket/1111 ) ?
In some cases, raising an exception for ier>1 looks to strict.
Josef
>
> -Travis
>
> _______________________________________________
> 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