# An Intelligent Time-Series Model for Forecasting Bus Passengers Based on Smartcard Data
## 4 Experimental Comparison
### Experimental Results  
The experiments involved nine data series based on three routes with three different day types; each data series was partitioned into 80% training data and 20% testing data by time sequence. Based on Steps 4 and 5, which were presented in Section 3, this section presents the experimental results. The results of 80 combined models for Route 1 for weekly data are shown in Table 5. In terms of RMSE, the top three best results were LSTM with lag 7, LSTM with lag 6, and LSTM with lag 5. For MAPE, the top three best results were LSTM with lag 7, LSTM with lag 6, and MLP_1_lin with lag 4 for the MAPE. We used Equation (1) to adapt the forecast data of the top three best forecast models to the minimal RMSE and MAPE. Similarly, the other two data series for Route 1 were experimented with based on Steps 4 and 5. Finally, the forecast data for the top three forecast models under the minimal RMSE were collected, and the results for Route 1 are shown in Table 6. The results show that the proposed model performed better than the listed models for Route 1, and the top three models were LSTM intelligent forecast methods. (2) Route 7  
As with the Route 1 experiment, we applied the proposed model to adapt the forecast data from the top three best forecast models for three data series of Route 7 using the minimal RMSE. The results are shown in Table \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & **Week** & \multicolumn{4}{c}{**Weekday**} & \multicolumn{4}{c}{**Holiday**} \\ \hline LSTM & RMSE & 117.833 & LSTM & RMSE & 107.196 & LSTM & RMSE & 121.741 \\ lag? & MAPE & **37.901** & lag 1 & MAPE & 29.631 & lag 4 & MAPE & 52.935 \\ LSTM & RMSE & 119.873 & LSTM & RMSE & 109.904 & LSTM & RMSE & 121.767 \\ lag 6 & MAPE & 38.999 & lag 7 & MAPE & 28.371 & lag 6 & MAPE & 53.773 \\ LSTM & RMSE & 131.381 & LSTM & RMSE & 110.222 & LSTM & RMSE & 121.943 \\ lag 5 & MAPE & 48.909 & lag 2 & MAPE & 29.768 & lag 5 & MAPE & 52.555 \\ Proposed & RMSE & **79.963** & Proposed & RMSE & **78.179** & & & & **60.968** \\  & MAPE & 38.126 & MAPE & **26.025** & & & & MAPE & **41.958** \\ \hline \hline \end{tabular} \
\begin{tabular}{c c c c c c c} \hline \hline  & & & & & & & & \\ \hline \hline \end{tabular}
\begin{tabular}{c} Model abbreviation is shown in Table 4, and the bold digits denote the optimal results among the four models for RMSE and MAPE.  
\end{table} 
Table 8: Results of proposed model for Route 52 based on minimal RMSE. (2) Lag period  
From the lag period test results shown in Table 3, it can be seen that the number of lag periods is consistent with the different time-series data. We can see that the lag period is seven for the weekly data (a week has seven days); the holiday data are organized by Saturdays and Sundays and have a lag period of two; the lag period for the weekday data is five. We checked whether the lag period is consistent with the number of lags for the top three models; if the same lag periods exist, then the data have seasonal variation (seasonality). Seasonality means that the time series data have periodic, repetitive, and predictable patterns [43]. We summarized the data from Tables 6-8, and the lag period results for the top three models for each route for different time series are shown in Table 10.  
Based on Table 10, it can be seen that the weekly data for Routes 1 and 52 are consistent with the number of days in a week, as the number of lags is seven. This means that the weekly time-series data for Routes 1 and 52 have a weekly seasonal variation (seasonality), as shown in 6. Thus, it is necessary to add the passenger flow lag periods to forecast the number of passengers. (3) Model performance  
From Table 10, we can see that most of the top three models used LSTM, because LSTM is suitable for processing and predicting important events with very long intervals and delays in the time series [44]. Furthermore, the proposed model was found to be better than the listed models for each route for different time series, as shown in Tables 6-8.