Interpretable machine learning for identifying the determinants of bus delays

Authors

DOI:

https://doi.org/10.61089/aot2026.mnrkh112

Keywords:

public transport reliability, travel time variability, SHAP, temporal cross-validation, urban bus operations

Abstract

The study proposes an interpretable machine-learning approach for predicting bus arrival delays based on the Automatic Vehicle Location (AVL) system. The data describe vehicle movements and schedule adherence at successive stops, enabling delay estimation both along the route and across different time periods. Delays are defined as deviations between observed arrival times and scheduled times at individual stops, allowing both spatial and temporal delay patterns to be examined. The approach integrates ensemble machine-learning models with nested, temporally aware cross-validation and hyperparameter optimization. This validation strategy preserves the temporal order of observations, ensuring that model evaluation reflects realistic forecasting conditions and avoids information leakage. In particular, training and test sets are separated along the time axis, preventing future observations from influencing model training. Three ensemble models—Random Forest, XGBoost, and CatBoost—achieved comparable accuracy (RMSE ≈ 5.4 min; MAE ≈ 3.6 min; R² ≈ 0.44). Model performance was evaluated at the level of individual stop arrivals, reflecting short-term delay prediction under operational conditions. Comparable performance across models indicates that the observed patterns are not specific to a single modelling technique. This consistency suggests that the identified delay patterns are robust with respect to model choice rather than driven by algorithm-specific assumptions. The results show that the proposed approach enables the identification of combined temporal and spatial feature interactions associated with bus delay magnitudes within the analysed case study. These interactions mainly involve time-of-day effects and stop sequence, illustrating how delays accumulate as vehicles progress along the route. This pattern reflects the cumulative nature of delays in mixed-traffic operations, where early disturbances propagate toward downstream stops. SHAP values were used to provide a quantitative interpretation of these interactions and to identify the most influential predictors in the analysed models. The analytical structure, designed around weekly data partitions, supports delay monitoring and operational analysis. The results indicate that the proposed approach can support the analysis and interpretation of bus delay patterns within similar operational contexts.

References

1. Aemmer, Z., Ranjbari, A., & MacKenzie, D. (2022). Measurement and classification of transit delays using GTFS-RT data. Public Transport, 14(2), 263–285. https://doi.org/10.1007/s12469-022-00291-7

2. Almeida, A., Brás, S., Sargento, S., & Oliveira, I. (2023). Exploring bus tracking data to characterize urban traffic congestion. Journal of Urban Mobility, 4, 100065. https://doi.org/10.1016/j.urbmob.2023.100065

3. Antypas, E., Spanos, G., Lalas, A., Votis, K., & Tzovaras, D. (2024). A time-series approach for estimated time of arrival prediction in autonomous vehicles. 78, 166–173. https://doi.org/10.1016/j.trpro.2024.02.022

4. Bergmeir, C., & Benítez, J. M. (2012). On the use of cross-validation for time series predictor evaluation. Information Sciences, 191, 192–213. https://doi.org/10.1016/j.ins.2011.12.028

5. Breiman, L. (2001). Random Forests. Machine Learning, 45(1), 5–32. https://doi.org/10.1023/A:1010933404324

6. Chen, T., & Guestrin, C. (2016). XGBoost: A Scalable Tree Boosting System. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 785–794. https://doi.org/10.1145/2939672.2939785

7. Chen, X., Saidi, S., & Sun, L. (2025). Understanding bus delay patterns under different temporal and weather conditions: A Bayesian Gaussian mixture model. Transportation Research Part C: Emerging Technologies, 171, 105000. https://doi.org/10.1016/j.trc.2025.105000

8. Chung, Y.-S., & Chiang, Y.-C. (2024). Characterizing spatiotemporal patterns of bus bunching frequency on a bus route network: A case study of Taipei city. Asian Transport Studies, 10, 100139. https://doi.org/10.1016/j.eastsj.2024.100139

9. Drabicki, A. A., Islam, M. F., & Szarata, A. (2021). Investigating the Impact of Public Transport Service Disruptions upon Passenger Travel Behaviour—Results from Krakow City. Energies, 14(16), 4889. https://doi.org/10.3390/en14164889

10. Figliozzi, M., Feng, W., & Laferriere, G. (2021). A Study of Headway Maintenance for Bus Routes: Causes and Effects of ”Bus Bunching” in Extensive and Congested Service Areas. https://rosap.ntl.bts.gov/view/dot/24701/dot_24701_DS1.pdf

11. Figliozzi, M., Feng, W., Laferriere, G., & Feng, W. (2012). A Study of Headway Maintenance for Bus Routes: Causes and Effects of “Bus Bunching” in Extensive and Congested Service Areas. Portland State University Library. https://doi.org/10.15760/trec.107

12. Fonzone, A., Schmöcker, J.-D., & Liu, R. (2015). A model of bus bunching under reliability-based passenger arrival patterns. Transportation Research Part C: Emerging Technologies, 59, 164–182. https://doi.org/10.1016/j.trc.2015.05.020

13. Ge, L., Voß, S., & Xie, L. (2022). Robustness and disturbances in public transport. Public Transport (Heidelberg, Germany), 14(1), 191–261. https://doi.org/10.1007/s12469-022-00301-8

14. Grinsztajn, L., Oyallon, E., & Varoquaux, G. (2022). Why do tree-based models still outperform deep learning on tabular data? (Version 1). arXiv. https://doi.org/10.48550/ARXIV.2207.08815

15. Harris, C. R., Millman, K. J., Van Der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N. J., Kern, R., Picus, M., Hoyer, S., Van Kerkwijk, M. H., Brett, M., Haldane, A., Del Río, J. F., Wiebe, M., Peterson, P., … Oliphant, T. E. (2020). Array programming with NumPy. Nature, 585(7825), 357–362. https://doi.org/10.1038/s41586-020-2649-2

16. Hunter, J. D. (2007). Matplotlib: A 2D Graphics Environment. Computing in Science & Engineering, 9(3), 90–95. https://doi.org/10.1109/MCSE.2007.55

17. Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: Principles and practice. OTexts.

18. Jeong, R., & Rilett, L. R. (2005). Prediction Model of Bus Arrival Time for Real-Time Applications. Transportation Research Record: Journal of the Transportation Research Board, 1927(1), 195–204. https://doi.org/10.1177/0361198105192700123

19. Kaufman, S., Rosset, S., Perlich, C., & Stitelman, O. (2012). Leakage in data mining: Formulation, detection, and avoidance. ACM Transactions on Knowledge Discovery from Data, 6(4), 1–21. https://doi.org/10.1145/2382577.2382579

20. Kluyver, T., Ragan-Kelley, B., Pérez, F., Granger, B. E., Bussonnier, M., Frederic, J., Kelley, K., Hamrick, J. B., Grout, J., Corlay, S., Ivanov, P., Avila, D., Abdalla, S., Willing, C., & Team, J. D. (2016). Jupyter Notebooks—A publishing format for reproducible computational workflows. International Conference on Electronic Publishing.

21. Lundberg, S., & Lee, S.-I. (2017). A Unified Approach to Interpreting Model Predictions (Version 2). arXiv. https://doi.org/10.48550/ARXIV.1705.07874

22. Lundberg, S. M., Erion, G., Chen, H., DeGrave, A., Prutkin, J. M., Nair, B., Katz, R., Himmelfarb, J., Bansal, N., & Lee, S.-I. (2019). Explainable AI for Trees: From Local Explanations to Global Understanding (Version 1). arXiv. https://doi.org/10.48550/ARXIV.1905.04610

23. Matseliukh, Y., Lytvyn, V., Hu, Z., & Bublyk, M. (2025). Predictive Modelling and Factor Analysis of Public Transport Delays in Smart City Using Interpretable Machine Learning. International Journal of Information Technology and Computer Science, 17(6), 1–28. https://doi.org/10.5815/ijitcs.2025.06.01

24. McKinney, W. (2010). Data Structures for Statistical Computing in Python. 56–61. https://doi.org/10.25080/Majora-92bf1922-00a

25. Park, Y., Mount, J., Liu, L., Xiao, N., & Miller, H. J. (2020). Assessing public transit performance using real-time data: Spatiotemporal patterns of bus operation delays in Columbus, Ohio, USA. International Journal of Geographical Information Science, 34(2), 367–392. https://doi.org/10.1080/13658816.2019.1608997

26. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Müller, A., Nothman, J., Louppe, G., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, É. (2011). Scikit-learn: Machine Learning in Python. https://doi.org/10.48550/ARXIV.1201.0490

27. Prokhorenkova, L., Gusev, G., Vorobev, A., Dorogush, A. V., & Gulin, A. (2017). CatBoost: Unbiased boosting with categorical features (Version 5). arXiv. https://doi.org/10.48550/ARXIV.1706.09516

28. Rezazada, M., Nassir, N., Tanin, E., & Ceder, A. (Avi). (2024). Bus bunching: A comprehensive review from demand, supply, and decision-making perspectives. Transport Reviews, 44(4), 766–790. https://doi.org/10.1080/01441647.2024.2313969

29. Rosenblum, J. L., Allen, D. W., Bennett, T. L., Warade, R. K., & Stoughton, C. M. (2015). Method for Assessing Bus Delay in Mixed Traffic to Identify Transit Priority Improvement Locations in Cambridge, Massachusetts. Transportation Research Record: Journal of the Transportation Research Board, 2533(1), 60–67. https://doi.org/10.3141/2533-07

30. Serin, F., Alisan, Y., & Erturkler, M. (2022). Predicting bus travel time using machine learning methods with three-layer architecture. Measurement, 198, 111403. https://doi.org/10.1016/j.measurement.2022.111403

31. Singh, N., & Kumar, K. (2022). A review of bus arrival time prediction using artificial intelligence. WIREs Data Mining and Knowledge Discovery, 12(4), e1457. https://doi.org/10.1002/widm.1457

32. Sun, Y., Spall, J., Wong, W., & Zhao, X. (2025). Real-time Bus Travel Time Prediction and Reliability Quantification: A Hybrid Markov Model (Version 1). arXiv. https://doi.org/10.48550/ARXIV.2503.05907

33. Toledano, J. S., Monedero, B. D., Flores - Ureba, S., & De Blas, C. S. (2025). The efficiency of urban public transport and its impact on environmental sustainability. Sustainable Technology and Entrepreneurship, 4(2), 100097. https://doi.org/10.1016/j.stae.2025.100097

34. Varma, S., & Simon, R. (2006). Bias in error estimation when using cross-validation for model selection. BMC Bioinformatics, 7(1), 91. https://doi.org/10.1186/1471-2105-7-91

35. Vijaya, A., Bhattarai, S., Angreani, L. S., & Wicaksono, H. (2024). Enhancing Transparency in Public Transportation Delay Predictions with SHAP and LIME. 2024 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM), 1285–1289. https://doi.org/10.1109/IEEM62345.2024.10857000

36. Warnakulasuriya, A. K., Weerasinghe, C. D. R. M., Wickramarathna, H. K. G. V. L., Ratneswaran, S., & Thayasivam, U. (2024). Explainable Bus Arrival Time Prediction Model with Improved Features Related to Topography and Points of Interest. 2024 IEEE 27th International Conference on Intelligent Transportation Systems (ITSC), 2131–2136. https://doi.org/10.1109/ITSC58415.2024.10920146

37. Warsaw City Council. (n.d.). Warsaw Open Data Repository [Data set]. Retrieved 29 October 2025, from https://api.um.warszawa.pl/

38. Waskom, M. (2021). seaborn: Statistical data visualization. Journal of Open Source Software, 6(60), 3021. https://doi.org/10.21105/joss.03021

39. Yap, M., & Cats, O. (2021). Predicting disruptions and their passenger delay impacts for public transport stops. Transportation, 48(4), 1703–1731. https://doi.org/10.1007/s11116-020-10109-9

40. Zhang, Q., Ma, Z., Ling, Y., Qin, Z., Zhang, P., & Zhao, Z. (2025). Causal Graph Discovery for Urban Bus Operation Delays: A Case Study in Stockholm. Transportation Research Record: Journal of the Transportation Research Board, 2679(5), 256–272. https://doi.org/10.1177/03611981241306754

41. Zhang, Q., Ma, Z., Zhang, P., Ling, Y., & Jenelius, E. (2024). Real-time bus arrival delays analysis using seemingly unrelated regression model. Transportation. https://doi.org/10.1007/s11116-024-10507-3

42. Zhang, Y., Xu, H., Lu, Q.-C., & Fan, X. (2022). Travel Time Reliability Analysis Considering Bus Bunching: A Case Study in Xi’an, China. Sustainability, 14(23), 15583. https://doi.org/10.3390/su142315583

43. Zhou, Z., & Hooker, G. (2019). Unbiased Measurement of Feature Importance in Tree-Based Methods (Version 2). arXiv. https://doi.org/10.48550/ARXIV.1903.05179

44. Zhu, L., Shu, S., & Zou, L. (2022). XGBoost‐Based Travel Time Prediction between Bus Stations and Analysis of Influencing Factors. Wireless Communications and Mobile Computing, 2022(1), 3504704. https://doi.org/10.1155/2022/3504704

Downloads

Published

2026-03-30

Data Availability Statement

This study uses publicly available data, which are described in the referenced bibliography. These datasets can be accessed without restrictions from the repositories indicated in the cited sources. Processed data used in the analyses can be made available by the authors upon reasonable request.

Issue

Section

Original articles

How to Cite

Czerepicki, A. ., Martyanov, V., Budzyński, A., & Kozłowski, M. (2026). Interpretable machine learning for identifying the determinants of bus delays. Archives of Transport, 77(1), 7-26. https://doi.org/10.61089/aot2026.mnrkh112

Share

Similar Articles

1-10 of 439

You may also start an advanced similarity search for this article.

No Related Submission Found