Menu

#563 make weights for acspline independent of x-axis scale

open
nobody
None
5
2023-09-24
2023-09-24
No

hi,
rather new to gnuplot and had a hard time getting the weights right for 'acsplines' in my data (with x-axis representing a date). by trial and error and looking at interpol.c I understand that the weights are currently depending on the scale of the x-axis: if x-scale changes by a factor of 10, weights have to be changed by a factor of 1e-3 to achieve the same smoothing I think. this seems rather undesirable to me. coming from R (where 'smooth.spline' is controlled by a smoothing parameter that is independent of x-scale) I did not expect this.

in my special use case the date axis is internally handled as secs since the epoch -- the x-values in my case cover a x-range of about 4e7 and there are about 60 points . in this case the weight has to be reduced by a factor of about 3e17 (== (4e7/60)^3) when plotting the given y-data vs. date/time rather than vs. index in order to end up with the same degree of smoothing. this strong S^3 dependence on given scale S of covered x-range makes using acsplines interactively rather cumbersome I think: identically looking data (same y, just x-axis scaled differently) might need either a weighting factor of about 1 or of about 1e-17 in order to achieve same smoothing...

as far as I understand, if x-scale were normalized internally in interpol.c to, say [0, 1] range (or any other fixed range) when computing the smoothing spline the weights would then maintain an invariant meaning independent of the scale of the actual x-data as far as I can tell. apart from backward compatibility issues I would find this much preferable. any comments?

thank you,
joerg

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.