In this repository, I implement time-series demand forecasting by using LSTM, GRU, LSTM with seq2seq architecture, and prophet models.
I use Keras framework to construct deep learning models and the Prophet library to implement prophet.
The dataset is the monthly passengers of an International Airline link. The tutorial of the dataset is here.
This is the result of using two-layer lstm model. All the implemented code is shown in stacked_lstm_regression.ipynb.
The training dataset is created by using 12 months as an input to the model and the following next one month as output of the model.
The result below shows that the model predicts future monthly passengers quite well.
This is the result of using two-layer GRU model instead of using LSTM layers. All the implemented code is shown in stacked_gru_regression.ipynb
The training dataset is created by using 12 months as an input to the model and the following next one month as output of the model.
The result below shows that the model predicts future monthly passengers slightly better than the LSTM model.
This is the result of using LSTM model with seq2seq2 (Encoder+Decoder) architecture. This model is motivated by a paper Deep and Confident Prediction for Time Series at Uber blog paper. All the implemented code is shown in seq2seq_lstm.ipynb
The training dataset is created by using from t to t + 12 months as an input to the encoder, from t + 6 to t + 12 months as an input to the decoder, and from t + 13 to t + 18 months as an output of the decoder.
The result is evaluated on the RMSE and MAE of both the following next month and in the 6 months.
Note that the test period is diffrent from other models.
Note that the test period is diffrent from other models.
Finnaly I implement the OSS library, prophet. Prophet, which is developed by Facebook, is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects.
The result is much worse than using LSTM or GRU models. The figure below indicates that prophet could not predict the incresing trend of the amplitude.
- Takumi Watanabe (takumiw)
- Sophia University