I'm using Scipy's SmoothBivariateSpline class to create a cubic B-spline on bivariate data. I now need to write the piecewise polynomial expression for this spline curve.
My mathematical background isn't very strong, so I wasn't able to write my own algorithm for transforming from the t, c, k output of the SmoothBivariateSpline to a polynomial representation. If this is feasible, can you provide pointers on how to approach this? I noticed that Scipy has interpolate.ppform, but I can't find any docs for it - is this relevant?
One method I was considering was breaking down the domain of the spline into regions at each knot (with (n-1)^2
total regions, where n
is the number of knots), then performing a cubic regression on many points on the spline curve in each region in order to calculate a cubic regression to the data for every region. Is this a valid approach?
The former method seems much more rigorous, so I'd prefer to use that one, but the latter is also acceptable.