hi @adolgert!
How hard would it be to introduce penalty matrices (penalizing, for example second derivatives) to these splines? Basically, if $X$ is the model matrix of the spline, $y$ the data, $\beta$ the spline coefficients, $\lambda$ a scalar parameter controlling the amount of smoothing, and $S$ a penalty matrix, we'd want to solve a penalized least squares problem of the form:
$$
\lVert y - X\beta \rVert^{2} + \lambda \beta^{\top} S \beta
$$
I have an example here (https://gist.github.com/slwu89/50f81e6bbc296261e29851d3585ae554) of using JuMP to solve this kind of penalized least squares problem using a penalized cubic spline where the $X$ and $S$ matrices are produced by the "mgcv" R package, but it would be nice for the whole thing to be in Julia.