Research Article

Stock Prediction Based on Optimized LSTM and GRU Models

Table 4

Learning results of LASSO-GRU.

Number of layersNumber of neuronsLook-back valueTrain MSETrain RMSETrain MAETest MSETest RMSETest MAETrain time

38101293.780235.969223.8084831.706228.839320.3225117.7369
38201444.412538.005425.5757910.988630.182621.6005249.3114
38301123.823233.523522.7495826.198628.743720.0954402.0947
38401482.583638.504327.8070943.866830.722420.9493508.5391
38501280.065735.778024.5826978.312731.278024.1942657.0113
28101377.298537.112024.9828834.275328.883820.080390.3936
28201136.973133.719022.8381799.183428.269819.5676200.8435
28301245.380935.290023.5962864.609129.404220.8457276.3479
28401500.872638.741126.32631093.249833.064323.7652350.2043
28501239.857535.211623.4242845.882529.084120.5453431.4074
316101138.961533.748522.0896753.700427.453619.1470378.2382
316201192.851434.537724.79561015.763931.871123.3095783.4717
31630985.859731.398421.1888883.428529.722522.01791198.1594
316401038.719132.229221.6453802.512128.328619.86181622.0595
316501116.042033.407222.7048792.447328.150420.00952032.0963
216101233.546735.121923.9346833.034228.862319.9071207.6725
216201104.472233.233623.2089869.426929.486021.8385433.1125
216301114.160233.379022.0850796.863028.228820.7113668.5479
216401072.471732.748623.0368802.499828.328419.72361073.6516
21650979.388231.295221.5892844.809529.065619.70651373.0419
33210924.589130.407120.6728831.014628.827320.2939277.7194
33220862.205629.363320.48951081.112332.880324.4835526.1457
33230907.103130.118221.28141127.495733.578223.5790797.8424
33240847.783429.116721.02601012.236531.815721.72141066.6936
33250810.523228.469720.33461196.492734.590424.47211349.8547
23210969.957631.144120.7674777.385127.881619.5336367.9321
23220985.321531.389821.8014829.021628.792720.1274890.5871
23230861.635729.353620.5396952.953430.869922.59851362.8664
232401149.702733.907324.3771821.375728.659720.07521392.1843
23250883.307129.720520.3320833.843928.876420.48381596.1727

The number of epochs is 1000, learning rate is 0.001, and the activation function is .