[SciPy-Dev] curve_fit() should require initial values for parameters

Ilhan Polat ilhanpolat at gmail.com
Wed Jan 30 15:39:11 EST 2019


For SO questions, 1st one agreed, 2nd one look at the given values. 3rd one
have a look at the first line and also the comments. That's actually a
counter argument.

> That is certainly not the case. It is impossible to do so generally for
every arbitrary nonconvex problem, which is why we can't automate it, but
there are tons of problems where one has a reasonable idea from priors,
examining the plotted data, or heuristic algorithms (e.g. finding the peak
location and amplitude with a peak finder).

Yes exactly my point. If you have a better idea put it in. p0 is not going
to reject your guess but insist on 1.s. But I can give you easily tons of
problems you can not give a proper guess. That is simply impossible because
that defeats the purpose of why we use this tool.





On Wed, Jan 30, 2019 at 9:25 PM Robert Kern <robert.kern at gmail.com> wrote:

> On Wed, Jan 30, 2019 at 10:48 AM Ilhan Polat <ilhanpolat at gmail.com> wrote:
>
>> I am a frequent user of this function. I am also occasionally teaching
>> control theory and I use this also professionally, I provided a proper use
>> case as a "user". You already admitted that you don't use it. So excuse me
>> when I say that I have more experience than you about this function API
>> (please read this twice; function API not the underlying theory). How can I
>> even provide evidence on this completely subjective matter? Here is all the
>> issues related to curve_fit
>>
>> https://github.com/scipy/scipy/search?q=curve_fit&type=Issues
>>
>> As far as I know there was no complaint so far.
>>
>
> StackOverflow is likely a better place to look for evidence:
>
>
> https://stackoverflow.com/questions/27097957/my-use-of-scipy-curve-fit-does-not-seem-to-work-well
>
> https://stackoverflow.com/questions/23828226/scipy-curve-fit-does-not-seem-to-change-the-initial-parameters
>
> https://stackoverflow.com/questions/53509550/error-in-scipy-curve-fit-for-more-than-two-parameters
>
>
>> Hence that means it is really not that big of a deal that would grant
>> such tone. I don't know what to add other than what I already provided. You
>> cannot make educated guesses about initial points on nonconvex searches. As
>> you mentioned, we are as blind as np.ones(n) choice.
>>
>
> That is certainly not the case. It is impossible to do so generally for
> every arbitrary nonconvex problem, which is why we can't automate it, but
> there are tons of problems where one has a reasonable idea from priors,
> examining the plotted data, or heuristic algorithms (e.g. finding the peak
> location and amplitude with a peak finder).
>
> --
> Robert Kern
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20190130/88dc43a6/attachment-0001.html>


More information about the SciPy-Dev mailing list