Re: [Matplotlib-users] Sigmoid Curve Fitting

2010-09-21 Thread Bartosz Telenczuk
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
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Bartosz Telenczuk

Institute for Theoretical Biology
Humboldt University of Berlin
Germany
http://neuroscience.telenczuk.pl


--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Sigmoid Curve Fitting

2010-09-21 Thread James Phillips
Chris Spencer chriss...@... writes:
 
 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.

The fitting source code for http://zunzun.com is freely available under a
BSD-style license on Google's source code repository at
http://code.google.com/p/pythonequations/downloads/list and comes with many
examples - so you *can* run it locally.

 James Phillips
 zun...@zunzun.com
 http://zunzun.com



--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Sigmoid Curve Fitting

2010-09-20 Thread Chris Spencer
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Sigmoid Curve Fitting

2010-09-20 Thread Gökhan Sever
On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer chriss...@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.


-- 
Gökhan
--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Sigmoid Curve Fitting

2010-09-20 Thread Chris Spencer
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 gokhanse...@gmail.com wrote:
 On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer chriss...@gmail.com 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


--
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users