## 3 Materials and Methods
### Proposed Model Architecture  
Two data types are relied upon for the predictive performance of the proposed models: temporal variables and external meteorological parameters. These two databases were merged to form a combined dataset consisting of 10,440 hourly records. To handle missing values, the K-Nearest Neighbors (KNN) approach was implemented, which estimates missing observations based on the overall patterns within the dataset [55]. Once the data  
\begin{table}
\begin{tabular}{c c} \hline
**Hyperparameter** & **Value** \\ \hline Number of estimators & 1000 \\ Max depth & 7 \\ Learning rate & 0.01 \\ Reg lambda & 1 \\ Colsample bytree & 0.9 \\ Reg alpha & 1 \\ Min child weight & 1 \\ Subsample & 0.8 \\ \hline \end{tabular}
\end{table}
Table 3: Optimal hyperparameters for XGBoost.  
Figure 6: Importance of the input parameters in the XGBoost model.  
were prepared, it was separated into training and testing sets in an 80:20 ratio. Because model performance is highly influenced by the accuracy of data standardization, the Min-Max normalization method was applied during the preprocessing phase prior to constructing the models [56]. Subsequently, all variables were scaled using this method to ensure consistency across the datasets.  
In the next phase, the LSTM model was initially used to predict passenger flow for bus and train services, based on selected parameters. Subsequently, to identify the best-performing model, three additional state-of-the-art deep learning models--RNN, GRU, and NARX--were incorporated for comparative analysis. Figure 7 displays a visual representation of the methodological framework and forecasting steps of this study.  
Among deep learning methods, RNN, LSTM, and GRU architectures hold a central position in passenger flow forecasting. The LSTM model was selected due to its proven effectiveness in capturing temporal dependencies in sequential data. Its ability to retain relevant information over extended periods renders it highly effective for modeling the dynamic and nonlinear nature of public transportation demand [38; 39; 57]. The GRU model, on the other hand, was included in the study as a more computationally efficient alternative to LSTM. GRU has proven effective in short-term forecasting tasks, especially in contexts with frequent intra-day variability, and has yielded accurate passenger flow forecasts [58]. Although the NARX model has been prevalent in fields such as energy forecasting and load prediction, its application to short-term public transport passenger flow has been scarcely addressed [59; 60]. Considering its ability to integrate external inputs and historical values, the NARX architecture was selected to examine whether its superior performance in other domains could be replicated in the context of public transportation. This model  
Figure 7: Flowchart of the forecasting model.  
was included to investigate an underexplored method and to compare its effectiveness with more commonly used deep learning models such as LSTM, GRU, and RNN.  
The widely used RNN architecture is adopted by this study for time series data, and it performs a thorough analysis using LSTM, GRU, and NARX models, which are adept at capturing long-term dependencies.  
To prevent overfitting during training, early stopping and a learning rate adaptation strategy that reduces the learning rate when the validation performance plateaus (_ReduceLROnPlateau_) were employed. These techniques were adopted to enhance both the generalization capability of the models and the efficiency of the training process.