Bayesian Optimization of Temporal Features and Gradient Boosting for Short-Term Traffic Flow Prediction

Junhai Wang(1*), Putrama Alkhairi(2), Sankar Kumar Roy(3), Tutut Herawan(4),

(1) Department of Commerce and Circulation, Zhejiang Technical Institute of Economics, China
(2) Informatics Management, STIKOM Tunas Bangsa, Pematangsiantar, North Sumatra, Indonesia
(3) Department of Applied Mathematics, Vidyasagar University, Midanpore, India
(4) Faculty of Computer Science and Information Technology, Universiti Malaya, Kuala Lumpur, Malaysia
(*) Corresponding Author

Abstract


Accurate next-hour traffic forecasting requires temporal predictors that remain valid at prediction time and robust evaluation against strong controls. This study examines Bayesian optimization of lag features and Gradient Boosting for traffic-volume prediction using the UCI Metro Interstate Traffic Volume dataset. After duplicate-hour aggregation and feature construction, 34,669 hourly observations were divided chronologically into training (20,801), development (6,934), and held-out test (6,934) partitions. The experiment compared a seasonal reference, calendar–weather model, fixed Gradient Boosting baseline, Bayesian model-only tuning, random joint tuning, and Bayesian joint lag–model tuning. On the held-out test set, the proposed method achieved RMSE 221.438, MAE 143.215, R² 0.987247, and sMAPE 5.719%, reducing the baseline RMSE of 224.276 by 1.27%. Its 13 predictors also reduced the baseline feature count of 22 by 40.9%. Bayesian tuning of Gradient Boosting alone attained a slightly lower RMSE of 221.213 and MAE of 143.086, showing that joint optimization did not surpass the strongest control. The modest improvement and divergence between development and test rankings limit claims of general superiority. These findings support careful evaluation of feature parsimony and forecasting error without assuming that a more complex optimization strategy is necessarily better.

Full Text:

PDF

References


R. Liu and S.-Y. Shin, “A Review of Traffic Flow Prediction Methods in Intelligent Transportation System Construction,” Applied Sciences, vol. 15, no. 7, 2025, doi: 10.3390/app15073866.

A. Mystakidis, P. Koukaras, and C. Tjortjis, “Advances in Traffic Congestion Prediction: An Overview of Emerging Techniques and Methods,” Smart Cities, vol. 8, no. 1, 2025, doi: 10.3390/smartcities8010025.

M. Attioui and M. Lahby, “A Systematic Literature Review of Traffic Congestion Forecasting: From Machine Learning Techniques to Large Language Models,” Vehicles, vol. 7, no. 4, 2025, doi: 10.3390/vehicles7040142.

S. Afandizadeh, S. Abdolahi, and H. Mirzahossein, “Deep Learning Algorithms for Traffic Forecasting: A Comprehensive Review and Comparison with Classical Ones,” J. Adv. Transp., vol. 2024, 2024, doi: 10.1155/2024/9981657.

Y. García-Ramírez, “Artificial Intelligence and Machine Learning for Road Traffic Congestion Prediction and Forecasting: A Systematic Review of Methods, Validation, Explainability, and Reproducibility,” Encyclopedia, vol. 6, no. 9, 2026, doi: 10.3390/encyclopedia6090205.

A. Ali, A. Sharafian, H. M. Y. Naeem, M. Zakarya, Z. Wu, and X. Bai, “Advanced computational models for urban traffic flow prediction: A comprehensive review and future directions,” Comput. Sci. Rev., vol. 60, 2026, doi: 10.1016/j.cosrev.2025.100886.

K. Du et al., “Traffic prediction in time series, spatialtemporal, and OD data: A systematic survey,” Journal of Traffic and Transportation Engineering (English Edition), vol. 12, no. 3, pp. 666–700, 2025, doi: 10.1016/j.jtte.2025.03.001.

T. Matue, A. A. Akinyelu, and M. Mokotsolane, “Advances in intelligent transportation systems: ML and DL techniques for traffic congestion forecasting,” Int. J. Data Sci. Anal., vol. 22, 2026, doi: 10.1007/s41060-026-01203-9.

A. Sheehan, C. Jephcote, and J. Gulliver, “Development and evaluation of statistical models for international-scale road traffic flow estimation,” Environ. Int., vol. 210, 2026, doi: 10.1016/j.envint.2026.110231.

M. Leinonen, A. Al-Tachmeesschi, B. Turkmen, N. Atashi, and L. Ruotsalainen, “Long Short Term Memory Based Traffic Prediction Using Multi-Source Data,” International Journal of Intelligent Transportation Systems Research, vol. 23, pp. 354–371, 2025, doi: 10.1007/s13177-024-00451-y.

M. Lai, S. S. Wulff, Y. Cao, T. J. Robinson, and R. Rajapaksha, “Temporal cross-validation in forecasting: A case study of COVID-19 incidence using wastewater data,” Qual. Reliab. Eng. Int., 2025, doi: 10.1002/qre.3686.

B. Bischl et al., “Hyperparameter optimization: Foundations, algorithms, best practices, and open challenges,” WIREs Data Mining and Knowledge Discovery, vol. 13, no. 2, 2023, doi: 10.1002/widm.1484.

A. Hjort, J. Pensar, I. Scheel, and D. E. Sommervoll, “House price prediction with gradient boosted trees under different loss functions,” Journal of Property Research, vol. 39, no. 4, pp. 338–364, 2022, doi: 10.1080/09599916.2022.2070525.

J. Pan, X. Guo, H. Fu, Y. Zhang, and J. Zhang, “Machine learning prediction of building energy consumption by combining Bayesian optimization and the SHAP model,” Int. J. Green Energy, vol. 23, no. 8, pp. 1530–1545, 2026, doi: 10.1080/15435075.2026.2619448.

X. Lu, C. Chen, R. Gao, and Z. Xing, “Prediction of High-Speed Traffic Flow around City Based on BO-XGBoost Model,” Symmetry (Basel)., vol. 15, no. 7, 2023, doi: 10.3390/sym15071453.

B. Wang, P. Qian, Y. Cheng, Y. Qian, and J. Zhang, “A short-term traffic flow prediction network using filter-genetic feature selection method,” Urban Lifeline, vol. 3, 2025, doi: 10.1007/s44285-025-00049-0.

H. M. Khan, A. Khan, M. I. Majid, S. U. Haq, and M. H. Zafar, “A Bayesian-Optimized Long Short-Term Memory Deep Learning Model for Traffic Prediction in Intelligent Transportation,” Arab. J. Sci. Eng., 2026, doi: 10.1007/s13369-026-11437-1.

J. Klingwort and J. Burger, “A framework for population inference: Combining machine learning, network analysis, and non-probability road sensor data,” Comput. Environ. Urban Syst., vol. 103, 2023, doi: 10.1016/j.compenvurbsys.2023.101976.

L. Tay, J. M.-Y. Lim, S.-N. Liang, K. K. Chua, and Y. H. Tay, “Urban traffic volume estimation using intelligent transportation system crowdsourced data,” Eng. Appl. Artif. Intell., vol. 126, 2023, doi: 10.1016/j.engappai.2023.107064.

G. Dai, J. Tang, and W. Luo, “Short-term traffic flow prediction: An ensemble machine learning approach,” Alexandria Engineering Journal, vol. 74, pp. 467–480, 2023, doi: 10.1016/j.aej.2023.05.015.

Q. Shao et al., “An adaptive composite time series forecasting model for short-term traffic flow,” J. Big Data, vol. 11, 2024, doi: 10.1186/s40537-024-00967-w.

X. Zou, E. Chung, H. Ye, and H. Zhang, “Deep Learning for Traffic Prediction and Trend Deviation Identification: A Case Study in Hong Kong,” Data Science for Transportation, vol. 6, 2024, doi: 10.1007/s42421-024-00112-2.

Z. Qiu, Z. Xie, Z. Ji, X. Liu, and G. Wang, “Integrating query data for enhanced traffic forecasting: A Spatio-Temporal Graph Attention Convolution Network approach with delay modeling,” Knowl. Based. Syst., vol. 301, 2024, doi: 10.1016/j.knosys.2024.112315.

J. Lou, X. Zhang, R. Wang, Z. Liu, K. Zhao, and Q. Shen, “HSFE: A hierarchical spatial-temporal feature enhanced framework for traffic flow forecasting,” Inf. Sci. (N. Y)., vol. 679, 2024, doi: 10.1016/j.ins.2024.121070.

S. Du, T. Yang, F. Teng, J. Zhang, T. Li, and Y. Zheng, “Multi-scale feature enhanced spatio-temporal learning for traffic flow forecasting,” Knowl. Based. Syst., vol. 294, 2024, doi: 10.1016/j.knosys.2024.111787.

P. Moriano, A. Berres, H. Xu, and J. Sanyal, “Spatiotemporal features of traffic help reduce automatic accident detection time,” Expert Syst. Appl., vol. 244, 2024, doi: 10.1016/j.eswa.2023.122813.

S. Fang, W. Ji, S. Xiang, and W. Hua, “PreSTNet: Pre-trained Spatio-Temporal Network for traffic forecasting,” Information Fusion, vol. 106, 2024, doi: 10.1016/j.inffus.2024.102241.

D. Yu et al., “Modeling dynamic spatio-temporal correlations and transitions with time window partitioning for traffic flow prediction,” Expert Syst. Appl., vol. 252, 2024, doi: 10.1016/j.eswa.2024.124187.

G. Shi, L. Luo, Y. Song, J. Li, and S. Pan, “Deep transformer-based heterogeneous spatiotemporal graph learning for geographical traffic forecasting,” iScience, vol. 27, no. 7, 2024, doi: 10.1016/j.isci.2024.110175.

J. Xiao and B. Long, “A multi-channel spatial-temporal transformer model for traffic flow forecasting,” Inf. Sci. (N. Y)., vol. 671, 2024, doi: 10.1016/j.ins.2024.120648.

M. Xu, T. Z. Qiu, J. Fang, H. He, and H. Chen, “Signal-control refined dynamic traffic graph model for movement-based arterial network traffic volume prediction,” Expert Syst. Appl., vol. 228, 2023, doi: 10.1016/j.eswa.2023.120393.

Y. Qin, H. Luo, F. Zhao, Y. Fang, X. Tao, and C. Wang, “Spatio-temporal hierarchical MLP network for traffic forecasting,” Inf. Sci. (N. Y)., vol. 632, pp. 543–554, 2023, doi: 10.1016/j.ins.2023.03.063.

W. Li et al., “Enhancing traffic flow prediction through multi-view attention mechanism and dilated convolutional networks,” Complex & Intelligent Systems, vol. 12, 2026, doi: 10.1007/s40747-025-02146-7.

Y. Wang, J. Hu, F. Teng, L. Peng, S. Du, and T. Li, “KaTaGCN: Knowledge-Augmented and Time-Aware Graph Convolutional Network for efficient traffic forecasting,” Information Fusion, vol. 111, 2024, doi: 10.1016/j.inffus.2024.102542.


Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Zahra: Bulletin Big data, Data Science and Artificial Intelligence

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.