Machine Learning (ML) gets a lot of hype, but its classical predecessors are still immensely powerful, especially in the time-series space. Error, Trend, Seasonality Forecast (ETS), Autoregressive Integrated Moving Average (ARIMA) and Holt-Winters are three Classical methods that are not only incredibly popular but are also excellent time-series predictors.
In fact, according to Statistical and Machine Learning forecasting methods: Concerns and ways forward, ETS outperforms several other ML methods including Long Short Term Memory (LTSM) and Recurrent Neural Networks (RNN) in One-Step Forecasting. Actually, all of the statistical methods have a lower prediction error than the ML methods do.
My hope is that after finishing this three-part blog post series, you’ll have a strong conceptual and mathematical understanding of how Holt-Winters works. I focus on Holt-Winters for three reasons. First, Holt-Winters, or Triple Exponential Smoothing, is a sibling of ETS. If you understand Holt-Winters, then you will easily be able to understand the most powerful prediction method for time series data (among the methods above). Second, you can use Holt-Winters out of the box with InfluxDB. Finally, the InfluxData community has requested an explanation of Holt-Winters in this Github issue 459. Luckily for us, Holt-Winters is fairly simple, and applying it with InfluxDB is even easier.
In this post, I’ll show you:
- When to use Holt-Winters.
- How Single-Exponential Smoothing works.
- A conceptual overview of optimization for Single Exponential Smoothing.
- Extra: The Proof for Optimization of Residual Sum of Squares (RSS) for Linear Regression.
In part two, I’ll show you:
- How Single Exponential Smoothing relates to Triple Exponential; Smoothing/Holt-Winters.
- How RSS relates to Root Mean Square Error (RMSE).
- How RMSE is optimized for Holt-Winters using the Nelder-Mead method.
In part three, I’ll show you:
- How you can use InfluxDB’s built-in Multiplicative Holt-Winters function to generate predictions on your time-series data.
- A list of learning resources.
When to Use Holt-Winters
Before you select any prediction method, you need to evaluate the characteristics of your dataset. To determine whether your time series data is a good candidate for Holt-Winters or not, you need to make sure that your data:
- Isn’t stochastic. If it is random, then it’s actually a good candidate for Single Exponential Smoothing.
- Has a trend.
- Has seasonality. In other words, your data has patterns at regular intervals. For example, if you were monitoring traffic data, you would see a spike in the middle of the day and a decrease in activity during the night. In this case, your seasonal period might be one day.