I'm working in a time series forecasting: if I have the target column (y) as a stock price to be forecasted,
I have a test data set size of 65 observations,
suppose that the prediction length (predicated prices for future days) = 20.
So, each observation of the test dataset will generate 20 predictions = array(65,20).
Now, to calculate the evaluation metrics MAE between(predictions, trues). what is the standard way to do so? I mean, should I: Take the first 20 predicted values and compare them with the first 20 true values. Calculate the absolute difference between each predicted value and its corresponding true value. or what? Can you please give me hints or some codes? This is what I have done:
preds = np.array(np.reshape(predictions, (65, 20)))
trues = np.array(np.reshape(values, (65, 20)))
preds= mm.inverse_transform(preds)
trues= mm.inverse_transform(trues)
preds= preds[0:,1]
trues= trues[0:,1]
metrics = metric(preds, trues)
I have seen other developers do it like that:
vals = np.concatenate(values, axis=0).ravel()
preds = np.concatenate(predictions, axis=0).ravel()