Prediction of Road Traffic Accident Severity based on Random Forest

Authors

  • Haoqing Ren Sias University, Xinzheng, Henan, 451100, China
  • Tingting Sun Sias University, Xinzheng, Henan, 451100, China
  • Jiali Che Sias University, Xinzheng, Henan, 451100, China
  • Xiangxiang Qiao Sias University, Xinzheng, Henan, 451100, China

DOI:

https://doi.org/10.54097/ybgee727

Keywords:

Traffic Accident Severity, Random Forest, Prediction, Class Imbalance, Feature Importance

Abstract

Road traffic accident severity prediction is an important research direction in intelligent transportation systems. Different from studies focusing on accident causes and mechanism interpretation, this paper adopts a purely prediction-oriented paradigm. Based on UK road accident data from 2019 to 2021, a Random Forest prediction model is constructed with accident severity as the prediction target and 13 scene attributes as input features. The model achieves an overall accuracy of 79.10% on the held-out test set; iterative hyperparameter adjustment identifies a favourable configuration of 100 trees with a maximum depth of 7, and the results indicate that increasing the model complexity does not necessarily improve the accuracy. The feature importance analysis shows that the number of vehicles, the number of casualties, the speed limit, the accident time and the road type are the main inputs on which the prediction relies, and the 10-feature subset selected by a cumulative importance of 95% still maintains an accuracy of 79.01%. The per-class evaluation shows that the highly imbalanced class distribution constrains the discrimination of the rare classes: a valid AUC cannot be computed for the fatal class under the one-vs-rest evaluation framework, and the AUC of the slight class (0.36) is below 0.5. This study presents a complete and feasible pipeline from accident data to severity prediction, targeting post-hoc severity assessment of occurred accidents rather than pre-crash real-time risk forecasting; future work will introduce cross-validation for hyperparameter tuning and combine resampling and cost-sensitive learning to improve the prediction of rare classes.

Downloads

Download data is not yet available.

References

[1] World Health Organization. (2023). Global status report on road safety 2023. World Health Organization.

[2] Obasi, I. C., & Benson, C. (2023). Evaluating the effectiveness of machine learning techniques in forecasting the severity of traffic accidents. Heliyon, 9(8), e18812. https://doi.org/10.1016/j.heliyon.2023.e18812. DOI: https://doi.org/10.1016/j.heliyon.2023.e18812

[3] Lord, D., & Mannering, F. (2010). The statistical analysis of crash-frequency data: A review and assessment of methodological alternatives. Transportation Research Part A: Policy and Practice, 44(5), 291–305. https://doi.org/10.1016/j.tra.2010.02.001. DOI: https://doi.org/10.1016/j.tra.2010.02.001

[4] Fu, C., & Tu, H. T. (2024). Investigating vehicle-vehicle and vehicle–pedestrian crash severity at street intersections with the latent class parameterized correlation bivariate generalized ordered probit. Accident Analysis & Prevention, 207, 107745. https://doi.org/10.1016/j.aap.2024.107745. DOI: https://doi.org/10.1016/j.aap.2024.107745

[5] Atumo, E. A., Li, H., & Jiang, X. (2023). Segment-level spatial heterogeneity of arterial crash frequency using locally weighted generalized linear models. Transportation Research Record, 2677(3), 1637–1653. https://doi.org/10.1177/03611981231152471. DOI: https://doi.org/10.1177/03611981221126510

[6] Pervez, A., Lee, J., & Huang, H. (2022). Exploring factors affecting the injury severity of freeway tunnel crashes: A random parameters approach with heterogeneity in means and variances. Accident Analysis & Prevention, 178, 106835. https://doi.org/10.1016/j.aap.2022.106835. DOI: https://doi.org/10.1016/j.aap.2022.106835

[7] Yang, S., Abdel-Aty, M., Islam, Z., & Wang, D. (2024). Real-time crash prediction on express managed lanes of Interstate highway with anomaly detection learning. Accident Analysis & Prevention, 201, 107568. https://doi.org/10.1016/j.aap.2024.107568. DOI: https://doi.org/10.1016/j.aap.2024.107568

[8] Wu, Z., Misra, A., & Bao, S. (2024). Modeling pedestrian injury severity: A case study of using extreme gradient boosting vs random forest in feature selection. Transportation Research Record, 2678(1), 1–11. https://doi.org/10.1177/03611981231170014. DOI: https://doi.org/10.1177/03611981231170014

[9] Chen, Y., Chen, H., Ye, P., Lv, Y., & Wang, F. (2022). Acting as a decision maker: Traffic-condition-aware ensemble learning for traffic flow prediction. IEEE Transactions on Intelligent Transportation Systems, 23(4), 3190–3200. https://doi.org/10.1109/TITS.2021.3132444. DOI: https://doi.org/10.1109/TITS.2020.3032758

[10] Yang, J., Han, S., & Chen, Y. (2023). Prediction of traffic accident severity based on random forest. Journal of Advanced Transportation, 2023, 7641472. https://doi.org/10.1155/2023/7641472. DOI: https://doi.org/10.1155/2023/7641472

[11] Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32. https://doi.org/10.1023/A:1010933404324. DOI: https://doi.org/10.1023/A:1010933404324

[12] Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830.

Downloads

Published

29-11-2026

Issue

Section

Articles

How to Cite

Ren, H., Sun, T., Che, J., & Qiao, X. (2026). Prediction of Road Traffic Accident Severity based on Random Forest. Frontiers in Computing and Intelligent Systems, 19(1), 1-5. https://doi.org/10.54097/ybgee727