I have a set of 2D data points, x and y. I wish to fit function to these data. The function I want to fit is a spline, but I don’t want the knots to be the same as the data points. I.e. I’d like to fit a piece-wise polynomial with the overall function having some degree of smoothness.
From searching, I can easily find how to create a TSpline3/5 where the knots are exactly the (x,y) points. But that’s not what I want. I want some smaller number of knots, with the positions of the knots and the polynomial coefficients of the pieces to be the fit parameters. I’d be ok if the position of the knot was a fixed parameter, with only the coefficients left floating.
I hope I explained my problem properly. It’s difficult because almost all uses of splines in the examples are for interpolating or smoothing data. I want to use a spline to fit data points, using much fewer parameters than the number of points.