In this example on the website Traffic forecasting using graph neural networks and LSTM and ex , I tested the last part of the code, below, by changing the forecast_horizon and comparing y and y_pred.
-----------------------------------------------------
x_test, y = next(test_dataset.as_numpy_iterator())
y_pred = model.predict(x_test)
plt.figure(figsize=(18, 6))
plt.plot(y[:, 0, 0])
plt.plot(y_pred[:, 0, 0])
------------------------------------------------------
The comparison revealed that y and y_pred have a difference on the time axis, which corresponds to the forecast_horizon. For instance, with forecast_horizon=3, there's a difference of 3 time units, and with forecast_horizon=9, there's a difference of 9 time units. From a forecast perspective, x-test and y should have a difference of forecast_horizon, but y and y_pred should be similar. Therefore, I suspect that there might be an issue with this example. Could you please confirm if I misunderstood something?"
Comment From: dhantule
Hi @hsnam0513, thanks for reporting this. I am unable to reproduce. Could you provide the code for the changes you made? Could you refer to this updated example and let me know if the issue persists.
Comment From: github-actions[bot]
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.
Comment From: github-actions[bot]
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.
Comment From: google-ml-butler[bot]