Open vageeshmaiya opened 2 years ago
Hello, do you have the drawing code here? I wonder if you can provide it. Thank you very much!
Hello, were you able to get the code right? Please share if you have it.
I wrote some basic plotting code just to test the univariate forecasting on the electricity dataset. In tasks.eval_forecastings
I had to change line 72
onwards in forecasting
...
test_pred_inv = scaler.inverse_transform(test_pred.squeeze((0,3)))
test_labels_inv = scaler.inverse_transform(test_labels.squeeze((0,3)))
import matplotlib.pyplot as plt
plt.plot(data[:, :, n_covariate_cols:].squeeze((0, 2)), c='blue')
test_x_idxs = list(range(test_slice.start, data.shape[1]))
test_start_idx = 0
test_futures = lr.predict(test_repr.squeeze(0))[test_start_idx]
plt.plot(test_x_idxs[test_start_idx:len(test_futures)+test_start_idx], test_futures, c='red')
plt.show()
Unfortunately, it seems like the prediction is not very accurate or I have coded up the plotting wrong. If @zhihanyue could provide some insight into what I might have done wrong that would be great. As far as I understand it, the ridge regression predictions return a prediction for the next prediction_len timesteps so what I have done should plot the next prediction_len timestamps from the first test time stamp t.
I have run the code for ETTh2 dataset as mentioned in the paper for 500 epochs and have obtained the pickle file as output. I am trying to get the plot of prediction v/s ground truth as mentioned in the paper in Figure 5. Could you please suggest the code used to plot the obtained output.