You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In CH05, your method rolling_forecasting trains on test samples.
In this case :
the df corresponds to all the data (train AND test).
You are fitting SARIMAX to the train AND test samples.
model = SARIMAX(df[:i], order=(2,0,0))
res = model.fit(disp=False)
predictions = res.get_prediction(0, i + window - 1)
oos_pred = predictions.predicted_mean.iloc[-window:]
pred_AR.extend(oos_pred)
In order to really do forecasting, your training should be based on train AND prediction sample.
model = SARIMAX(df_train_estimated[:i], order=(2,0,0))
res = model.fit(disp=False)
predictions = res.get_prediction(0, i + window - 1)
oos_pred = predictions.predicted_mean.iloc[-window:]
pred_AR.extend(oos_pred)
df_train_estimated.append({'value': oos_pred.values[0]}) #Adding the last prediction and use it as training
The text was updated successfully, but these errors were encountered:
In CH05, your method rolling_forecasting trains on test samples.
In this case :
the df corresponds to all the data (train AND test).
You are fitting SARIMAX to the train AND test samples.
In order to really do forecasting, your training should be based on train AND prediction sample.
The text was updated successfully, but these errors were encountered: