Prediction of Traffic Flow at Urban Intersections using LSTM Model


  • Haiyi Hu



Traffic flow prediction; LSTM; intersections.


The growth of population and economy is resulting in an increase in the usage of cars in cities, which is causing issues. Traffic congestion has become a normal phenomenon. To better deal with the problem, it is of great significance to forecast the traffic flow. This problem is addressed by proposing the use of the LSTM model in this paper. Using the data from the Shanghai Public Data Open Platform, two sets of data are chosen to do the experiment. The data was collected by loop and accurate to second, which makes it pretty unstable. In this situation, the LSTM model still has a good result. The mean absolute error of Loop 1, Loop 4, and Loop 9 prediction is 3.579, 6.515, and 4.253.  all reaches over 0.8. Furthermore, the LSTM model can add more features to improve its accuracy to fit future traffic conditions. Through this research, it is concluded that the LSTM model is suitable for predicting time-series statistics and performs a high accuracy.


Download data is not yet available.


Pan B, Demiryurek U, Shahabi C. Utilizing Real-World Transportation Data for Accurate Traffic Prediction, 2012 IEEE 12th International Conference on Data Mining, Brussels, Belgium, 2012, 595-604.

Williams B M. Multivariate vehicular traffic flow prediction: evaluation of ARIMAX modeling. Journal of the Transportation Research Board, 2001, 194-200.

Zivot E, Wang J. Vector autoregressive models for multivariate time series. Modeling Financial Time Series with S-PLUS, 2007, 385-429.

Hong H, et al. Short-term traffic flow forecasting: Multi-metric KNN with related station discovery. 2015 12th International Conference on Fuzzy Systems and Knowledge Discovery (FSKD), Zhangjiajie, China, 2015, 1670-1675.

Duan M. Short-Time Prediction of Traffic Flow Based on PSO Optimized SVM. 2018 International Conference on Intelligent Transportation, Big Data & Smart City (ICITBS), Xiamen, China, 2018, 41-45.

MA X L, et al. Learning traffic as images: a deep convolutional neural network for large-scale transportation network speed prediction. Sensors, 2017, 17(4): 818.

Azad A K, Islam M S. Traffic Flow Prediction Model Using Google Map and LSTM Deep Learning. 2021 IEEE International Conference on Telecommunications and Photonics (ICTP), Dhaka, Bangladesh, 2021, 1-5.

Cheng Z, Li Y, Zhu H. Improved Particle Swarm Optimization-based GRU Networks for Short-time Traffic Flow Prediction. 2020 Chinese Automation Congress (CAC), Shanghai, China, 2020, 2863-2868.

Zhang X, Huang K, Liu C, Xu X. Urban Short-Term Traffic Flow Prediction Algorithm Based on CNN-LSTM Model. 2023 3rd International Conference on Consumer Electronics and Computer Engineering (ICCECE), Guangzhou, China, 2023, 214-217.

Feng H, Zhang X, Xu Y. Multi-step Ahead Prediction of Traffic Speed Based on Attention-based CNN-LSTM-BiLSTM. 2022 5th International Conference on Data Science and Information Technology (DSIT), Shanghai, China, 2022, 1-6.

Lan T H, et al. Short-term traffic flow prediction model based on the optimization of SVM by CS algorithm. Journal of Qingdao Technological University, 2024, 134-140.




How to Cite

Hu, H. (2024). Prediction of Traffic Flow at Urban Intersections using LSTM Model. Highlights in Science, Engineering and Technology, 105, 44-49.