# Impacts of Weather on Short-Term Metro Passenger Flow Forecasting Using a Deep LSTM Neural Network
## 4 Experimental Results and Discussion
### Results of Using Weather Variables  
As shown in Figure 3, the passenger flow on rainy days is quite different than on days without any rain. Adverse weather conditions may have great impacts on daily commutes. Thus, making a more accurate passenger flow forecast on rainy days is useful. The training data and testing data used for rainy days are shown in Table 6. To comprehensively discuss the different combinations of weather variables on passenger flow forecasting, 31 models were built and categorized as three groups using the proposed deep LSTM_NN on rainy days. Model_1 in Group_1 was built without using any weather variable, in order to make a comparison with the models using weather variables. Models 2-16 in \begin{table}
\begin{tabular}{c c c} \hline \hline
**No.** & **Parameters** & **Values** \\ \hline
1 & epochs & [500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, \\
2 & batch size & \{32, 64, 128, 256, 512\} \\
3 & activation & \{relu, tanh, sigmoid\} \\
4 & recurrent\_activation & \{relu, tanh, sigmoid\} \\
5 & learning rate & \{0.001, 0.002, 0.003, 0.004, 0.005\} \\  & & \{(50), (100), (200), (250), (256,128,64,10), \\  & & (256,128,64,32), \\
6 & hidden nodes & (256,128,64,32,10), (256,128,64), (256,256,256), \\  & & (258,126)] \\
7 & number of hidden layers & \{1, 2, 3, 4\} \\
8 & optimizer & \{RMSprop, adam, adamx, adagrad, SGD\} \\
9 & dropout & \{0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9\} \\
10 & momentum & \{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9\} \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Tuning parameters in the deep LSTM_NN and one-layer LSTM_NN. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**No.** & **Parameters** & \multicolumn{4}{c}{**Best Tuning Results**} \\ \cline{3-5}  & & **Deep LSTM\_NN** & **One-layer** & **RF** \\ \hline
1 & epochs & 1000 & 3500 & \(\times\) \\
2 & batch size & 256 & 128 & \(\times\) \\
3 & activation & tanh & relu & \(\times\) \\
4 & recurrent\_activation & hard\_sigmoid & hard\_sigmoid & \(\times\) \\
5 & learning rate & 0.001 & 0.001 & \(\times\) \\
6 & hidden nodes & (256,128,64) & (100) & \(\times\) \\
7 & number of hidden & 3 & 1 & \(\times\) \\
8 & optimizer & adam & adam & \(\times\) \\
9 & dropout & 0.05 & 0.05 & \(\times\) \\
10 & momentum & 0.9 & 0 & \(\times\) \\
11 & max\_features & \(\times\) & \(\times\) & 3 \\
12 & n\_estimators & \(\times\) & \(\times\) & 6500 \\ \cline{2-5} Evaluation Criteria & RMSE & 490.77 & 517.63 & 538.75 \\  & MAPE & 0.0547 & 0.0629 & 0.0555 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Best tuning results of the parameters in the deep LSTM_NN, one-layer LSTM_NN, and RF. Group_2 were built with different combinations of current hourly weather variables, and Models 17-31 in Group_3 were built with different combinations of previous one-hour weather variables. The tuning parameters of the proposed deep LSTM_NN are shown in Table 4. The best grid result is a group of the following parameters: (1) epochs: 4500; (2) batch_size: 256; (3) activation function (\(\int_{1}\)): tanh; (4) recurrent_activation function (\(\int_{2}\)): hard_sigmoid; (5) learning rate: 0.003; (6) hidden nodes: (256, 128, 64); (7) number of hidden layers: 3; (8) optimizer: adam; (9) dropout: 0.5; and (10) momentum = 0.9. The used loss function is mean_squared_error. Table 7 shows the experimental results of Models 1-16. Unfortunately, both RMSE and MAPE of the forecast performance in Models 6, 7, and 9-16 was not improved by adding the current hourly weather variables, especially for the combined weather variables as the inputs in comparison with RMSE and MAPE in Model_1. However, adding a single weather variable, such as \(v_{Temp}\) (MAPE in Model_2), \(v_{Rain}\) (RMSE in Model_3), \(v_{Hum}\) (MAPE in Model_4), or \(v_{Wind}\) (RMSE in Model_5), and the combined weather variable of \(v_{Temp}\) and \(v_{Wind}\) (RMSE in Model_8), can improve the forecasting results slightly.