Weather-Aware Machine Learning for Urban Traffic Volume Prediction and Congestion Analysis

Authors

  • Dilli Ram Rai Jana Chetana Secondary School and Pursuing Author
  • Maudhy Satyadharma Dinas Perhubungan Provinsi Sulawesi Tenggara Author
  • Edward Francis G. Gabor Pamantasan ng Cabuyao Author https://orcid.org/0009-0001-0993-1018

DOI:

https://doi.org/10.65310/wdt0rs27

Keywords:

Congestion, Machine Learning, Traffic Volume Prediction, Weather, Intelligent Transportation Systems.

Abstract

Hourly traffic prediction is periodic, yet weather disturbances can alter traffic demand and prediction error, creating implications for congestion management. This study evaluates weather-aware machine-learning models using a deterministic 48,204-record benchmark calibrated to the variable definitions, coverage, and scale of the UCI Metro Interstate Traffic Volume dataset. The benchmark incorporates traffic volume, temperature, rainfall, snowfall, cloud cover, weather classes, holidays, calendar variables, lagged observations, and rolling traffic means. Chronological training, validation, testing, and walk-forward evaluation were applied to prevent future information leakage and assess temporal stability. Ridge regression, Random Forest, Extra Trees, Gradient Boosting, HistGradientBoosting, and a 24-hour persistence baseline were compared using RMSE, MAE, R², and sMAPE. HistGradientBoosting achieved the lowest test error, with RMSE of 364.34 vehicles/hour, MAE of 287.64 vehicles/hour, and R² of 0.949. Adding weather variables to calendar and traffic-history features reduced RMSE by 3.39%. Congestion detection using the 80th-percentile threshold achieved precision of 0.898, recall of 0.807, and F1 of 0.850. Errors were highest during thunderstorms and fog, while weather-sensor perturbation increased RMSE by 3.93%. The findings indicate that weather provides incremental contextual information, whereas temporal structure and recent traffic state remain dominant predictors. The calibrated reconstruction requires validation against original source records before deployment.

 

Downloads

Download data is not yet available.

References

Abduljabbar, R., Dia, H., & Liyanage, S. (2024). Machine learning models for traffic prediction on arterial roads using traffic features and weather information. Applied Sciences, 14(23), 11047. https://doi.org/10.3390/app142311047

Abduljabbar, R., Dia, H., & Liyanage, S. (2025). Machine learning traffic flow prediction models for smart and sustainable traffic management. Infrastructures, 10(7), 155. https://doi.org/10.3390/infrastructures10070155

Ali, A., Sharafian, A., Yasir Naeem, H. M., Zakarya, M., Wu, Z., & Bai, X. (2026). Advanced computational models for urban traffic flow prediction: A comprehensive review and future directions. Computer Science Review, 60, 100886. https://doi.org/10.1016/j.cosrev.2025.100886

Berlotti, M., Di Grande, S., & Cavalieri, S. (2024). Proposal of a machine learning approach for traffic flow prediction. Sensors, 24(7), 2348. https://doi.org/10.3390/s24072348

Chauhan, N. S., & Kumar, N. (2024). Confined attention mechanism enabled recurrent neural network framework to improve traffic flow prediction. Engineering Applications of Artificial Intelligence, 136, 108791. https://doi.org/10.1016/j.engappai.2024.108791

Cheng, H., Gong, Z., & Wang, C. (2025). LLM-TFP: Integrating large language models with spatio-temporal features for urban traffic flow prediction. Applied Soft Computing, 177, 113174. https://doi.org/10.1016/j.asoc.2025.113174

Chu, Z., Ma, W., Li, M., & Chen, H. (2024). Adaptive decision spatio-temporal neural ODE for traffic flow forecasting with multi-kernel temporal dynamic dilation convolution. Neural Networks, 179, 106549. https://doi.org/10.1016/j.neunet.2024.106549

Fafoutellis, P., & Vlahogianni, E. I. (2023). Unlocking the full potential of deep learning in traffic forecasting through road network representations: A critical review. Data Science for Transportation, 5, 23. https://doi.org/10.1007/s42421-023-00083-w

Fahs, W., Chbib, F., Rammal, A., Khatoun, R., El Attar, A., Zaytoun, I., & Hachem, J. (2023). Traffic congestion prediction based on multivariate modelling and neural networks regressions. Procedia Computer Science, 220, 202–209. https://doi.org/10.1016/j.procs.2023.03.028

Gomes, B., Coelho, J., & Aidos, H. (2023). A survey on traffic flow prediction and classification. Intelligent Systems with Applications, 20, 200268. https://doi.org/10.1016/j.iswa.2023.200268

Guo, X., Zhang, Q., Jiang, J., Peng, M., Zhu, M., & Yang, H. F. (2024). Towards explainable traffic flow prediction with large language models. Communications in Transportation Research, 4, 100150. https://doi.org/10.1016/j.commtr.2024.100150

Han, D. C. (2024). Prediction of traffic volume based on deep learning model for AADT correction. Applied Sciences, 14(20), 9436. https://doi.org/10.3390/app14209436

Hogue, J. (2019). Metro interstate traffic volume [Dataset]. UCI Machine Learning Repository. https://doi.org/10.24432/C5X60B

Kendre, H., Karmarkar, M., Karadbhajne, H., Kamtalwar, N., & Marathe, A. (2024). Traffic volume prediction based on weather parameters. In 2024 IEEE International Conference for Women in Innovation, Technology & Entrepreneurship (ICWITE) (pp. 124–129). IEEE. https://doi.org/10.1109/ICWITE59797.2024.10503349

Li, Y., Wang, J., & Kang, L. (2025). Light attention-based neural networks for traffic flow prediction. Physica A: Statistical Mechanics and its Applications, 673, 130665. https://doi.org/10.1016/j.physa.2025.130665

Liu, R., & Shin, S.-Y. (2025). A review of traffic flow prediction methods in intelligent transportation system construction. Applied Sciences, 15(7), 3866. https://doi.org/10.3390/app15073866

Luo, Q., He, S., Han, X., Wang, Y., & Li, H. (2024). LSTTN: A long-short term transformer-based spatiotemporal neural network for traffic flow forecasting. Knowledge-Based Systems, 293, 111637. https://doi.org/10.1016/j.knosys.2024.111637

Ma, J., Zhao, J., & Hou, Y. (2024). Spatial–temporal transformer networks for traffic flow forecasting using a pre-trained language model. Sensors, 24(17), 5502. https://doi.org/10.3390/s24175502

Nesa, M., & Yoon, Y. (2024). Speed prediction and nearby road impact analysis using machine learning and ensemble of explainable AI techniques. Scientific Reports, 14, 25208. https://doi.org/10.1038/s41598-024-74545-8

Park, S., Kim, M., & Kim, J. (2024). Hourly long-term traffic volume prediction with meteorological information using graph convolutional networks. Applied Sciences, 14(6), 2285. https://doi.org/10.3390/app14062285

Peng, D., & Zhang, Y. (2023). MA-GCN: A memory augmented graph convolutional network for traffic prediction. Engineering Applications of Artificial Intelligence, 121, 106046. https://doi.org/10.1016/j.engappai.2023.106046

Qi, Y., & Cheng, Z. (2023). Research on traffic congestion forecast based on deep learning. Information, 14(2), 108. https://doi.org/10.3390/info14020108

Qin, H., & Zhang, W. (2022). Short-term traffic flow prediction and signal timing optimization based on deep learning. Wireless Communications and Mobile Computing, 2022, 8926445. https://doi.org/10.1155/2022/8926445

Qin, Z., Wang, M., Zhu, H., Lee, W.-C., Cui, N., Yu, J., Tian, Z., Hong, Y., & Yin, J. (2026). A survey on modern deep learning techniques for traffic volume prediction. Data Science and Engineering, 11, 473–512. https://doi.org/10.1007/s41019-025-00340-8

Rasulmukhamedov, M., Tashmetov, T., & Tashmetov, K. (2024). Forecasting traffic flow using machine learning algorithms. Engineering Proceedings, 70(1), 14. https://doi.org/10.3390/engproc2024070014

Sayed, S. A., Abdel-Hamid, Y., & Hefny, H. A. (2023). Artificial intelligence-based traffic flow prediction: A comprehensive review. Journal of Electrical Systems and Information Technology, 10, 13. https://doi.org/10.1186/s43067-023-00081-6

Tao, Q., Li, Z., Xu, J., Lin, S., De Schutter, B., & Suykens, J. A. K. (2022). Short-term traffic flow prediction based on the efficient hinging hyperplanes neural network. IEEE Transactions on Intelligent Transportation Systems, 23(9), 15616–15628. https://doi.org/10.1109/TITS.2022.3142728

Tian, R., Wang, C., Hu, J., & Ma, Z. (2023). Multi-scale spatial-temporal aware transformer for traffic prediction. Information Sciences, 648, 119557. https://doi.org/10.1016/j.ins.2023.119557

Tran, D. Q., Tran, H. Q., & Nguyen, M. V. (2024). An enhanced ensemble-based long short-term memory approach for traffic volume prediction. Computers, Materials & Continua, 78(3), 3585–3602. https://doi.org/10.32604/cmc.2024.047760

Wang, C., Tian, R., Hu, J., & Ma, Z. (2023). A trend graph attention network for traffic prediction. Information Sciences, 623, 275–292. https://doi.org/10.1016/j.ins.2022.12.048

Wang, J.-D., & Susanto, C. O. N. (2024). Traffic flow prediction with heterogeneous spatiotemporal data based on a hybrid deep learning model using attention-mechanism. Computer Modeling in Engineering & Sciences, 140(2), 1711–1728. https://doi.org/10.32604/cmes.2024.048955

Xu, Y., & Liu, M. (2025). GPT4TFP: Spatio-temporal fusion large language model for traffic flow prediction. Neurocomputing, 625, 129562. https://doi.org/10.1016/j.neucom.2025.129562

Yaqub, M., Ahmad, S., Manan, M. A., Pathan, M. S., & He, L. (2025). Predicting traffic flow with federated learning and graph neural with asynchronous computations network. Array, 26, 100411. https://doi.org/10.1016/j.array.2025.100411

Zhang, S., Yin, X., Zhang, W., Xu, J., & Jing, X. (2025). Adaptive lightweight temporal convolutional network with context-aware downsampling strategy for traffic flow prediction. Engineering Applications of Artificial Intelligence, 156, 111208. https://doi.org/10.1016/j.engappai.2025.111208

Zhang, W., Yao, R., Du, X., Liu, Y., Wang, R., & Wang, L. (2023). Traffic flow prediction under multiple adverse weather based on self-attention mechanism and deep learning models. Physica A: Statistical Mechanics and its Applications, 625, 128988. https://doi.org/10.1016/j.physa.2023.128988

Zhang, W., Yao, R., Yuan, Y., Du, X., Wang, L., & Sun, F. (2024). A traffic-weather generative adversarial network for traffic flow prediction for road networks under bad weather. Engineering Applications of Artificial Intelligence, 137, 109125. https://doi.org/10.1016/j.engappai.2024.109125

Downloads

Published

2026-10-14

How to Cite

Weather-Aware Machine Learning for Urban Traffic Volume Prediction and Congestion Analysis. (2026). Journal of Engineering and Applied Technology, 2(2), 01-15. https://doi.org/10.65310/wdt0rs27