Two Algorithms for Time Series Forecasting Danny Yuan
Forecasting with Fast Fourier Transformation
Key Idea: Decomposition
A reasonably continuous and periodic function can be expressed as the sum of a series of sine terms
FFT Is Simple 1. Run FFT on input data 2. Filter out low-amplitude, high-frequency components 3. Forecast on each individual component 4. Run inverse of FFT of filtered data 5. Profit!
FFT Is Simple
Solution: Iteratively Compensate Input with Error
When Should We Use FFT?
When There Is Periodicity
When You Need a Quick Job
Decomposition Is Powerful Reference
Decomposition Is Powerful
Decomposition Is Powerful
Decomposition Is Powerful
Where Is The Bottleneck? Not easy to combine new signals ● E.g. events, weather ●
Forecasting With Deep Learning
Key Idea: Time Series Are Sequences Time series can be discretized into sequence ● We can apply techniques of seq2seq ●
Forecast Forecast Forecast Forecast Forecast 1 2 3 4 n H_0 H_1 H_2 H_3 H_n Input Input Start Input1 Input2 3 n-1 T0 T1 T2 T3 Tn t
Forecast Forecast Forecast Forecast Forecast 1 2 3 4 n H_0 H_1 H_2 H_3 H_n Input Input Start Input1 Input2 3 n-1 …... [Forecast 1, Time of Week 1] [F_(n-1), TOW_(n-1)] t
Forecast Forecast Forecast Forecast Forecast 1 2 3 4 n H_0 H_1 H_2 H_3 H_n Input Input Start Input1 Input2 3 n-1 …... [F_(n-1), TOW_(n-1), [Forecast 1, Time of Week 1, Weather_(n-1), X_(n-1)] Weather 1] [Temperature, Humidity, Precipitation, Wind, t Weather Type]
What About Recent Context?
Forecast Forecast Forecast Forecast Forecast 1 2 3 4 n h_1 h_2 h_3 h_m H_0 H_1 H_2 H_3 H_n Input Input Input Input Input Input Input Input Start 1 2 3 m 1 2 3 n-1 t - m t - m + 1 t - m + 2 t - 1 t …... [F_(n-1), TOW_(n-1), [F_1, TOW_1, Weather_1, X_1] Weather_(n-1), X_(n-1)]
Encoder Decoder Forecast Forecast Forecast Forecast Forecast 1 2 3 4 n h_1 h_2 h_3 h_m H_0 H_1 H_2 H_3 H_n Input Input Input Input Input Input Input Input Start 1 2 3 m 1 2 3 n-1 t - m t - m + 1 t - m + 2 t - 1 t …... [F_(n-1), TOW_(n-1), [F_1, TOW_1, Weather_1, X_1] Weather_(n-1), X_(n-1)]
Summary Decomposition is a powerful tool in time series forecasting ● Time series forecasting can be modeled as a seq2seq problem ●
Recommend
More recommend