Hi Josef, On Thu, 24 Jan 2019 11:26:09 -0500, josef.pktd@gmail.com wrote:
I think making initial values compulsory is too much of a break with tradition. IMO, a warning and better documentation would be more appropriate. https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fi... does not show an example with starting values. curve_fit could issue a warning if p0 is not specified, or warn if convergence fails and p0 was not specified.
Isn't the greater danger that convergence succeeds, with p0 unspecified, and the resulting model not being at all what the user had in mind?
I think it should also be possible to improve the default starting values, e.g. if the function fails or if bounds are provided.
This is the type of magic I hope we can avoid. Having different execution paths based on some vaguely defined notion of perceived failure seems dangerous at best.
I'm not a user of curve_fit, but I guess there might be a strong selection bias in use cases when helping out users that run into problems.
I agree; and I think this can be accomplished by better documentation, helpful warnings, and assisting the user in choosing correct parameters. Best regards, Stéfan