0

我需要从sktime包中拟合 ARIMA 模型。我想使用SlidingWindowSplitterfromsktime.forecasting.model_selection但我真的不明白它是如何工作的。如果我想安装一个简单的 ARIMA,我会这样做

...
model = ARIMA(order = (p, d, q)).fit(y_train)
y_pred, y_conf = model.predict(fh, return_pred_int=True)

但是这如何与 SlidingWindowSplitter 一起工作?

4

1 回答 1

1

这应该有效:

from sktime.forecasting.all import *
from sktime.forecasting.model_evaluation import evaluate

y = load_airline()
forecaster = ARIMA()
cv = SlidingWindowSplitter()
out = evaluate(forecaster, cv, y)
于 2021-03-04T18:56:20.030 回答