28 Sep
2006
28 Sep
'06
7 a.m.
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