two algorithms for time series forecasting · decomposition is a powerful tool in time series...
TRANSCRIPT
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
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
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
Decomposition Is Powerful
Decomposition Is Powerful
Where Is The Bottleneck?
● Not easy to combine new signals
● E.g. events, weather
Forecasting With Deep Learning
● Time series can be discretized into sequence
● We can apply techniques of seq2seq
Key Idea: Time Series Are Sequences
t
H_1
Input1
H_2
Input2
H_3
Input3
H_n
Inputn-1
H_0
Start
Forecast1
Forecast2
Forecast3
Forecast4
Forecastn
T0 T1 T2 T3 Tn
t
H_1
Input1
H_2
Input2
H_3
Input3
H_n
Inputn-1
H_0
Start
Forecast1
Forecast2
Forecast3
Forecast4
Forecastn
[Forecast 1, Time of Week 1]…...
[F_(n-1), TOW_(n-1)]
t
H_1
Input1
H_2
Input2
H_3
Input3
H_n
Inputn-1
H_0
Start
Forecast1
Forecast2
Forecast3
Forecast4
Forecastn
…...
[F_(n-1), TOW_(n-1), Weather_(n-1), X_(n-1)][Forecast 1, Time of Week 1,
Weather 1][Temperature, Humidity, Precipitation, Wind, Weather Type]
What About Recent Context?
tt - 1t - m + 2t - m + 1t - m [F_1, TOW_1, Weather_1, X_1] …... [F_(n-1), TOW_(n-1), Weather_(n-1), X_(n-1)]
h_1
Input1
h_2
Input2
h_3
Input3
h_m
Inputm
H_1
Input1
H_2
Input2
H_3
Input3
H_n
Inputn-1
H_0
Start
Forecast1
Forecast2
Forecast3
Forecast4
Forecastn
tt - 1t - m + 2t - m + 1t - m [F_1, TOW_1, Weather_1, X_1] …... [F_(n-1), TOW_(n-1), Weather_(n-1), X_(n-1)]
h_1
Input1
h_2
Input2
h_3
Input3
h_m
Inputm
H_1
Input1
H_2
Input2
H_3
Input3
H_n
Inputn-1
H_0
Start
Forecast1
Forecast2
Forecast3
Forecast4
Forecastn
Encoder Decoder
Summary
● Decomposition is a powerful tool in time series forecasting
● Time series forecasting can be modeled as a seq2seq problem