Related to this question: I would like to determine optimal smoothing parameters for any kind of time series, with mixed units, varying lengths, varying framerates, such as pixel or meter trajectories, radian or degree angles, velocities, etc. I tried make_smoothing_spline from scipy.interpolate, but this does not work so well. I've got 2 normalized time series (mean 1e-16 ≈ zero, std = 1). Both curves are almost identical, but smoothing them with make_smoothing_spline gives very different results when lam is automatically determined with the GCV criterion. One is correctly smoothed, the other is completely flattened. I picked out the code of make_smoothing_spline and saw that there is a call to scipy.interpolate._bsplines._compute_optimal_gcv_parameter(X, wE, y, w). Calling it on the first curve gives lam = 4.8e-06, while the other gives 139.9. The first one is more what I am looking for. Should I simply not use normalized data? But then I have the opposite problem, with some data not being filtered at all. And most importantly, why does it behave like so? Is it some sort of numerical precision issues? Any idea how to handle it? Continue reading...