发布于2021-03-08 20:18 阅读(765) 评论(0) 点赞(11) 收藏(1)
0
1
2
3
4
I am trying to predict unemployment rate using ARIMA(4,0,3) with sliding window technique(TimeSeriesSplit) and I encountered the problem where SVD did not converge.
Finland_unemployment_rate = array([[ 3.6],
[ 3. ],
[ 3.9],
[ 4.6],
[ 6.4],
[ 2.1],
[ 2.1],
[ 2.4],
[ 2.2],
[ 2.2],
[ 2.5],
[ 2.3],
[ 2.9],
[ 2.7],
[ 3.3],
[ 4.5],
[ 6.1],
[ 2.5],
[ 2.1],
[ 2.2],
[ 2.4],
[ 3. ],
[ 3.1],
[ 3.2],
[ 4.1],
[ 4.5],
[ 5.2],
[ 6.7],
[ 9.1],
[ 5.9],
[ 5.9],
[ 6.2],
[ 7.4],
[ 7.7],
[ 8. ],
[ 8.6],
[10.3],
[10.2],
[10.5],
[11.7],
[13.5],
[11.6],
[10.6],
[11.5],
[11.8],
[12.7],
[13.2],
[12.9],
[14.3],
[15.6],
[16.1],
[17.1],
[19. ],
[16.3],
[14.9],
[15.6],
[16.7],
[16.9],
[16.5],
[17.1],
[18.7],
[16.9],
[18.3],
[18.5],
[19.9],
[16.1],
[15.4],
[14.6],
[15.7],
[15.2],
[15. ],
[14.7],
[16.9],
[15.5],
[15. ],
[16.1],
[17.1],
[14.8],
[14.8],
[14.7],
[14.8],
[14.8],
[15.1],
[15.2],
[16.3],
[15. ],
[14.5],
[14.7],
[16.9],
[15.1],
[13. ],
[14. ],
[14.2],
[13.8],
[14.1],
[13.2],
[14.2],
[13.4],
[13.6],
[14.3],
[15.4],
[13.4],
[10.8],
[11.1],
[11.4],
[11.3],
[11.4],
[11.4],
[12.1],
[11.8],
[12.4],
[12.6],
[14.6],
[12. ],
[10.1],
[10.2],
[10.2],
[10. ],
[10.1],
[10.2],
[11.1],
[10.8],
[10.9],
[11.5],
[13.3],
[10.3],
[ 8.6],
[ 9. ],
[ 9.1],
[ 9.5],
[ 9.4],
[ 9.1],
[10.6],
[11.3],
[11.2],
[11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 8.2],
[ 9.8],
[ 8.4],
[ 6.9],
[ 6.6],
[ 6.9],
[ 7. ],
[ 6.2],
[ 7.4],
[ 7.8],
[ 7.7],
[ 8.5],
[ 8.4],
[ 9.5],
[ 7.9],
[ 6.9],
[ 7.3],
[ 7.1],
[ 6.9],
[ 7.3],
[ 6.9],
[ 8.7],
[ 8.7],
[ 9. ],
[ 8.8],
[10.8],
[ 7.8],
[ 6.6],
[ 7.1],
[ 7.6],
[ 7.4],
[ 7.9],
[ 7.9],
[ 8.5],
[ 9.1],
[ 9.5],
[ 9. ],
[10.7],
[ 9.2],
[ 7. ],
[ 7.4],
[ 8.2],
[ 8.3],
[ 8.2],
[ 8.8],
[ 8.8],
[10.1],
[10.3],
[10.3],
[11.8],
[10. ],
[ 8.4],
[ 8.3],
[ 8.4],
[ 8.7],
[ 8.2],
[ 9.2],
[ 9.3],
[ 9.4],
[10.1],
[ 9.8],
[10.8],
[ 9.3],
[ 7.8],
[ 7.2],
[ 7.7],
[ 8.1],
[ 8.1],
[ 7.9],
[ 9.2],
[ 9.2],
[ 9.6],
[10.2],
[10.7],
[ 8.9],
[ 7.5],
[ 7.5],
[ 8. ],
[ 7.3],
[ 7.1],
[ 8.4],
[ 8.8],
[ 8.6],
[ 8.8],
[ 8.6],
[ 9.3],
[ 6.7],
[ 6.5],
[ 6.8],
[ 6.3],
[ 6.3],
[ 6.2],
[ 5.4],
[ 6.8],
[ 7.4],
[ 7. ],
[ 8. ],
[ 8.8],
[ 6.2],
[ 6. ],
[ 6.1],
[ 5.9],
[ 6.2],
[ 5.9],
[ 6. ],
[ 7.2],
[ 6.9],
[ 7.3],
[ 8.1],
[10.6],
[ 7.9],
[ 7.7],
[ 7.7],
[ 7.6],
[ 7.4]])
X = Finland_UR.Value
tscv = TimeSeriesSplit(n_splits=381, max_train_size= 320)
Finland_pred = []
for train, test in tscv.split(X):
X_train, X_test = X[train], X[test]
if len(X_train) == 320 :
model = ARIMA(X_train, (4,0,3))
model = model.fit()
start = len(train)
end = len(train) + len(test) -1
pred = model.predict(start= start, end = end)
Finland_pred.append(pred)
Initially, my max_train_size is 100, but after a couples of iterations, it said SVD did not converge. After that I changed max_trained_size a couple of times more and got to 350 where this error did not happen anymore. I also tried to change ARIMA to (3,0,3) (1,0,3) but the same problem still appeared when I have a low number of max_train_size. When I changed to ARIMA(1,0,1) the model works even with max_train_size = 100 I looked up online and try to normalize it with Max_min_scaler it it also did not work Thus, What is the problem with my model or data here and what can I do about it to keep my max_train_size relatively low?
Or should I simplify the order of ARIMA?
Thank you!
0
1
2
3
4
5
6
作者:黑洞官方问答小能手
链接: https://www.pythonheidong.com/blog/article/879994/946ca96294225d672076/
来源: python黑洞网
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
昵称:
评论内容:(最多支持255个字符)
Copyright © 2018-2021 python黑洞网 All Rights Reserved 版权所有,并保留所有权利。 京ICP备18063182号-1
投诉与举报,广告合作请联系vgs_info@163.com或QQ3083709327
免责声明:网站文章均由用户上传,仅供读者学习交流使用,禁止用做商业用途。若文章涉及色情,反动,侵权等违法信息,请向我们举报,一经核实我们会立即删除!