-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Deep Learning for Time Series Cookbook
By :

This recipe shows how to extend a data module to include extra explanatory variables in a TimeSeriesDataSet
class and a DataModule
class. We’ll use a particular case about seasonal time series.
We load the dataset that we used in the previous recipe:
N_LAGS = 7 HORIZON = 7 from gluonts.dataset.repository.datasets import get_dataset dataset = get_dataset('nn5_daily_without_missing', regenerate=False)
This dataset contains time series with a daily granularity. Here, we’ll model weekly seasonality using the Fourier
series. Unlike what we did in the previous chapter (in the Handling seasonality: seasonal dummies and Fourier series recipe), we’ll learn how to include these features using the TimeSeriesDataSet
framework.
Here’s the updated DataModule
that includes the Fourier
series. We only describe part of the setup()
method for brevity. The remaining...