| Literature DB >> 35463259 |
Huihui Zhang1,2, Shicheng Li3, Yu Chen3, Jiangyan Dai2, Yugen Yi3.
Abstract
The time series is a kind of complex structure data, which contains some special characteristics such as high dimension, dynamic, and high noise. Moreover, multivariate time series (MTS) has become a crucial study in data mining. The MTS utilizes the historical data to forecast its variation trend and has turned into one of the hotspots. In the era of rapid information development and big data, accurate prediction of MTS has attracted much attention. In this paper, a novel deep learning architecture based on the encoder-decoder framework is proposed for MTS forecasting. In this architecture, firstly, the gated recurrent unit (GRU) is taken as the main unit structure of both the procedures in encoding and decoding to extract the useful successive feature information. Then, different from the existing models, the attention mechanism (AM) is introduced to exploit the importance of different historical data for reconstruction at the decoding stage. Meanwhile, feature reuse is realized by skip connections based on the residual network for alleviating the influence of previous features on data reconstruction. Finally, in order to enhance the performance and the discriminative ability of the new MTS, the convolutional structure and fully connected module are established. Furthermore, to better validate the effectiveness of MTS forecasting, extensive experiments are executed on two different types of MTS such as stock data and shared bicycle data, respectively. The experimental results adequately demonstrate the effectiveness and the feasibility of the proposed method.Entities:
Mesh:
Year: 2022 PMID: 35463259 PMCID: PMC9023224 DOI: 10.1155/2022/5596676
Source DB: PubMed Journal: Comput Intell Neurosci
Figure 1The process of time series data preprocessing.
Figure 2The process of data sliding window for creating a time series data.
Figure 3The structure of the proposed network model.
Figure 4The structure of DAE.
Figure 5The structure of the LSTM unit.
Figure 6The structure of the GRU unit.
Figure 7The structure of CA.
Figure 8The structure of the prediction module.
The description of experimental environment.
|
|
|
|
| |
| Python | 3.6.0 |
| Tensorflow | 2.7.0 |
| System | Window 10 64 bit |
|
| |
|
|
|
|
| |
| PC machine | Inter core i9 9900k |
| RAM | 32 GB |
| GPU | GeForce RTX 2080 Ti GPU |
The settings of the key parameters in the training procedure.
| Description | Value |
|---|---|
| Batch-size | 256 |
| Optimizer | Adam |
| Epochs | 400 |
| Loss function | MSE |
The details of three stock datasets.
| Stock name | Stock code | Start and end time | Number of records |
|---|---|---|---|
| SCI-50 | 000016 | 2004.01.02–2021.06.23 | 4245 |
| CSI-300 | 399300 | 2002.01.07–2021.03.17 | 4657 |
| SZCI | 399001 | 1991.04.04–2021.06.23 | 7349 |
Some data and statistical information of SCI-50.
| Data | Closing price | Highest price | Lowest price | Opening price | Previous day's closing price | Change | Ups and downs |
|---|---|---|---|---|---|---|---|
| 2004/1/2 | 1011.347 | 1021.568 | 993.892 | 996.996 | 1000 | 11.347 | 1.1347 |
| 2004/1/5 | 1060.801 | 1060.898 | 1008.279 | 1008.279 | 1011.347 | 49.454 | 4.8899 |
|
|
|
|
|
|
|
|
|
| 2012/2/1 | 1713.684 | 1751.558 | 1709.536 | 1739.638 | 1744.708 | −31.024 | −1.7782 |
| 2012/2/2 | 1761.941 | 1761.941 | 1714.246 | 1719.999 | 1713.684 | 48.257 | 2.816 |
|
|
|
|
|
|
|
|
|
| 2015/2/2 | 2332.533 | 2376.426 | 2329.151 | 2337.196 | 2405.38 | −72.847 | −3.0285 |
| 2015/2/3 | 2405.76 | 2413.006 | 2335.107 | 2362.413 | 2332.533 | 73.227 | 3.1394 |
|
|
|
|
|
|
|
|
|
| 2021/6/21 | 3431.252 | 3455.565 | 3410.403 | 3440.744 | 3454.589 | −23.3363 | −0.6755 |
| 2021/6/22 | 3464.706 | 3469.808 | 3437.955 | 3444.75 | 3431.252 | 33.4535 | 0.975 |
|
| |||||||
| Count | 4245 | 4245 | 4245 | 4245 | 4245 | 4245 | 4245 |
| Mean | 2136.173 | 2156.355 | 2113.242 | 2134.459 | 2135.591 | 0.582177 | 0.043547 |
| Std | 811.6843 | 820.2789 | 801.5931 | 811.7199 | 811.6128 | 40.36138 | 1.685313 |
| Min | 700.434 | 706.879 | 693.528 | 699.266 | 700.434 | −296.696 | −9.4708 |
| 25% | 1600.299 | 1614.014 | 1586.092 | 1599.408 | 1599.012 | −13.545 | −0.7423 |
| 50% | 2127.203 | 2150.033 | 2101.088 | 2127.804 | 2127.094 | 0.493 | 0.0259 |
| 75% | 2692.54 | 2718.884 | 2666.817 | 2694.952 | 2692.181 | 16.22 | 0.8297 |
| Max | 4731.826 | 4772.933 | 4688.263 | 4726.083 | 4731.826 | 296.077 | 9.6729 |
Some data and statistical information of SZCI.
| Data | Closing price | Highest price | Lowest price | Opening price | Previous day's closing price | Change | Ups and downs |
|---|---|---|---|---|---|---|---|
| 1991/4/4 | 983.11 | 983.11 | 983.11 | 983.11 | 988.05 | −4.94 | −0.5 |
| 1991/4/5 | 978.27 | 978.27 | 978.27 | 978.27 | 983.11 | −4.84 | −0.4923 |
|
|
|
|
|
|
|
|
|
| 2010/1/4 | 13533.54 | 13782.81 | 13533.54 | 13766.1 | 13699.97 | −166.433 | −1.2148 |
| 2010/1/5 | 13517.38 | 13597.36 | 13324.56 | 13539.83 | 13533.54 | −16.162 | −0.1194 |
|
|
|
|
|
|
|
|
|
| 2016/1/4 | 11626.04 | 12659.41 | 11625.41 | 12650.72 | 12664.89 | −1038.85 | −8.2026 |
| 2016/1/5 | 11468.06 | 11687.48 | 11063.64 | 11116.9 | 11626.04 | −157.978 | −1.3588 |
|
|
|
|
|
|
|
|
|
| 2021/6/21 | 14641.29 | 14721.69 | 14468.74 | 14563.05 | 14583.67 | 57.6251 | 0.3951 |
| 2021/6/22 | 14696.29 | 14706.5 | 14564.5 | 14678.37 | 14641.29 | 54.9937 | 0.3756 |
|
| |||||||
| Count | 7349 | 7349 | 7349 | 7349 | 7349 | 7349 | 7349 |
| Mean | 6709.184 | 6778.63 | 6628.694 | 6704.283 | 6707.301 | 1.885397 | 0.05939 |
| Std | 4325.842 | 4369.826 | 4270.334 | 4322.335 | 4325.313 | 153.7217 | 2.1302 |
| Min | 402.5 | 408.02 | 397.67 | 401.57 | 402.5 | −1293.66 | −19.7807 |
| 25% | 3112.336 | 3134.055 | 3077.097 | 3112.637 | 3111.4 | −42.702 | −0.8978 |
| 50% | 4834.614 | 4867.142 | 4795.043 | 4836.637 | 4831.989 | 0.381 | 0.0112 |
| 75% | 10316.82 | 10410.65 | 10223.16 | 10315 | 10315.75 | 51.813 | 0.9835 |
| Max | 19531.16 | 19600.03 | 19203.11 | 19554.58 | 19531.16 | 1254.795 | 26.1963 |
Some data and statistical information on CSI-300.
| Data | Closing price | Highest price | Lowest price | Opening price | Previous day's closing price | Change | Ups and downs |
|---|---|---|---|---|---|---|---|
| 2002/1/7 | 1302.08 | 1302.08 | 1302.08 | 1302.08 | 1316.46 | −14.38 | −1.0923 |
| 2002/1/8 | 1292.71 | 1292.71 | 1292.71 | 1292.71 | 1302.08 | −9.37 | −0.7196 |
|
| … |
|
|
|
|
|
|
| 2009/3/2 | 2164.666 | 2177.294 | 2112.336 | 2123.367 | 2140.489 | 24.177 | 1.1295 |
| 2009/3/3 | 2142.154 | 2168.222 | 2100.644 | 2109.841 | 2164.666 | −22.512 | −1.04 |
|
|
|
|
|
|
|
|
|
| 2013/1/4 | 2524.409 | 2558.529 | 2498.892 | 2551.814 | 2522.952 | 1.457 | 0.0577 |
| 2013/1/7 | 2535.985 | 2545.969 | 2511.603 | 2518.047 | 2524.409 | 11.576 | 0.4586 |
|
|
|
|
|
|
|
|
|
| 2021/3/9 | 4970.999 | 5094.311 | 4917.909 | 5066.155 | 5080.025 | −109.025 | −2.1462 |
| 2021/3/10 | 5003.612 | 5055.279 | 4981.616 | 5047.059 | 4970.999 | 32.6127 | 0.6561 |
|
| |||||||
| Count | 4657 | 4657 | 4657 | 4657 | 4657 | 4657 | 4657 |
| Mean | 2762.711 | 2785.604 | 2734.602 | 2760.16 | 2761.898 | 0.812626 | 0.042789 |
| Std | 1187.877 | 1201.201 | 1171.218 | 1187.38 | 1187.571 | 52.6816 | 1.65268 |
| Min | 818.033 | 823.86 | 807.784 | 816.546 | 818.033 | −391.866 | −9.2398 |
| 25% | 1493.776 | 1507.972 | 1472.001 | 1481.582 | 1488.291 | −16.284 | −0.7247 |
| 50% | 2851.915 | 2888.093 | 2818.248 | 2848.155 | 2850.829 | 1.3386 | 0.069 |
| 75% | 3607.985 | 3648.027 | 3560.634 | 3605.372 | 3606.924 | 20.534 | 0.8142 |
| Max | 5877.202 | 5930.912 | 5815.609 | 5922.071 | 5877.202 | 378.179 | 9.3898 |
The results with different steps on SCI-50.
| Time step | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| 5 | 1682.935 | 41.024 | 27.188 |
|
| 10 |
|
|
| 1.025 |
| 15 | 1736.988 | 41.677 | 27.588 | 1.036 |
| 20 | 1757.061 | 41.917 | 28.304 | 1.062 |
| 25 | 1752.673 | 41.865 | 28.084 | 1.055 |
| 30 | 1780.636 | 42.198 | 28.547 | 1.072 |
Bold in the table indicates the optimal results.
The results with different steps on CSI-300.
| Time step | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| 5 | 3157.709 | 56.193 | 36.205 |
|
| 10 |
|
|
| 1.005 |
| 15 | 3233.284 | 56.862 | 36.904 | 1.025 |
| 20 | 3287.964 | 57.341 | 37.026 | 1.026 |
| 25 | 3438.429 | 58.638 | 39.390 | 1.082 |
| 30 | 3393.111 | 58.250 | 38.940 | 1.069 |
Bold in the table indicates the optimal results.
The results with different steps on SZCI.
| Time step | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| 5 | 34522.267 | 185.802 | 127.234 | 1.186 |
| 10 |
|
|
|
|
| 15 | 34495.000 | 185.730 | 128.299 | 1.190 |
| 20 | 34767.899 | 186.462 | 128.943 | 1.195 |
| 25 | 36065.960 | 189.910 | 132.394 | 1.226 |
| 30 | 36287.302 | 190.492 | 132.812 | 1.228 |
Bold in the table indicates the optimal results.
Figure 9The curves of loss values (MSE) on the training set and validation set of three stock datasets. (a) SCI-50. (b) CSI-300. (c) SZCI.
The results with step value of 10 on SCI-50.
| Method | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| GRU | 2356.925 | 48.548 | 35.958 | 1.328 |
| BiGRU | 2267.462 | 47.618 | 35.466 | 1.342 |
| GRU-AE | 2371.064 | 48.694 | 37.074 | 1.419 |
| BiGRU-AE | 1964.477 | 44.322 | 31.129 | 1.164 |
| GRU-AE-AM | 2040.477 | 45.172 | 31.334 | 1.164 |
| BiGRU-AE-AM | 1814.952 | 42.602 | 28.483 | 1.062 |
| Our method |
|
|
|
|
Bold in the table indicates the optimal results.
The results with step value of 10 on CSI-300.
| Method | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| GRU | 4262.664 | 65.289 | 46.799 | 1.264 |
| BiGRU | 3614.219 | 60.118 | 41.625 | 1.137 |
| GRU-AE | 3382.457 | 58.159 | 38.588 | 1.070 |
| BiGRU-AE | 3828.393 | 61.874 | 44.642 | 1.244 |
| GRU-AE-AM | 3798.575 | 61.633 | 41.392 | 1.127 |
| BiGRU-AE-AM | 3726.034 | 61.041 | 39.880 | 1.084 |
| Our method |
|
|
|
|
Bold in the table indicates the optimal results.
The results with step value of 10 on SZCI.
| Method | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| GRU | 37269.796 | 193.054 | 137.383 | 1.271 |
| BiGRU | 35012.771 | 187.114 | 126.924 |
|
| GRU-AE | 34737.291 | 186.379 | 128.821 | 1.203 |
| BiGRU-AE | 37163.139 | 192.777 | 134.793 | 1.257 |
| GRU-AE-AM | 35198.463 | 187.613 | 130.611 | 1.218 |
| BiGRU-AE-AM | 34946.619 | 186.940 | 131.015 | 1.216 |
| Our method |
|
|
|
|
Bold in the table indicates the optimal results.
The description of shared bicycle datasets.
| Dataset | Time | Quantity by hour |
|---|---|---|
| Longgang central city | 2016.6–2017.8 (except Dec.) | 6935 |
| Pingshan street | 2016.7–2017.8 (except Dec.) | 6935 |
| Zhaoshang street | 2016.7–2016.11 | 2907 |
The results with different steps of shared bicycle data on Longgang.
| Time step | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| 5 | 684.764 | 26.168 | 17.429 | 102.576 |
| 10 | 663.629 | 25.761 | 16.881 | 89.556 |
| 15 | 672.780 | 25.938 | 16.598 |
|
| 20 |
|
|
| 88.784 |
| 25 | 726.195 | 26.948 | 17.697 | 93.377 |
| 30 | 695.377 | 26.370 | 17.800 | 123.276 |
Bold in the table indicates the optimal results.
The results with different steps of shared bicycle data on Pingshan.
| Time step | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| 5 | 240.870 | 15.520 | 11.778 | 20.356 |
| 10 | 227.618 | 15.087 | 11.386 | 17.991 |
| 15 |
|
|
| 17.931 |
| 20 | 238.981 | 15.459 | 12.046 | 22.808 |
| 25 | 228.705 | 15.123 | 11.449 | 19.670 |
| 30 | 224.910 | 14.997 | 11.343 |
|
Bold in the table indicates the optimal results.
The results with different steps of shared bicycle data on Zhaoshang.
| Time step | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| 5 |
|
|
| 76.338 |
| 10 | 1084.648 | 32.934 | 22.286 |
|
| 15 | 1282.643 | 35.814 | 24.423 | 63.207 |
| 20 | 1201.246 | 34.659 | 23.586 | 63.110 |
| 25 | 1322.340 | 36.364 | 24.477 | 62.043 |
| 30 | 1430.125 | 37.817 | 25.936 | 67.414 |
Bold in the table indicates the optimal results.
The results with step 20 of shared bicycle data on Longgang.
| Method | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| GRU | 717.634 | 26.789 | 17.791 | 76.668 |
| BiGRU | 718.049 | 26.796 | 17.711 |
|
| GRU-AE | 784.713 | 28.013 | 18.660 | 106.267 |
| BiGRU-AE | 904.714 | 30.078 | 22.273 | 163.759 |
| GRU-AE-AM | 740.382 | 27.210 | 17.726 | 85.522 |
| BiGRU-AE-AM | 828.928 | 28.791 | 18.109 | 91.725 |
| Our method |
|
|
| 88.784 |
Bold in the table indicates the optimal results.
The results with step 15 of shared bicycle data on Pingshan.
| Method | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| GRU | 308.121 | 17.553 | 13.758 | 21.750 |
| BiGRU | 229.627 | 15.153 | 11.481 | 17.345 |
| GRU-AE | 275.273 | 16.591 | 12.690 | 19.307 |
| BiGRU-AE | 270.095 | 16.435 | 12.397 | 17.419 |
| GRU-AE-AM | 212.592 | 14.581 | 10.800 | 15.397 |
| BiGRU-AE-AM | 211.903 | 14.557 | 10.876 |
|
| Our method |
|
|
| 17.931 |
Bold in the table indicates the optimal results.
The results with step 5 of shared bicycle data on Zhaoshang.
| Method | MSE | RMSE | MAE | MAPE |
|---|---|---|---|---|
| GRU | 1174.327 | 34.268 | 24.864 | 55.381 |
| BiGRU | 1139.840 | 33.762 | 24.263 | 55.748 |
| GRU-AE | 1124.142 | 33.528 | 24.134 | 86.665 |
| BiGRU-AE | 1180.541 | 34.359 | 23.882 | 72.879 |
| GRU-AE-AM | 1241.616 | 35.237 | 23.773 | 46.250 |
| BiGRU-AE-AM | 1195.643 | 34.578 | 22.705 |
|
| Our method |
|
|
| 76.338 |
Bold in the table indicates the optimal results.