## 4 Experiment and Results
### Results
This graph visually compares the performance of the five models for predicting bus arrival times, highlighting that the BAT-Transformer model outperformed the others with the fastest decrease in RMSE. The Transformer and LSTM models show a steady improvement in performance, with the Transformer model outperforming the other models until the last epoch. The FCNN and GRU models showed rapid performance improvement in the early epochs, but the performance improvement tended to slow down in the later epochs. In this study, we used k-fold cross-validation to ensure the model's generalization performance and prevent overfitting, and we chose a k-value of five to more reliably evaluate the model's performance. This cross-validation process ensured consistent performance across different data partitions and ensured that the model learned general patterns without being biased toward specific data. As shown in Table 1, the average RMSE obtained through cross-validation was 95.14, while the final model trained using the full dataset resulted in an RMSE of 92. These results suggest that when the model is trained on the full data, it has slightly better predictive performance than the average performance found through cross-validation. In particular, the difference between the RMSE from cross-validation and the RMSE of the final training model indicates that the model maintained consistent performance during cross-validation, indicating that the final model has high predictive accuracy. Similarly, the final MAPE was 35%, which is lower than the average MAPE of 37.87% in cross-validation, indicating that the model maintained a relatively low prediction error on the overall data. The coefficient of determination (R\({}^{2}\)) value was also higher in the final model (0.83) than the cross-validation average (0.8158), indicating that the model better explained the variability in the data. The time-weighted error (TWE) was also 66 in the final model, which is lower than the cross-validation average of 69.56, indicating improved prediction performance during critical time periods and confirming that the model has been cross-validated to reflect the importance of different time periods. This indicates that the model was trained reliably without overfitting, and we can see that it has reliable prediction performance in a variety of environments. Furthermore, Table 2 compares the performance of the proposed BAT-Transformer model with that of five other models across five evaluation metrics: loss, RMSE, MAPE, R\({}^{2}\), and TWE. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Fold** & **Validation Loss** & **Validation RMSE** & **Validation MAPE (\%)** & **Validation R\({}^{2}\)** & **Validation TWE** \\ \hline
1 & 8688.38 & 91.58 & 36.12 & 0.8295 & 66.76 \\ \hline
2 & 9159.24 & 94.12 & 37.86 & 0.8203 & 68.77 \\ \hline
3 & 10,468.05 & 100.70 & 38.08 & 0.7937 & 73.73 \\ \hline
4 & 9543.85 & 96.02 & 42.39 & 0.8126 & 70.92 \\ \hline
5 & 9014.87 & 93.28 & 34.88 & 0.8228 & 67.61 \\ \hline Average & 9374.88 & 95.14 & 37.87 & 0.8158 & 69.56 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: BAT-Transformer cross-validation with 5 folds. The proposed BAT-Transformer model performed well on metrics such as loss, RMSE, MAPE, and TWE. The loss of the BAT-Transformer was 8722.7, which is significantly lower than the other five models, indicating that the model was optimized more effectively during the learning process. In addition, the RMSE and MAPE metrics, which represent the accuracy of the prediction, were 92 and 35, respectively, showing excellent performance compared to the existing models. In particular, in terms of Time Weighted Error (TWE), BAT-Transformer recorded the lowest value of 66, demonstrating its superiority in time-based prediction performance.