[SciPy-User] Sigmoid Curve Fitting

Sturla Molden sturla@molden...
Tue Sep 21 14:29:28 CDT 2010

> Hi,
> Does Scipy contain the ability to fit a sigmoid curve to a set of data
> points?
> I found some Numpy code
> (http://pingswept.org/2009/01/24/least-squares-polynomial-fitting-in-python/)
> for fitting curves using the least squares method, but it only seems
> to fit parabolas to my sigmoid data.

scipy.optimize.leastsq can fit any non-linear regression curve using
Levenberg-Marquardt. You will have to supply a function that computes the
residuals, and optionally a function that returns their Jacobian unless
you want it estimated.


More information about the SciPy-User mailing list