|
From: <ln...@dr...> - 2007-10-23 20:01:44
|
> On Tue, 23 Oct 2007 18:05:29 +0200, <ln...@dr...> wrote: > >> Concerning the spline differentiating question: I am aware that spline= s >> can cause unwanted oscillations, > > Yes one of the problems with splines is that the contraints placed on > continuity and the fact that it must pass through all data points can l= ead > to some fairly unexpected and sometimes extreme excursions from the zon= e > where the real data lie. > I beg to disagree: you certainly are not forced to go through all your da= ta points for a smoothed spline. Of course, csplines do this way, but acspli= nes not (and bezier curves also do not necessarily pass through all the points). > Sometimes it's just clearly the wrong way to respresent certain data. > Sometimes it's less obvious but still wrong, this is more dangerous. Si= nce > the constraints on the continuity of the differencial are *completely > artificially* imposed as being the very definition of the spline fit , = I > believe it is utterly wrong to place any scientific meaning on the > derivative of a spline fit. > Did you try acsplines (it seems me what you say applies mostly for csplin= es)? I wouldn't say that the differential of such an acspline (if it is carefull= y drawn) has no scientific meaning. After all, you certainly remember the t= ime there were no personal computers and everybody was forced to draw the cur= ve himself for a dataset on a piece of paper then graphically differentiate = this curve by placing tangents and calculating their slopes. This is exactly t= he same thing I would like to do, but now aided by the computer. (Maybe smoothing= is not the exact term for this, that's why we seem to disagree?) Every measureme= nt, fitting, analysing method has its own inaccuracies and problems in the re= al world you must be aware of. This applies either to curve fitting or smoot= hing. It is only in mathematics where things are clearly defined and rigorous. > I would invite you to reflect on what that means for your results and > maybe have a quick look at the maths behind spline fitting to check wha= t I > say. The maths is pretty simple actually but it's important to know wha= t > you are doing in applying such a fit. > > Many people apply even least squares fits to completely inappropriate d= ata > because they do not realise the basic assumptions of the maths behind i= t, > that is that y errors are >> x errors. If that's not true you get the > wrong fit! > >> but in the past I was succesfully using >> acsplines with weights carefully chosen to approximate the curve I wou= ld >> draw by hand through the experimental data. > > Well I certainly hope you're not using that sort of bad science for > anything more than personal curiosity. > It does not sound like valid , reproducable scientific analysis. :) > I used this method to calculate meaningful results. At least not less mea= ningful that I would have obtained by graphical differentiation on a piece of pap= er. See: you have a bunch of data points and you simply don't know which is t= he mathematical function you should fit them to. You sometimes even don't ex= actly know what the exact error on x or y values is, but have only a clue. Don'= t misunderstand me: I don't need to have something very precise, only at gi= ven extent (certainly more precise than doing a "differentiation" on the poin= ts themselves, which have a certain scatter due to imprecisions and perturba= tions). By the way, even if I fit a mathematically well-defined function to these= data with the Marquardt-Levenberg method, I am not sure that this is the funct= ion which describes most accurately the phenomenon solely because the curve h= as a similar shape than the points plotted. > gnuplot claims not to do data processing (other than fitting user defin= ed > functions) although "smoothing" data with splines clearly is just that. > > I think you should be looking at applying some recognised data processi= ng > techniques to your data rather than hand tweeking splines. > > I hope my comments have highlighted some of the traps , in particular w= ith > regards to the derivative that you are interested in. > > regards, Peter. > My biggest problem for the moment is the following: I did not find anythi= ng useful about 'assignment' in the help file (I have the most recent CVS ve= rsion of gnuplot, of course). How should I use it then? Is there a configure-ti= me switch needed to compile it into gnuplot? Levente |