Fourier Terms!

Picture this scenario: you are building a forecasting tool that leverages time series data and you are deciding on your features. Inevitably you get to the question: how do I handle my cyclic variables such as day of year, day of week, and time of day? These features, whilst not exceptionally explainable, tend to provide a lot of predictive power and should variably go into your model if you don’t have access to the true feature. So what do you do with them? Well we have several options in our toolkit. The first is to take delve into the forecasting realm and use models such as ARIMA, or RNNs. These are great models and are commonly used. However, I’d argue that the most common approach is to just hot encode the cyclic variables and run them through a machine learning pipeline. I think we can do better. We can borrow some approaches from forecasting analysis and use Fourier transforms. This dramatically reduces the dimensionality of the data and provides similar results in less time. ...

February 4, 2020 · 7 min · Eric Stern