Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于时序数据是否具有周期的检测方法 #8

Open
ToNorthX opened this issue Aug 21, 2019 · 6 comments
Open

关于时序数据是否具有周期的检测方法 #8

ToNorthX opened this issue Aug 21, 2019 · 6 comments

Comments

@ToNorthX
Copy link

@jixinpu hi:
在周期性检测方法中,发现代码:
split_data = np.array(smooth_data).reshape(-1, 24)
该代码目的是对时间序列数据进行分段,但是参数为什么假定是24呢

@jixinpu
Copy link
Owner

jixinpu commented Aug 21, 2019

因为我们业务数据是以天为一周期,一小时一个点,所以设置的是24

@ToNorthX
Copy link
Author

明白了,但是本文使用了statsmodels工具经进行趋势提取,为什么不采用stl相关的呢。这几种方式对比下来,是不是statsmodels提供的方法更加准确?

@jixinpu
Copy link
Owner

jixinpu commented Aug 23, 2019

您所指的stl相关是什么?

@ToNorthX
Copy link
Author

ToNorthX commented Aug 23, 2019

    STL就是时间序列分解算法而已。针对时间序列进行趋势周期提取的方法是有多种的,比如说使用
稀疏正则化和非局部季节性过滤的LAD损失的RobustSTL提取趋势等。文中使用的是
seasonal_decompose函数分解。其实现思路就是通过加权滑动平均提取趋势分量,
然后对cycle-subseries每个时间点数据求平均组成周期分量。

   我理解是文中使用该方法提取数据更加准确吗?还是说仅仅由于python已提供对应的方法,使用起来方便吗?
   另外我有个诱惑点:本文采用的是seasonal_decompose的加法模型进行的分解,即 
observed = trend + seasonal + residual。我想问的是, 数据序列分解的时候,是否必须要判断时序数据具有周期性呢?

@ToNorthX
Copy link
Author

@jixinpu hi:
我在使用seasonal_decompose函数分解时,报错:
freq T not understood. Please report if you think this is in error.
这个是为什么呢,因为我没有事先判断时间序列是否具有周期,是不是因为这个呢?

@jixinpu
Copy link
Owner

jixinpu commented Sep 2, 2019

我在进行周期性提取之前,首先判断它是否具有周期性,使用的是分段dtw方法,具体可以看代码aiopstools/examples/ts_period_predict.py。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants