Work

A Study on Short-Term Traffic Flow Prediction Based on Random Forest Regression

Year: 2024
Type: article
Abstract: Accurate and rapid prediction of short-term traffic flow is of great significance for improving the efficiency of traffic management as well as alleviating the pressure of urban traffic. In this paper, the traffic flow data are first analysed in depth in terms of spatial and temporal patterns. In the time dimension, through the daily traffic flow statistics line graphs of the four junctions, it is found that the traffic flow of the No.1 junction shows an obvious trend of increasing year by year, while the traffic flow of the No.2, No.3, and No.4 junctions grows more gently without any significant incremental pattern. In addition, the weekly traffic flow line graphs reveal a clear pattern: the traffic flow from Monday to Friday is relatively high, while the traffic flow on Saturdays and Sundays is relatively low. In the spatial dimension, the violin distribution plots of the traffic flow in each junction reveal that the traffic flow in each junction shows a skewed distribution. Therefore, this paper employs Quantile Transformer for data preprocessing to eliminate this skewness. Next, this paper explores the correlation of traffic flow between different junctions using Pearson's correlation coefficient, and the results show that the traffic flow between junctions is extremely correlated. In order to predict the traffic flow, this paper tries three models, Lasso, Ridge and Random Forest Regressor, respectively, and searches for the optimal hyperparameters of the above models through cross validation grid search. Finally, four evaluation metrics, namely, Mean Absolute Error (MAE), Mean Square Error (MSE), Root Mean Square Error (RMSE), and Coefficient of Determination R2, were used to comprehensively evaluate the prediction accuracy of the models. Eventually, it returned that the Random Forest Regressor model performed the best in terms of prediction results, with an MAE of 17.315, an MSE of 4.161, an RMSE of 2.458, and an R2 of 0.96.
Author: Jiong Wu
Language: English
Open Access status: diamond
OpenAlex ID: W4401666864
FWCI:
Cites: 1
Cited by:
Related to: 10