插值方法“三次样条”有什么作用?和“from_derivatives”做?

发布于 2025-01-17 05:53:57 字数 1235 浏览 1 评论 0原文

pandas 插值纪录片已经为所有其他注释留下了有用的注释,说明它们是否使用实际的数字索引或时间索引进行插值。

method str, default ‘linear’

    Interpolation technique to use. One of:

        ‘linear’: Ignore the index and treat the values as equally spaced. This is the only method supported on MultiIndexes.

        ‘time’: Works on daily and higher resolution data to interpolate given length of interval.

        ‘index’, ‘values’: use the actual numerical values of the index.

        ‘pad’: Fill in NaNs using existing values.

        ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘spline’, ‘barycentric’, ‘polynomial’: Passed to scipy.interpolate.interp1d. These methods use the numerical values of the index. Both ‘polynomial’ and ‘spline’ require that you also specify an order (int), e.g. df.interpolate(method='polynomial', order=5).

        ‘krogh’, ‘piecewise_polynomial’, ‘spline’, ‘pchip’, ‘akima’, ‘cubicspline’: Wrappers around the SciPy interpolation methods of similar names. See Notes.

        ‘from_derivatives’: Refers to scipy.interpolate.BPoly.from_derivatives which replaces ‘piecewise_polynomial’ interpolation method in scipy 0.18.


但不幸的是我找不到最后两个的信息:

cubicspline 
and
from_derivatives

pandas interpolation documentary already leaves helpful notes for all the other Notes on wether they use the actual numerical indices or a timeindex for the interpolation.

method str, default ‘linear’

    Interpolation technique to use. One of:

        ‘linear’: Ignore the index and treat the values as equally spaced. This is the only method supported on MultiIndexes.

        ‘time’: Works on daily and higher resolution data to interpolate given length of interval.

        ‘index’, ‘values’: use the actual numerical values of the index.

        ‘pad’: Fill in NaNs using existing values.

        ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’, ‘cubic’, ‘spline’, ‘barycentric’, ‘polynomial’: Passed to scipy.interpolate.interp1d. These methods use the numerical values of the index. Both ‘polynomial’ and ‘spline’ require that you also specify an order (int), e.g. df.interpolate(method='polynomial', order=5).

        ‘krogh’, ‘piecewise_polynomial’, ‘spline’, ‘pchip’, ‘akima’, ‘cubicspline’: Wrappers around the SciPy interpolation methods of similar names. See Notes.

        ‘from_derivatives’: Refers to scipy.interpolate.BPoly.from_derivatives which replaces ‘piecewise_polynomial’ interpolation method in scipy 0.18.


But unfortunately I couldnt find this information for the two last ones:

cubicspline 
and
from_derivatives

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鱼窥荷 2025-01-24 05:53:57

scipy.interpolate.CubicSpline

使用两次连续可导的分段三次多项式。结果表示为带有与给定数据匹配的断点的 PPoly 实例。

scipy.interpolate.BPoly.from_derivatives

在伯恩斯坦基上构造分段多项式,与断点处的指定值和导数兼容。

scipy.interpolate.CubicSpline

Interpolate data with a piecewise cubic polynomial which is twice continuously differentiable. The result is represented as a PPoly instance with breakpoints matching the given data.

scipy.interpolate.BPoly.from_derivatives

Construct a piecewise polynomial in the Bernstein basis, compatible with the specified values and derivatives at breakpoints.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文