[SciPy-user] Does scipy have a function to...?

Christian Kristukat ckkart at hoc.net
Thu Sep 28 09:00:25 CDT 2006


Bill Dandreta wrote:

> Once I have something to optimize, I was thinking that genetic
> algorithms might yield the fastest solution because I only need an
> approximate solution.
> 
> Attached is an example. The green curve is boundary and the blue is data.

For data like yours the attached script works quite well. As Robert suggested it
uses fmin_cobyla to fit a 4pt spline to the data subject to one constraint per
data point. Therefor it will be quite slow if applied to thousands of points.
Initially I tried to use it to determine the background of spectroscopic data
but this seems to be more difficult as the data is usually not as *smooth* as yours.

Regards, Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: baseline.py
Type: text/x-python
Size: 1127 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20060928/0ae46abc/attachment.py 


More information about the SciPy-user mailing list