scipy.interpolate.UnivariateSpline not smoothing regardless of parameters

后端 未结 4 655
死守一世寂寞
死守一世寂寞 2021-01-01 04:31

I\'m having trouble getting scipy.interpolate.UnivariateSpline to use any smoothing when interpolating. Based on the function\'s page as well as some previous posts, I beli

4条回答
  •  悲哀的现实
    2021-01-01 05:02

    While I'm not aware of any library which will do it for you off-hand, I'd try a bit more DIY approach: I'd start from making a spline with knots in between the raw data points, in both x and y. In your particular example, having a single knot in between the 4th and 5th points should do the trick, since it'd remove the huge derivative at around x=8000.

提交回复
热议问题