【发布时间】:2022-10-18 22:39:10
【问题描述】:
我有每周的时间序列数据,我想在上面测试多个时间序列。
原始数据看起来像
date visits
1/22/2021 796105
1/29/2021 742833
2/5/2021 918413
2/12/2021 806033
.
.
.
9/23/2022 3610023
9/30/2022 2833338
我想将训练数据拆分为多个数据框并始终预测接下来的 12 周
例如 :
train_1 = data until 15-jan-2022
test_1 = next 12 weeks
train_2 = data until 15-feb-2022
test_2 = next 12 weeks
.
.
train_x = data until 15-jul-2022
test_x = next 12 weeks
稍后我想为我的 holt Winter 预测算法创建一个 for 循环。我看了https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.TimeSeriesSplit.html 但无法理解我的数据集
有人可以帮忙吗?先感谢您! .
【问题讨论】:
标签: python time-series facebook-prophet train-test-split holtwinters