Approximate splines which consider data errors

Hi Rooters,

I would like to fit an arbitrary function to data (something spline-like) which would take into account errors of the data - it would minimize not only the overall smoothness (abs(second derivative) integral), but combined it with chi^2 (\Sum ( (y_measured - y_fit)/y_measured_sigma)^2 ) during the minimalization procedure.

I looked around and it seems most spline approaches just ignore any errors. Gnuplot has something along these lines: “acspline”, but it is far from satisfactory.

Is there anything I should have a look at in Root already, would you recommend some particular approach? Comments welcome, thanks!

I found what I was looking for in ALGLIB package, in particular here: Penalized regression spline … p#header12 … penalizedw

It would be really neat to integrate this package into ROOT :slight_smile: