Decomposing time series with multiple seasonal patterns using MSTL
The Decomposing time series data recipe in Chapter 9, Exploratory Data Analysis and Diagnosis, introduced the concept of time series decomposition. In those examples, the time series had one seasonal pattern, and you were able to decompose it into three main parts – trend, seasonal pattern, and residual (remainder). In the recipe, you explored the seasonal_decompose
function and the STL
class (Seasonal-Trend decomposition using Loess) from statsmodels. Recall, in an additive model, your time series is reconstructed by the following equation:
Here, represent the seasonal, trend, and remainder components at time respectively. But what about data with higher frequency – for example, IoT devices that can record data every minute or hour? Such data may exhibit multiple seasonal patterns.
Given the limitations of traditional seasonal decomposition approaches, a new approach for...