Here is the description cited from the docs of InformerForPrediction
:
- future_time_features (
torch.FloatTensor
of shape(batch_size, prediction_length, num_features)
) — Required time features for the prediction window, which the model internally will add tofuture_values
. These could be things like “month of year”, “day of the month”, etc. encoded as vectors (for instance as Fourier features). These could also be so-called “age” features, which basically help the model know “at which point in life” a time-series is. Age features have small values for distant past time steps and increase monotonically the more we approach the current time step. Holiday features are also a good example of time features.
These features serve as the “positional encodings” of the inputs. So contrary to a model like BERT, where the position encodings are learned from scratch internally as parameters of the model, the Time Series Transformer requires to provide additional time features. The Time Series Transformer only learns additional embeddings forstatic_categorical_features
.
Additional dynamic real covariates can be concatenated to this tensor, with the caveat that these features must but known at prediction time.
Thenum_features
here is equal toconfig.
num_time_features+
config.num_dynamic_real_features`.
Hi, I have a question regarding inference in time series forecasting models.
When making predictions, how can I obtain or construct the dynamic_real_features
for the future steps (i.e., for the prediction_length
)?
More specifically, how should I concatenate the corresponding dynamic_real_features
and time_features
during inference?
Is it appropriate to use all-zero placeholders for the future dynamic_real_features
?
Will this affect prediction performance, considering that during training the model has access to real values for these features over the full context + prediction window?
On a related note:
In time series forecasting, is it necessary for all timestamps in the input window to be equally spaced (e.g., every x minutes)?
Or can I use sequences with irregular time intervals, as long as the time order is preserved?
Thanks for your help!