[SciPy-Dev] curve_fit() should require initial values for parameters
Robert Kern
robert.kern at gmail.com
Wed Jan 30 15:24:05 EST 2019
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20190130/55de8a66/attachment.html>
More information about the SciPy-Dev
mailing list