季节分解

2024-09-30 08:38:10 发布

您现在位置:Python中文网/ 问答频道 /正文

当我使用statsmodels的季节分解方法分解时间序列时,我遇到了一个问题,即在建模数据的头/尾上缺少值。你知道吗

这是由于一个对称的移动平均法默认的季节性方法。你知道吗

    statsmodels.tsa.seasonal.seasonal_decompose(x, model='additive', filt=None, freq=None, two_sided=True, extrapolate_trend=0)

为了解决这个问题,我必须通过一个过滤器,但到目前为止我还不知道是哪一个。你知道吗

有人能帮我吗?对我来说,在我的数据末尾至少有一个值是很重要的。你知道吗


Tags: 数据方法nonemodel时间序列建模statsmodels
1条回答
网友
1楼 · 发布于 2024-09-30 08:38:10

阅读the statsmodels documentation

two_sided: The moving average method used in filtering. If True (default), a centered moving average is computed using the filt. If False, the filter coefficients are for past values only.

“如果为假,则滤波器系数仅用于过去的值”:因此,如果您愿意切换到单侧滤波器,则会在数据末尾获得所有值,您认为这是必要的。你知道吗

相关问题 更多 >

    热门问题