Hi,
Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
to a set of data points?
Regards,
Chris
Hi,
Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
to a set of data points?
Regards,
Chris
That question would probably be better asked on the scipy-users list. I believe there is something for that, but I am not familiar with it.
Ben Root
On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer <chrisspen@…1003…7…> 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.
On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer <chrisspen@…287…> wrote:
Hi,
Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
to a set of data points?
Regards,
Chris
–
Gökhan
You could also experiment at zunzun.com. Choose 2D sigmoidal from the 2D function scroll list.
On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer <chrisspen@…1003…7…> wrote:
Hi,
Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
to a set of data points?
–
Gökhan
Thank you. I'll try investigating Scipy further. I've already tried
applying some least-squares code for Numpy
(http://pingswept.org/2009/01/24/least-squares-polynomial-fitting-in-python/)
to my sigmoid data, but it only seems to fit parabolas.
I had already encountered zunzun.com while Googling the problem. I'm
not sure what to make of it, although it seems to be an online
curve-fitting service. Unfortunately, my usage requires the ability to
run the process locally.
Regards,
Chris
On Mon, Sep 20, 2010 at 6:35 PM, Gökhan Sever <gokhansever@...287...> wrote:
On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer <chrisspen@...287...> wrote:
Hi,
Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
to a set of data points?You could also experiment at zunzun.com. Choose 2D sigmoidal from the 2D
function scroll list.
--
Gökhan
Hi,
Scipy.optimize.leastsq finds a least square fit to an arbitrary function. Check the scipy cookbook example: http://www.scipy.org/Cookbook/FittingData
Regards,
Bartosz
On 20.09.2010, at 22:36, Chris Spencer wrote:
Hi,
Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve
to a set of data points?Regards,
Chris------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options
Bartosz Telenczuk
Institute for Theoretical Biology
Humboldt University of Berlin
Germany
http://neuroscience.telenczuk.pl