使用自动arima功能的最大滞后问题
我正在尝试使用Auto Arima功能进行不同产品进行逐步分析。我所有的产品都有从2019年1月到2021年12月(36个数据点)的每月数据。尽管如此,我仍在2021年6月之前使用培训设置,因此需要30分进行培训,然后进行6分进行测试。 有了我的几乎所有产品,我就可以执行Auto Arima分析而没有任何问题,但是对于其中一些产品,如果我设置M = 12(因为是每月的数据),我会遇到问题。 这是我正在使用的代码:
step_wise=auto_arima(y=train[train['CTN']=='HX9004/10']['Quantity Adjusted'],
X=train[train['CTN']=='HX9004/10']['Price'].values.reshape(1, -1).transpose(),
start_p=0,
start_q=0,
start_P=0,
start_Q=0,
seasonal=True,
m=12,
test='kpss',
trace=True,
error_action='ignore',
suppress_warnings=True,
stepwise=False)
公式列车[train ['ctn'] =='HX9004/10'] ['数量调整后的']只是让我每月该特定产品的销售(CTN)。 以下是我在某些产品中遇到的错误:
ValueError: All lag values up to 'maxlag' produced singular matrices. Consider using a longer series, a different lag term or a different test.
以下是我在该功能中使用的数据的一些屏幕截图:
任何帮助都将不胜感激。我不想在不设置的情况下运行一些设置M = 12的产品。
谢谢!
I am trying to run an stepwise analysis using auto arima function for different products. All my products have monthly data from january 2019, till December 2021 (36 data points). Nevertheless, I am using a training set till June 2021, therefore 30 points for training and then 6 points for testing.
With almost all of my products I can perform the auto arima analysis without any problem, but for some of them I am having a problem if I set m=12 (because is monthly data).
Here is the code that I am using:
step_wise=auto_arima(y=train[train['CTN']=='HX9004/10']['Quantity Adjusted'],
X=train[train['CTN']=='HX9004/10']['Price'].values.reshape(1, -1).transpose(),
start_p=0,
start_q=0,
start_P=0,
start_Q=0,
seasonal=True,
m=12,
test='kpss',
trace=True,
error_action='ignore',
suppress_warnings=True,
stepwise=False)
The formula train[train['CTN']=='HX9004/10']['Quantity Adjusted'] simply gives me the sales per month of that specific product (CTN).
Below is the error I am having with some of my products:
ValueError: All lag values up to 'maxlag' produced singular matrices. Consider using a longer series, a different lag term or a different test.
Here are some screenshot of the data I am using in that function:
Any help would be much appreciated. I wouldn't like to run some products setting m=12 and others without setting it.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该问题似乎包含在用于确定季节性的测试类型中。默认情况下,ersional_test参数设置为“ OCSB”,并且可能会丢弃MaxLag错误。尝试将其更改为“ CH”,即
pensional_test ='ch'
The issue seems to be contained in the type of test used to determine seasonality. By default, the seasonal_test parameter is set to 'ocsb' and can throw the maxlag error. Try changing this to 'ch', i.e.
seasonal_test = 'ch'