Univariate Time Series Prediction using Deep Learning and PyTorch
This repository provides Univariate Time Series Prediction using deep learning models including DNN, CNN, RNN, LSTM, GRU, Recursive LSTM, and Attention LSTM.
The dataset used is Appliances Energy Prediction Data Set and can be found here.
According to the table below, CNN using 1D Convolutional layer outperformed the other models.
Model | MAE↓ | MSE↓ | RMSE↓ | MPE↓ | MAPE↓ | R Squared↑ |
---|---|---|---|---|---|---|
DNN | 31.0077 | 4039.9806 | 57.8505 | -16.4529 | 27.5759 | 0.4355 |
CNN | 28.4919 | 3869.6289 | 56.6529 | -11.5615 | 24.3810 | 0.4567 |
RNN | 30.7757 | 3997.9815 | 57.8951 | -19.2878 | 28.4873 | 0.4297 |
LSTM | 29.8795 | 3949.6140 | 57.5196 | -17.5516 | 27.2467 | 0.4393 |
GRU | 29.9521 | 3939.7874 | 57.4498 | -17.9298 | 27.4501 | 0.4402 |
Recursive LSTM | 29.8795 | 3949.6140 | 57.5196 | -17.5516 | 27.2467 | 0.4393 |
Attention LSTM | 30.6609 | 3923.0855 | 57.2503 | -17.8343 | 28.1153 | 0.4372 |
It definitely suffers from the typical lagging issue.
If you want to train Attention LSTM,
python main.py --model 'attention'
python main.py --model 'attention' --mode 'test'
To handle more arguments, you can refer to main.py
- Windows 10 Home
- NVIDIA GFORCE RTX 2060
- CUDA 10.2
- torch 1.6.0
- torchvision 0.7.0
- etc