پژوهشنامه حمل و نقل

پژوهشنامه حمل و نقل

تحلیل شدت تصادفات دوخودرویی درون‌شهری با الگوریتم جنگل تصادفی (RF) و تحلیل SHAP

نوع مقاله : مقاله پژوهشی

نویسندگان
1 گروه مهندسی عمران، دانشگاه پیام نور، تهران، ایران
2 دانش آموخته کارشناسی ارشد، گروه مهندسی عمران‌، دانشگاه پیام نور، تهران، ایران
چکیده
تصادفات دو‌خودرویی درون‌شهری یکی از مهم‌ترین انواع تصادفات درون‌شهری محسوب می‌شوند که سهم قابل‌توجهی در تلفات انسانی و خسارات اقتصادی دارند. شناسایی عوامل مؤثر بر شدت این نوع تصادفات می‌تواند نقش مهمی در برنامه‌ریزی‌های ایمنی و مدیریت ترافیک شهری ایفا نماید. هدف این پژوهش، تحلیل عوامل مؤثر بر شدت تصادفات دو‌خودرویی درون‌شهری با استفاده از مدل‌های یادگیری ماشین و روش‌های تفسیرپذیر است. داده‌های مورد استفاده شامل 586 فقره تصادف دو‌خودرویی ثبت‌شده در شهرستان شهرضا طی سال‌های 1401 تا 1404 بود که از پایگاه اطلاعات پلیس راهور استخراج گردید. در مرحله پیش‌پردازش، داده‌ها کدگذاری و متعادل‌سازی شده و سپس مدل جنگل تصادفی (RF) به‌عنوان مدل اصلی توسعه یافت. همچنین عملکرد این مدل با دو مدل پایه شامل رگرسیون لجستیک (LR) و درخت تصمیم (DT) مقایسه شد. نتایج ارزیابی مدل‌ها نشان داد که مدل RF با دقت 89 درصد، مقدار AUC برابر با 92/0 و مقادیر بالاتر Precision، Recallو F1-score نسبت به سایر مدل‌ها، بهترین عملکرد را در پیش‌بینی شدت تصادفات ارائه می‌دهد. به‌منظور تفسیرپذیری نتایج، از روش SHAP استفاده شد. یافته‌ها نشان داد که متغیرهای روز هفته، نوع خودرو، زمان وقوع تصادف، مانور خودرو، هندسه راه، وضعیت روشنایی و کنترل ترافیک از مهم‌ترین عوامل مؤثر بر شدت تصادفات دو‌خودرویی هستند. همچنین مشخص گردید وقوع تصادفات در شب، نبود کنترل ترافیک، راه‌های دوطرفه و حضور خودروهای سنگین احتمال بروز تصادفات فوتی را افزایش می‌دهد. نتایج این پژوهش نشان می‌دهد که ترکیب مدل‌های یادگیری ماشین و روش‌های تفسیرپذیر می‌تواند ابزار مؤثری برای تحلیل شدت تصادفات و تدوین راهکارهای ارتقای ایمنی ترافیک شهری باشد.
کلیدواژه‌ها
موضوعات

عنوان مقاله English

Analysis of the Severity of Urban Two-Vehicle Crashes Using the Random Forest (RF) Algorithm and SHAP Analysis

نویسندگان English

Hmed Saify 1
Mohammad Koohi 2
Shahin Shabani 1
1 Department of Civil Engineering‌, Payame Noor University (PNU), Tehran, Iran.
2 M.Sc., Grad., Department of Civil Engineering, Payame Noor University (PNU), Tehran, Iran.
چکیده English

Urban two-vehicle crashes constitute one of the most significant types of traffic crashes, accounting for a substantial proportion of human casualties and economic losses. Identifying the factors influencing the severity of these crashes can play a crucial role in urban traffic management and safety planning. This study aims to analyze the factors affecting the severity of urban two-vehicle crashes using machine learning models and interpretable methods. The dataset comprised 586 recorded two-vehicle crashes in Shahrud County between 2022 and 2025, extracted from the Traffic Police database. During the preprocessing stage, the data were encoded and balanced, followed by the development of the Random Forest (RF) model as the primary classifier. The performance of the RF model was compared with two baseline models: Logistic Regression (LR) and Decision Tree (DT). Evaluation results indicated that the RF model achieved the best performance in predicting collision severity, with an accuracy of 89%, an AUC of 0.92, and higher Precision, Recall, and F1-score values compared to the other models. To enhance the interpretability of the results, the SHAP method was employed. The findings revealed that the day of the week, vehicle type, time of occurrence, vehicle maneuver, road geometry, lighting conditions, and traffic control are the most significant factors affecting collision severity. Furthermore, the analysis indicated that crashes occurring at night, the absence of traffic control, two-way roads, and the presence of heavy vehicles increase the likelihood of fatal accidents. The results demonstrate that combining machine learning models with interpretable methods can serve as an effective tool for analyzing collision severity and formulating strategies to enhance urban traffic safety.

کلیدواژه‌ها English

Two-vehicle crashes
Severity analysis
Random Forest (RF)
SHAP analysis
-Abdel-Aty, M. A., and Abdelwahab, H. T., (2004). Predicting injury severity levels in traffic crashes: A modeling comparison. Journal of Transportation Engineering,
Vol. 130, No. 2, 204–210.
-Abellán, J., López, G., & de Oña, J. (2013). Analysis of traffic accident severity using decision rules via decision trees. Expert Systems with Applications, 40(15), 6047–6054.
-Amiri, A. M., Sadri, A., Nadimi, N., & Shams, M. (2020). A comparison between artificial neural network and hybrid intelligent genetic algorithm in predicting the severity of fixed object crashes among elderly drivers. Accident Analysis and Prevention, 138, 105468.
 -Anvari, M. B., Kashani, A. T., and Rabieyan, R. (2017). Identifying the most important factors in the at-fault probability of motorcyclists by data mining, based on classification tree models. International Journal of Civil Engineering, Vol. 15, No. 4, 653–662.
-Arhin, S. A., & Gatiba, A. (2020). Predicting crash injury severity at unsignalized intersections using support vector machines and naïve bayes classifiers. Transportation Safety and Environment, 2(2), 120– 132.
-Breiman, L. Random Forests (2001). Machine Learning, Vol. 45, No. 1, 5–32.
 -Budiawan, W., Saptadi, S., Tjioe, C., & Phommachak, T. (2019). Traffic accident severity prediction using naive Bayes algorithm-a case study of Semarang toll road. IOP Conference Series: Materials Science and Engineering, 598, 012089.
-Cai, Q., M. Abdel-Aty, O. Zheng, and Y. Wu. (2022). Applying Machine Learning and Google Street View to Explore Effects of Drivers’ Visual Environment on Traffic Safety. Transportation Research Part C: Emerging Technologies, Vol. 135.
-Champahom, T., Se, CH., Watcharamaisakul, F., Jomnonkwao, S., Karoonsoontawong, A., Ratanavaraha, V., (2024). Tree-based approaches to understanding factors influencing crash severity across roadway classes: A Thailand case study, IATSS Research 48, 464–476.
-Champahom, T., Se, CH., Watcharamaisakul, F., Jomnonkwao, S., Karoonsoontawong, A., Ratanavaraha, V., (2024). Tree-based approaches to understanding factors influencing crash severity across roadway classes: A Thailand case study, IATSS Research 48, 464–476.
-Chen, C., Zhang, G. H., Yang, J. F., Milton, C. J., & Alcántara, A. D. (2016). An explanatory analysis of driver injury severity in rear-end crashes using a decision table/Naïve Bayes (DTNB) hybrid classifier. Accident Analysis & Prevention, 90, 95–107.
-Chen, F., and Chen, S. (2011). Injury Severities of Truck Drivers in Single- and Multi-Vehicle Accidents on Rural Highways. Accident Analysis & Prevention, Vol. 43, No. 5,1677–1688.
-Chen, M.M. Chen, M.C., (2020). Modeling road accident severity with comparisons of logistic regression, decision tree and random forest, Inf. 11.
-Chen, M.M. Chen, M.C., (2020). Modeling road accident severity with comparisons of logistic regression, decision tree and random forest, Inf. 11.
-Chiou, Y. C., Fu, C. and Ke, C. Y. (2020). Modelling Two-Vehicle Crash Severity by Generalized Estimating Equations. Accident Analysis and Prevention, Vol. 148.
-Dong, N., Huang, H., & Zheng, L. (2015). Support vector machine in crash prediction at the level of traffic analysis zones: Assessing the spatial proximity effects. Accident; Analysis and Prevention, 82, 192–198.
-Duncan, C. S., Khattak, A. J. and Council, F. M. (1998). Applying the Ordered Probit Model to Injury Severity in Truck-Passenger Car Rear-End Collisions. Transportation Research Record: Journal of the Transportation Research Board, Vol. 1635, No. 1, 63–71.
-Fiorentini, N., & Losa, M. (2020). Handling imbalanced data in road crash severity prediction by machine learning algorithms. Infrastructures, 5(7), 61.
-Geedipally, S. R., and Lord, D. (2010). Investigating the Effect of Modeling Single Vehicle and Multi-Vehicle Crashes Separately on Confidence Intervals of Poisson–Gamma Models. Accident Analysis & Prevention, Vol. 42, No. 4, 1273–1282.
-Griffith, M. S. (1999). Safety Evaluation of Rolled-In Continuous Shoulder Rumble Strips Installed on Freeways. Transportation Research Record: Journal of the Transportation Research Board, 1665(1): 28–34.
-Guyon, I. and Elisseeff, A. (2003).An introduction to variable and feature selection. Journal of Machine Learning Research, 3:1157–82.
-Hagenauer, J., and Helbich, M. (2017). A Comparative Study of Machine Learning Classifiers for Modeling Travel Mode Choice. Expert Systems with Applications, Vol. 78, 273–282.
-Hossain, M. (2011). Development of a Real-Time Proactive Road Safety Management System for Urban Expressways. Ph. D. Thesis, Department of Built Environment, Tokyo Institute of Technology.
-Iranitalab, A., and Khattak, A. (2017). Comparison of four statistical and machine learning methods for crash severity prediction. Accident Analysis & Prevention, Vol. 108,
27–36.
-Ji, A., and Levinson, D. (2020). Injury Severity Prediction fom Two-Vehicle Crash Mechanisms With Machine Learning and Ensemble Models. IEEE Open Journal of Intelligent Transportation Systems, Vol. 1, 217–226.
-Jiang, L., Xie, Y., and Ren, T. (2019). Modelling highly unbalanced crash injury severity data by ensemble methods and global sensitivity analysis. In Procceding Transportation Research Board 98th Annual Meeting, Washington, DC, USA, 13–17.
-Kitali, A. E., and Sando, T. (2017). A Full Bayesian Approach to Appraise the Safety Effects of Pedestrian Countdown Signals to Drivers. Accident Analysis & Prevention,
Vol. 106, 327–335.
-Lee, C., and Li, X. (2014). Analysis of Injury Severity of Drivers Involved in Single- and Two-Vehicle Crashes on Highways in Ontario. Accident Analysis and Prevention, Vol. 71, 286–295.
-Li, Z., Liu, P., Wang, W., & Xu, C. (2012). Using support vector machine models for crash injury severity analysis. Accident Analysis & Prevention, 45, 478 486.
-Li, Z., Liu, P., Wang, W., & Xu, C. (2012). Using support vector machine models for crash injury severity analysis. Accident Analysis & Prevention, 45, 478 486.
-Li, Z., Wang, H. X., Zhang, Y. W., and Zhao, X. H. (2020). Random Forest–Based Feature Selection and Detection Method for Drunk Driving Recognition. International Journal of Distributed Sensor Networks, Vol. 16, No. 2.
-Lombardi, D. A., Horrey, W. J., & Courtney, T. K. (2017). Age-related differences in fatal intersection crashes in the United States. Accident Analysis & Prevention, 99, 20–29.
-Lord, D., Washington, S. P., and Ivan, J. N. (2005). Poisson, Poisson-Gamma and Zero-Inflated Regression Models of Motor Vehicle Crashes: Balancing Statistical Fit and Theory. Accident Analysis & Prevention, Vol. 37, No. 1, 35–46.
-Lu, P., Zheng, Z., Ren, Y., Zhou, X., Keramati, A., Tolliver, D., & Huang, Y. (2020). A gradient boosting crash prediction approach for highway-rail grade crossing crash analysis. Journal of Advanced Transportation,1–10.
-Lundberg, S. M., and Lee, S. I. (2017).A Unified Approach to Interpreting Model Predictions.
-Ma, J., and Kockelman, K. M. (2006). Bayesian Multivariate Poisson Regression for Models of Injury Count, by Severity. Transportation Research Record: Journal of the Transportation Research Board, 1950(1):24–34.
-Ma, X., Chen, S., & Chen, F. (2016). Correlated Random-Effects Bivariate Poisson Lognormal Model to Study Single-Vehicle and Multivehicle Crashes. Journal of Transportation Engineering, 04016049.
-Martensen, H., and Dupont, E. (2013). Comparing Single Vehicle and Multivehicle Fatal Road Crashes: A Joint Analysis of Road Conditions, Time Variables and Driver Characteristics. Accident Analysis & Prevention, Vol. 60, 466–471.
-Mauro, R., De Luca, M., & Dell’Acqua, G. (2013). Using a K-means clustering algorithm to examine patterns of vehicle crashes in before-after analysis. Modern Applied Science, 7(10), 11.
-Mokhtarimousavi, S., Anderson, J. C., Azizinamini, A., & Hadi, M. (2019). Improved support vector machine models for work zone crash injury severity prediction and analysis. Transportation Research Record: Journal of the Transportation Research Board, 2673(11), 680–692.
-Mondal, A. R., Bhuiyan, M. A. E., & Yang, F. (2020). Advancement of weather related crash prediction model using nonparametric machine learning algorithms. SN Applied Sciences, 2(8), 1–11.
-NHTSA, (2020), Traffic Safety Facts, A Compilation of Motor Vehicle Crash Data, Report No. DOT HS 813375, National Highway Traffic Safety Administration, U.S, Department of Transportation.
-NHTSA, (2020), Traffic Safety Facts, A Compilation of Motor Vehicle Crash Data, Report No. DOT HS 813375, National Highway Traffic Safety Administration, U.S, Department of Transportation.
-Pasupathy, Ivan, R. J. N., and Ossen, P. J. (2000). Single and Multi-Vehicle Crash Prediction Models for Two-Lane Roadways. NEUTC UCNR9-8, Final Report, Durham, NH.
-Pradhan, B., and Sameen, M. I., (2020). Predicting Injury Severity of Road Traffic Accidents Using a Hybrid Extreme Gradient Boosting and Deep Neural Network Approach. In Advances in Science, Technology and Innovation, Springer Nature, 119–127.
-Qin, X., Ivan J. N., & Ravishanker, N. (2004). Selecting Exposure Measures in Crash Rate Prediction for Two-Lane Highway Segments. Accident Analysis & Prevention, Vol. 36, No. 2, 183–191.
-Sameen, M. I., & Pradhan, B. (2017). Severity Prediction of Traffic Accidents with Recurrent Neural Networks. Applied Sciences, 7(6), 476.
-Sarkar, S., Pramanik, A., Maiti, J., & Reniers, G. (2020). Predicting and analyzing injury severity: A machine learning-based approach using class-imbalanced proactive and reactive data. Safety Science, 125, 104616.
-Shao, X., Ma, X., Chen, F., Song, M., Pan, X., & You, K. (2020). A Random Parameters Ordered Probit Analysis of Injury Severity in Truck Involved Rear-End Collisions. International Journal of Environmental Research and Public Health, 17(2), 395.
-Sum, S., Se, Ch., Champahom, T., Jomnonkwao, S., Sinha, S., Ratanavaraha, V., (2025). A random forest and SHAP-based analysis of motorcycle crash severity in Thailand: Urban-rural and day-night perspectives, Transportation Engineering, 21, 100369.
-Tang, J., Liang, J., Han, C., Li, Z., & Huang, H. (2019). Crash injury severity analysis using a two-layer Stacking framework. Accident Analysis & Prevention, Vol. 122, 226-238.
-Wen, X., Xie, Y., Jiang, L., Pu, Z., & Ge, T. (2021). Applications of Machine Learning Methods in Traffic Crash Severity Modelling: Current Status and Future Directions. Transport Reviews, Vol. 41, No. 6, 855–879.
-World Health Organization (WHO), (2009). Global status report on road safety: Time for action.
-World Health Organization (WHO), (2018). World report on road traffic injury prevention.
 -World Health Organization (WHO), (2022). Road Traffic Injuries.
-Yan, M., Shen, Y., (2022). Traffic accident severity prediction based on random forest, Sustain 14.
-Yan, M., Shen, Y., (2022). Traffic accident severity prediction based on random forest, Sustain 14.
-Yang, J., Ren, P., and Ando, R. (2019). Examining Drivers’ Injury Severity of Two Vehicle Crashes between Passenger Cars and Trucks Considering Vehicle Types. Asian Transport Studies, Vol. 5, Issue. 4, 720-733.
-Yassin, S. S., and Pooja (2020). Road Accident Prediction and Model Interpretation Using a Hybrid K-Means and Random Forest Algorithm Approach. SN Applied Sciences, Vol. 2, No. 9, 1–13.
-Yu, R., and Abdel-Aty, M. (2014). Analyzing crash injury severity for a mountainous freeway incorporating real-time traffic and weather data. Safety Science, Vol. 63, 50–56.
-Yuan, Q., Lu, M., Theofilatos, A., & Li, Y. B. (2017). Investigation on occupant injury severity in rear-end crashes involving trucks as the front vehicle in Beijing area, China. Chinese Journal of Traumatology, 20(1), 20–26.
-Yuan, R., Gan, J., Peng, Z., and Xiang, Q. (2022). Injury Severity Analysis of Two Vehicle Crashes at Unsignalized Intersections Using Mixed Logit Models. International Journal of Injury Control and Safety Promotion.
-Zeng, Q., & Huang, H. (2014). A stable and optimized neural network model for crash injury severity prediction. Accident Analysis and Prevention, 73, 351 358.
-Zeng, Q., Wen, H., and Huang, H. (2016). The Interactive Effect on Injury Severity of
Driver-Vehicle Units in Two-Vehicle Crashes. Journal of Safety Research, Vol. 59, 105–111.
-Zhang, J., Li, Z., Pu, Z., & Xu, C. (2018). Comparing prediction performance for crash injury severity among various machine learning and statistical methods. IEEE Access, 6,
60079–60087.
-Zhang, J., Li, Z., Pu, Z., & Xu, C. (2018). Comparing prediction performance for crash injury severity among various machine learning and statistical methods. IEEE Access, 6,
60079–60087.