nignatiadis / SmoothingSplines.jl

Cubic smoothing splines in Julia.
Other
34 stars 14 forks source link

Parametric splines #24

Open yakir12 opened 3 years ago

yakir12 commented 3 years ago

It would be great to fit coordinates (XY pairs as a function of, say, time). See http://juliamath.github.io/Interpolations.jl/latest/control/#Parametric-splines for example. MWE:

n = 10
t = 1:n
xy = [Tuple(rand(2)) for _ in 1:n]
spl = fit(SmoothingSpline, t, xy, 1.0)
nignatiadis commented 2 years ago

Is the suggestion to implement thin-plate splines, as described in Chapter 5.7 of https://web.stanford.edu/~hastie/ElemStatLearn/printings/ESLII_print12_toc.pdf?

I agree, that would be a nice feature to have!

yakir12 commented 2 years ago

I mean in a similar way to how https://github.com/kbarbary/Dierckx.jl#parametric-splines functions as a smoothing parametric spline (for, say, smoothing trajectories). The advantage would be that while Dierckx.jl is a wrapper for the dierckx Fortran library, SmoothingSplines.jl is in pure Julia.

I don't know how to implement it though :smile: