[SciPy-User] [Matplotlib-users] Sigmoid Curve Fitting

Gökhan Sever gokhansever@gmail....
Mon Sep 20 17:10:49 CDT 2010

On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer <chrisspen@gmail.com> wrote:

> Hi,
> Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
> to a set of data points?
> Regards,
> Chris

I am very curious to know how this is done. I have seen in many Cloud
Condensation Nuclei (CCN) counter calibration experiments [e.g. Rose et. al.
(2008) - p1156, fig2
http://www.atmos-chem-phys.net/8/1153/2008/acp-8-1153-2008.html] people use
sigmoidal fits. Never seen a code is shared so far or how it is obtained.

from scipy.optimize import leastsq
could be a good point to start. To me this fit is very likely a least square
minimization problem. You have your tanh(x) or 1/(1+e^-x) as a sigmoidal
function, and you should find the points that will make the error minimal
for a given discrete points/measurements.

from scipy.optimize import curve_fit might be another way to approach.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100920/6b841946/attachment.html 

More information about the SciPy-User mailing list