[SciPy-User] Vectorizing scipy.optimize.curve_fit
Mon Feb 4 18:54:34 CST 2013
On Mon, Feb 4, 2013 at 7:26 PM, Paul Hobson <email@example.com> wrote:
> On Sun, Feb 3, 2013 at 9:16 PM, <firstname.lastname@example.org> wrote:
>> On Mon, Feb 4, 2013 at 12:13 AM, Paul Hobson <email@example.com> wrote:
>> > Thanks for the advice. Currently working with linear fits, but I'm
>> > hoping to
>> > expand this work to be more general. I'll be sure to keep these things
>> > in
>> > mind.
>> If you work with linear fits, why do you use curve_fit/leastsq instead
>> of linalg?
> First reason: I didn't know any better :)
> Second reason: I'm pretty certain that non-linear data will be coming my way
> soon, so I'm trying to plan ahead.
The speed difference between linear and nonlinear models is huge. So,
unless you have only very rare cases for linear fit, I would split the
code. You could still share almost all the code, just use two
different fit methods/functions in the bootstrap loop.
> SciPy-User mailing list
More information about the SciPy-User