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

josef.pktd at gmail.com josef.pktd at gmail.com
Wed Jan 30 15:37:07 EST 2019


On Wed, Jan 30, 2019 at 3:25 PM Stefan van der Walt <stefanv at berkeley.edu>
wrote:

> On Wed, 30 Jan 2019 14:27:29 -0500, josef.pktd at gmail.com wrote:
> > (I'm strongly in favor of trying "defaults" first, and if that doesn't
> > work, then dig into or debug likely candidates. in loose analogy of test
> > driven development instead of up-front design.)
>
> It seems unlikely that we will reach full agreement in this thread,
> given the differing experiences and philosophies at play.  But, that's
> probably OK if we can all agree to modify the documentation to be clearer
> about the risks of the preset values for p0, how to select better
> values, and how to handle failure modes.
>
> This won't 100% address Matt's concerns, but it will go a long way to
> keeping users out of trouble, without having to make breaking changes to
> the API.
>
> What do you think?
>

I fully agree with that part. I think docstrings and tutorial are the
places to "educate" users.
I pointed out early in this thread, that the current documentation does not
have examples with starting values and does not emphasize their importance.
Also more explicit warnings on failure would be an obvious and not very
intrusive ex-post reminder, IMO.

I'm mainly arguing that forcing users to come up with random or meaningful
starting values up-front is not in the (initial) "spirit" of curve_fit.

Josef



>
> Best regards,
> Stéfan
>
> _______________________________________________
> 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/e6ae9c18/attachment.html>


More information about the SciPy-Dev mailing list