Cubic spline fitting with knot selection
