Temporal embedding
In Chapter 5, Time Series Forecasting as Regression, we briefly talked about temporal embedding as a process where we try to embed time into features that the ML model can leverage. If we think about time for a second, we will realize that there are two aspects of time that are important to us in the context of time series forecasting – passage of time and periodicity of time.
Let’s look at a few features that can help us capture these aspects in an ML model.
Calendar features
The first set of features that we can extract are features based on calendars. Although the strict definition of time series is a set of observations taken sequentially in time, more often than not, we will have the timestamps of these collected observations alongside the time series. We can utilize these timestamps and extract calendar features such as the month, quarter, day of the year, hour, minutes, and so on. These features capture the periodicity of time and help...