lch679
lch679

Reputation: 1

Using lags or monthly categorical features for recognizing the seasonality with DeepAR and TFT from pytorch-forecasting

I try to forecast monthly sales with the help of DeepAR and Temporal Fusion Transformer from pytorch-forecasting. The data I use has monthly seasonality, and the seasonality is the same or at least very similar for different countries.

While generating the TimeSeriesDataSet with pytorch-forecasting I could set the parameter lags for the target variable. The documentation says about it:

Lags can be useful to indicate seasonality to the models

I’m not sure if this is the better option than using the month or maybe month and country in a combination as a categorical feature to simplify the recognition of the seasonality.

Did anyone have own experience with this topic or an explanation what choice would be the best?

Thanks in advance!

Upvotes: 0

Views: 685

Answers (1)

Vikash Kumar
Vikash Kumar

Reputation: 348

DeepAR algorithm automatically generates feature for time series. Read more here

https://docs.aws.amazon.com/sagemaker/latest/dg/deepar_how-it-works.html

  • You can also add your own custom feature ( both categorical and continuous ) for each Timeseries. (e.g. Public holidays etc )
  • It works well when you have multiple time series with more than 300 data points for each.
  • All time series should have same frequency.

Benchmark on DeepAR and TFT is in your hands, I guess TFT will outperform.

Upvotes: 0

Related Questions