NEWBIE question: How can I visualise a fitted timeseries model on my training data? #4188
Replies: 2 comments
-
Hi, thank you for the question. Currently, we don't provide an option to generate in-sample (=historic/training) one-step-ahead predictions since many models in AutoGluon do not offer this functionality. For example, sequence-to-sequence (seq2seq) models like TemporalFusionTransformer, PatchTST, Chronos always return a prediction for the future In summary, the only way to get these predictions from the current API is to call shortest_ts_length = train_data.num_timesteps_per_item().min()
in_sample_predictions = []
for i in range(10, shortest_ts_length): # ignore the first 10 observations since they are hard to predict
sliced_data = train_data.slice_by_timestep(None, i)
predictions_for_step_i = predictor.predict(sliced_data).slice_by_timestep(0, 1) # select the 1-step-ahead predictions
in_sample_predictions.append(predictions_for_step_i)
in_sample_predictions = pd.concat(in_sample_predictions) |
Beta Was this translation helpful? Give feedback.
-
Dear Oleksandr, |
Beta Was this translation helpful? Give feedback.
-
Sorry if this is obvious - it isn't to me.
I would like to visualise the fit that I get from fit() on the training data for timeseries. I can forecat and show the forecast, I can include in the forecast training data, but I can't seem to find an option to include the fit to the training data. I was trying to use predict to "predict" both part of the training data set as well as generate a forecast, but it doesn't generate predictions for the training set (or I don't know how). Can anyone help, please?
Beta Was this translation helpful? Give feedback.
All reactions