13 Data windowing and creating baselines for deep learning

 

This chapter covers

  • Creating windows of data
  • Implementing baseline models for deep learning

In the last chapter, I introduced deep learning for forecasting by covering the situations where deep learning is ideal and by outlining the three main types of deep learning models: single-step, multi-step, and multi-output. We then proceeded with data exploration and feature engineering to remove useless features and create new features that will help us forecast traffic volume. With that setup done, we are now ready to implement deep learning to forecast our target variable, which is the traffic volume.

In this chapter, we’ll build a reusable class that will create windows of data. This step is probably the most complicated and most useful topic in this part of the book on deep learning. Applying deep learning for forecasting relies on creating appropriate time windows and specifying the inputs and labels. Once that is done, you will see that implementing different models becomes incredibly easy, and this framework can be reused for different situations and datasets.

Once you know how to create windows of data, we’ll move on to implement baseline models, linear models, and deep neural networks. This will let us measure the performance of these models, and we can then move on to more complex architectures in the following chapters.

13.1 Creating windows of data

13.1.1 Exploring how deep learning models are trained for time series forecasting

13.1.2 Implementing the DataWindow class

13.2 Applying baseline models

13.2.1 Single-step baseline model

13.2.2 Multi-step baseline models

13.2.3 Multi-output baseline model

13.3 Next steps

13.4 Exercises

Summary