Optimizing Traffic Accident Severity Prediction with a Stacking Ensemble Framework
Abstract
1. Introduction
2. Related Work
3. Details of the Dataset
3.1. Dataset Description
3.2. Machine Learning Techniques
3.2.1. Logistic Regression
3.2.2. K-Nearest Neighbors
3.2.3. Random Forest
3.2.4. Support Vector Machines
3.2.5. Stacking Method
4. Metrics of Evaluation for the Performance of Different Learning Models
5. Experiments
6. Discussion
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- WHO. Global Status Report on Road Safety 2021; GRSF, Global-Road-Safety-Facility-GRSF-Annual-Report-2021. 2021. Available online: https://www.who.int/teams/social-determinants-of-health/safety-and-mobility/decade-of-action-for-road-safety-2021-2030 (accessed on 13 January 2025).
- Ministry of Equipment, Transport, Logistics and Water. 2017. Available online: https://www.equipement.gov.ma/Transport-routier/Chiffres-cles/Pages/Securite-Routiere-en-chiffres.aspx (accessed on 21 January 2017).
- Shaik, M.E.; Islam, M.M.; Hossain, Q.S. A review on neural network techniques for the prediction of road traffic accident severity. Asian Transp. Stud. 2021, 7, 100040. [Google Scholar] [CrossRef]
- Rezapour, M.; Nazneen, S.; Ksaibati, K. Application of deep learning techniques in predicting motorcycle crash severity. Eng. Rep. 2020, 2, e12175. [Google Scholar]
- Sameen, M.I.; Pradhan, B.; Shafri, H.Z.M.; Hamid, H.B. Applications of deep learning in severity prediction of traffic accidents. In Proceedings of the Global Civil Engineering Conference, Kuala Lumpur, Malaysia, 25–28 July 2017; Springer: Singapore, 2019; pp. 793–808. [Google Scholar]
- Chakraborty, A.; Mukherjee, D.; Mitra, S. Development of pedestrian crash prediction model for a developing country using artificial neural network. Int. J. Inj. Control. Saf. Promot. 2019, 26, 283–293. [Google Scholar] [CrossRef]
- Lee, J.; Yoon, T.; Kwon, S.; Lee, J. Model evaluation for forecasting traffic accident severity in rainy seasons using machine learning algorithms: Seoul city study. Appl. Sci. 2019, 10, 129. [Google Scholar] [CrossRef]
- Ebrahim, S.; Hossain, Q.S. An Artificial Neural Network Model for Road Accident Prediction: A Case Study of Khulna Metropolitan City. In Proceedings of the 4th International Conference on Civil Engineering for Sustainable Development ICCESD-2018, Khulna, Bangladesh, 9–11 February 2018. [Google Scholar]
- Taamneh, M.; Taamneh, S.; Alkheder, S. Clustering-based classification of road traffic accidents using hierarchical clustering and artificial neural networks. Int. J. Inj. Control. Saf. Promot. 2017, 24, 388–395. [Google Scholar]
- Dong, C.; Shao, C.; Li, J.; Xiong, Z. An improved deep learning model for traffic crash prediction. J. Adv. Transport. 2018, 2018, 3869106. [Google Scholar]
- Behbahani, H.; Amiri, M.A.; Imaninasab, R.; Alizamir, M. Forecasting accident frequency of an urban road network: A comparison of four artificial neural network techniques. J. Forecast. 2018, 37, 767–780. [Google Scholar] [CrossRef]
- Dong, S. Predicting and Analyzing Road Traffic Injury Severity Using Boosting-Based Ensemble Learning Models with SHAPley Additive exPlanations. Int. J. Environ. Res. Public Health 2022, 19, 2925. [Google Scholar]
- Ng, A.Y.; Jordan, M.I. On discriminative vs. generative classifiers: A comparison of logistic regression and naive Bayes. In Advances in Neural Information Processing Systems; The MIT Press: Cambridge, UK, 2002; pp. 841–848. [Google Scholar]
- Collins, M.; Schapire, R.E.; Singer, Y. Logistic regression, AdaBoost and Bregman distances. Mach. Learn. 2002, 48, 253–285. [Google Scholar] [CrossRef]
- Guo, G.; Wang, H.; Bell, D.; Bi, Y.; Greer, K. KNN model-based approach in classification. In Proceedings of the on the Move to Meaningful Internet Systems 2003: CoopIS, DOA, and ODBASE—OTM Confederated International Conferences, CoopIS, DOA, and ODBASE 2003, Sicily, Italy, 3–7 November 2003; Springer: Berlin/Heidelberg, Germany, 2003; pp. 986–996. [Google Scholar]
- Ho, T.K. Random decision forests. In Proceedings of the 3rd International Conference on Document Analysis and Recognition, IEEE, Montreal, QC, Canada, 14–16 August 1995; Volume 1, pp. 278–282. [Google Scholar]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Boser, B.E.; Guyon, I.M.; Vapnik, V.N. A training algorithm for optimal margin classifiers. In Proceedings of the 5th Annual Workshop on Computational Learning Theory, Pittsburgh, PA, USA, 27–29 July 1992; ACM: New York, NY, USA, 1992; pp. 144–152. [Google Scholar]
- Cortes, C.; Vapnik, V. Support-vector networks. Mach Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
- Chang, C.-C.; Lin, C.-J. LIBSVM: A library for support vector machines. ACM Trans. Intell. Syst. Technol. 2011, 2, 27. [Google Scholar] [CrossRef]
- Friedman, N.; Geiger, D.; Goldszmidt, M. Bayesian network classifiers. Mach. Learn. 1997, 29, 131–163. [Google Scholar] [CrossRef]
- Rish, I. An empirical study of the naive Bayes classifier. In Proceedings of the IJCAI 2001 Workshop on Empirical Methods in Artificial Intelligence, Seattle, WA, USA, 4 August 2001; Volume 3, pp. 41–46. [Google Scholar]
- Oyoo, J.O.; Wekesa, J.S.; Ogada, K.O. Predicting Road Traffic Collisions Using a Two-Layer Ensemble Machine Learning Algorithm. Appl. Syst. Innov. 2024, 7, 25. [Google Scholar] [CrossRef]
- Han, J.; Pei, J.; Kamber, M. Data Mining: Concepts and Techniques; Elsevier: Amsterdam, The Netherlands, 2011. [Google Scholar]
- Bhavsar, H.; Ganatra, A. A comparative study of training algorithms for supervised machine learning. Int. J. Soft. Comput. Eng. 2012, 2, 2231–2307. [Google Scholar]
- Brodersen, K.H.; Ong, C.S.; Stephan, K.E.; Buhmann, J.M. The balanced accuracy and its posterior distribution. In Proceedings of the 20th International Conference on Pattern Recognition, Istanbul, Turkey, 23–26 August 2010; pp. 3121–3124. [Google Scholar]
- Kelleher, J.D.; Mac Namee, B.; D’arcy, A. Fundamentals of Machine Learning for Predictive Data Analytics: Algorithms, Worked Examples, and Case Studies; The MIT Press: Cambridge, UK, 2015. [Google Scholar]
- Infante, P.; Jacinto, G.; Afonso, A.; Rego, L.; Nogueira, V.; Quaresma, P.; Saias, J.; Santos, D.; Nogueira, P.; Silva, M.; et al. Comparison of Statistical and Machine-Learning Models on Road Traffic Accident Severity Classification. Computers 2022, 11, 80. [Google Scholar] [CrossRef]
- Zhang, Y.; Sung, Y. Hybrid Traffic Accident Classification Models. Mathematics 2023, 11, 1050. [Google Scholar] [CrossRef]
- Islam, M.K.; Reza, I.; Gazder, U.; Akter, R.; Arifuzzaman, M.; Rahman, M.M. Predicting Road Crash Severity Using Classifier Models and Crash Hotspots. Appl. Sci. 2022, 12, 11354. [Google Scholar] [CrossRef]
- Ahmed, S.; Hossain, M.A.; Ray, S.K.; Bhuiyan, M.M.I.; Sabuj, S.R. A study on road accident prediction and contributing factors using explainable machine learning models: Analysis and performance. Transp. Res. Interdiscip. Perspect. 2023, 19, 100814. [Google Scholar] [CrossRef]
- El Mallahi, I.; Riffi, J.; Tairi, H.; Ez-Zahout, A.; Mahraz, M.A. A Distributed Big Data Analytics Models for Traffic Accidents Classification and Recognition based SparkMlLib Cores. J. Autom. Mob. Robot. Intell. Syst. 2023, 16, 62–71. [Google Scholar] [CrossRef]
- El Mallahi, I.; Dlia, A.; Riffi, J.; Mahraz, M.A.; Tairi, H. Prediction of Traffic Accidents using Random Forest Model. In Proceedings of the 2022 International Conference on Intelligent Systems and Computer Vision (ISCV), Fez, Morocco, 18–20 May 2022; pp. 1–7. [Google Scholar] [CrossRef]
- El Mallahi, I.; Riffi, J.; Tairi, H.; Mahraz, M.A. Efficient Vehicle Detection and Classification Algorithm Using Faster R-CNN Models. J. Autom. Mob. Robot. Intell. Syst. 2024, 18, 86–93. [Google Scholar] [CrossRef]
SL | A Summary of Related Works | Techniques and Methods Applied | Problem and Approach Attacked | Obtained Result | Limits of Related Works and Perspective |
---|---|---|---|---|---|
1. | Md. Ebrahim Shaik et al. [3] | SLP, MLP, RBF, SLP | Prediction of RTC severity | Decision aids in RTC prediction | Needs experimental validations |
2. | Rezapour et al. [4] | SLP, MLP, RNN | Prediction of intensity and frequency of motorbike accidents | Decision aids in motorbike conduct | Needs to compare their confusion matrices and ROC |
3. | Sameen et al. [5] | Deep learning approach (RNN and CNN) | Prediction of road traffic accidents for road safety assessment | Estimation of RTC and predicts it to be the fifth-leading cause of death worldwide in 2030 | Classification accuracy requires improvements |
4. | Chakraborty et al. [6] | ANN, MLP | Predict traffic accident RTC and the severity of transport | Prediction in injuries and deaths | Data normalization, standardization, and transformation |
5. | Lee et al. [7] | Machine learning algorithms | Anticipation of RTC severity in rainy seasons | Decision aids in RTC severity | Anticipation of RTC severity in spring, fall, and winter seasons |
6. | Taamneh et al. [8] | ANN | Severity prediction of traffic accidents | Prediction accuracy | Needs to compare their confusion matrices and ROC |
7. | Behbahani et al. [9] | Implement an activation function RBF, and compare it with FINN and RBFNN using a radial function | Anticipation of the frequency of RTCs | Prediction frequency | Needs to compare their confusion matrices |
8. | Dong et al. [10] | Deep learning, FFNN | Traffic crash prediction | Prediction accuracy | Needs to compare their confusion matrices and ROC |
9. | Behbahani et al. [11] | MLP | Prediction of traffic accidents severity | Prediction accuracy | Needs to compare their confusion matrices and ROC |
10. | Sheng Dong et al. [12] | Ensemble learning based on boosting models such as SHAPley and exPlanations | Analyzing and predicting RTC severity | Prediction accuracy | Needs optimization model |
SN | Attributes | Abbreviation |
---|---|---|
1 | Reference Number | Reference_Number |
2 | Grid Ref: Easting | Easting |
3 | Grid Ref: Northing | Northing |
4 | Number of Vehicles | Number_of_Vehicles |
5 | Accident Date | Accident_Date |
6 | Time (24 h) | Time |
7 | 1st Road Class | 1_Road Class |
8 | 1st Road Class & No | 1st_Road_Class_No |
9 | Road Surface | Road_Surface |
10 | Local Authority | Local_Authority |
11 | Type of Vehicle | Type_of_Vehicle |
12 | Road Surface | Road_Surface |
13 | Lighting Conditions | Lighting_Conditions |
14 | Weather Conditions | Weather_Conditions |
15 | Age of Casualty | Age |
16 | Type of Vehicle | Type_Vehicle |
17 | Sex of Casualty | Sex |
18 | Casualty Severity: 1, Fatal; 2, Serious; 3, Slight | Casualty_Severity Class |
Predicted Positive | Predicted Negative | |
---|---|---|
Actual Positive | True Positive (TP): The actual class is positive, and the model correctly predicts it as positive. | False Negative (FN): The actual class is positive, but the model incorrectly predicts it as negative. |
Actual Negative | False Positive (FP): The actual class is negative, but the model incorrectly predicts it as positive. | True Negative (TN): The actual class is negative, and the model correctly predicts it as negative. |
Reference Number | Grid Ref: Easting | Grid Ref: Northing | Number of Vehicles | Accident Date | Time (24 h) | 1st Road Class | 1st Road Class & No | Road Surface | Lighting Conditions | Weather Conditions | Vehicle Number | Type of Vehicle | Casualty Class | Sex of Casualty | Age of Casualty | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reference Number | 1 | 0.01 | 0.06 | 0.12 | 0.07 | 0.03 | 0.10 | 0.12 | 0.38 | 0.29 | 0.48 | 0.13 | 0.34 | 0.30 | 0.25 | 0.08 |
Grid Ref: Easting | 0.01 | 1 | 0.13 | 0.17 | 0.35 | 0.03 | 0.18 | 0.00 | 0.06 | 0.00 | 0.35 | 0.04 | 0.25 | 0.38 | 0.24 | 0.39 |
Grid Ref: Northing | 0.06 | 0.13 | 1 | 0.28 | 0.25 | 0.17 | 0.20 | 0.04 | 0.11 | 0.07 | 0.23 | 0.20 | 0.07 | 0.08 | 0.11 | 0.51 |
Number of Vehicles | 0.12 | 0.17 | 0.28 | 1 | 0.11 | 0.30 | 0.19 | 0.50 | 0.37 | 0.44 | 0.24 | 0.10 | 0.06 | 0.30 | 0.17 | 0.22 |
Accident Date | 0.07 | 0.35 | 0.25 | 0.11 | 1 | 0.02 | 0.29 | 0.01 | 0.20 | 0.05 | 0.45 | 0.33 | 0.40 | 0.28 | 0.14 | 0.24 |
Time (24 h) | 0.03 | 0.03 | 0.17 | 0.30 | 0.02 | 1 | 0.41 | 0.18 | 0.05 | 0.27 | 0.11 | 0.10 | 0.07 | 0.30 | 0.16 | 0.25 |
1st Road Class | 0.10 | 0.18 | 0.20 | 0.19 | 0.29 | 0.41 | 1 | 0.46 | 0.16 | 0.34 | 0.15 | 0.02 | 0.10 | 0.12 | 0.10 | 0.13 |
1st Road Class & No | 0.12 | 0.00 | 0.04 | 0.50 | 0.01 | 0.18 | 0.46 | 1 | 0.23 | 0.32 | 0.35 | 0.22 | 0.21 | 0.39 | 0.06 | 0.12 |
Road Surface | 0.38 | 0.06 | 0.11 | 0.37 | 0.20 | 0.05 | 0.16 | 0.23 | 1 | 0.03 | 0.49 | 0.36 | 0.23 | 0.22 | 0.11 | 0.08 |
Lighting Conditions | 0.29 | 0.00 | 0.07 | 0.44 | 0.05 | 0.27 | 0.34 | 0.32 | 0.03 | 1 | 0.55 | 0.06 | 0.22 | 0.07 | 0.21 | 0.22 |
Weather Conditions | 0.48 | 0.35 | 0.23 | 0.24 | 0.45 | 0.11 | 0.15 | 0.35 | 0.49 | 0.55 | 1 | 0.18 | 0.41 | 0.44 | 0.07 | 0.29 |
Vehicle Number | 0.13 | 0.04 | 0.20 | 0.10 | 0.33 | 0.10 | 0.02 | 0.22 | 0.36 | 0.06 | 0.18 | 1 | 0.42 | 0.41 | 0.08 | 0.07 |
Type of Vehicle | 0.34 | 0.25 | 0.07 | 0.06 | 0.40 | 0.07 | 0.10 | 0.21 | 0.23 | 0.22 | 0.41 | 0.42 | 1 | 0.76 | 0.33 | 0.47 |
Casualty Class | 0.30 | 0.38 | 0.08 | 0.30 | 0.28 | 0.30 | 0.12 | 0.39 | 0.22 | 0.07 | 0.44 | 0.41 | 0.76 | 1 | 0.14 | 0.35 |
Sex of Casualty | 0.25 | 0.24 | 0.11 | 0.17 | 0.14 | 0.16 | 0.10 | 0.06 | 0.11 | 0.21 | 0.07 | 0.08 | 0.33 | 0.14 | 1 | 0.70 |
Age of Casualty | 0.08 | 0.39 | 0.51 | 0.22 | 0.24 | 0.25 | 0.13 | 0.12 | 0.08 | 0.22 | 0.29 | 0.07 | 0.47 | 0.35 | 0.70 | 1 |
Grid Ref: Easting | Grid Ref: Northing | Number of Vehicles | Time (24 h) | 1st Road Class | Road Surface | Lighting Conditions | Weather Conditions | Vehicle Number | Type of Vehicle | Casualty Severity | Sex of Casualty | Age of Casualty | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Grid Ref: Easting | 1.00 | 0.13 | 0.17 | 0.03 | 0.18 | 0.06 | 0.00 | 0.35 | 0.04 | 0.25 | 0.38 | 0.24 | 0.39 |
Grid Ref: Northing | 0.13 | 1.00 | 0.28 | 0.17 | 0.20 | 0.11 | 0.07 | 0.23 | 0.20 | 0.07 | 0.08 | 0.11 | 0.51 |
Number of Vehicles | 0.17 | 0.28 | 1.00 | 0.30 | 0.19 | 0.37 | 0.44 | 0.24 | 0.10 | 0.06 | 0.30 | 0.17 | 0.22 |
Time (24 h) | 0.03 | 0.17 | 0.30 | 1.00 | 0.41 | 0.05 | 0.27 | 0.11 | 0.10 | 0.07 | 0.30 | 0.16 | 0.25 |
1st Road Class | 0.18 | 0.20 | 0.19 | 0.41 | 1.00 | 0.16 | 0.34 | 0.15 | 0.02 | 0.10 | 0.12 | 0.10 | 0.13 |
Road Surface | 0.06 | 0.11 | 0.37 | 0.05 | 0.16 | 1.00 | 0.03 | 0.49 | 0.36 | 0.23 | 0.22 | 0.11 | 0.08 |
Lighting Conditions | 0.00 | 0.07 | 0.44 | 0.27 | 0.34 | 0.03 | 1.00 | 0.55 | 0.06 | 0.22 | 0.07 | 0.21 | 0.22 |
Weather Conditions | 0.35 | 0.23 | 0.24 | 0.11 | 0.15 | 0.49 | 0.55 | 1.00 | 0.18 | 0.41 | 0.44 | 0.07 | 0.29 |
Vehicle Number | 0.04 | 0.20 | 0.10 | 0.10 | 0.02 | 0.36 | 0.06 | 0.18 | 1.00 | 0.42 | 0.41 | 0.08 | 0.07 |
Type of Vehicle | 0.25 | 0.07 | 0.06 | 0.07 | 0.10 | 0.23 | 0.22 | 0.41 | 0.42 | 1.00 | 0.76 | 0.33 | 0.47 |
Casualty Severity | 0.38 | 0.08 | 0.30 | 0.30 | 0.12 | 0.22 | 0.07 | 0.44 | 0.41 | 0.76 | 1.00 | 0.14 | 0.35 |
Sex of Casualty | 0.24 | 0.11 | 0.17 | 0.16 | 0.10 | 0.11 | 0.21 | 0.07 | 0.08 | 0.33 | 0.14 | 1.00 | 0.70 |
Age of Casualty | 0.39 | 0.51 | 0.22 | 0.25 | 0.13 | 0.08 | 0.22 | 0.29 | 0.07 | 0.47 | 0.35 | 0.70 | 1.00 |
Reference Number | Grid Ref: Easting | Grid Ref: Northing | Number of Vehicles | Accident Date | Time (24 h) | 1st Road Class | 1st Road Class & No | Road Surface | Lighting Conditions | Weather Conditions | Vehicle Number | Type of Vehicle | Casualty Class | Sex of Casualty | Age of Casualty | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Reference Number | 1 | 0.01 | 0.05 | 0.02 | 0.06 | 0.02 | 0.07 | 0.03 | 0.21 | 0.10 | 0.07 | 0.00 | 0.03 | 0.02 | 0.07 | 0.01 |
Grid Ref: Easting | 0.01 | 1 | 0.00 | 0.14 | 0.00 | 0.01 | 0.15 | 0.09 | 0.07 | 0.04 | 0.07 | 0.09 | 0.09 | 0.02 | 0.03 | 0.05 |
Grid Ref: Northing | 0.05 | 0.00 | 1 | 0.07 | 0.02 | 0.01 | 0.22 | 0.13 | 0.03 | 0.04 | 0.03 | 0.06 | 0.06 | 0.03 | 0.01 | 0.02 |
Number of Vehicles | 0.02 | 0.14 | 0.07 | 1 | 0.01 | 0.01 | 0.31 | 0.21 | 0.02 | 0.07 | 0.05 | 0.57 | 0.01 | 0.43 | 0.01 | 0.11 |
Accident Date | 0.06 | 0.00 | 0.02 | 0.01 | 1 | 0.01 | 0.00 | 0.02 | 0.02 | 0.00 | 0.08 | 0.01 | 0.04 | 0.01 | 0.04 | 0.01 |
Time (24 h) | 0.02 | 0.01 | 0.01 | 0.01 | 0.01 | 1 | 0.06 | 0.05 | 0.04 | 0.19 | 0.03 | 0.01 | 0.05 | 0.02 | 0.00 | 0.04 |
1st Road Class | 0.07 | 0.15 | 0.22 | 0.31 | 0.00 | 0.06 | 1 | 0.60 | 0.04 | 0.03 | 0.05 | 0.16 | 0.14 | 0.22 | 0.02 | 0.11 |
1st Road Class & No | 0.03 | 0.09 | 0.13 | 0.21 | 0.02 | 0.05 | 0.60 | 1 | 0.06 | 0.04 | 0.09 | 0.12 | 0.04 | 0.13 | 0.03 | 0.09 |
Road Surface | 0.21 | 0.07 | 0.03 | 0.02 | 0.02 | 0.04 | 0.04 | 0.06 | 1 | 0.14 | 0.42 | 0.09 | 0.04 | 0.01 | 0.00 | 0.01 |
Lighting Conditions | 0.10 | 0.04 | 0.04 | 0.07 | 0.00 | 0.19 | 0.03 | 0.04 | 0.14 | 1 | 0.08 | 0.09 | 0.02 | 0.05 | 0.04 | 0.04 |
Weather Conditions | 0.07 | 0.07 | 0.03 | 0.05 | 0.08 | 0.03 | 0.05 | 0.09 | 0.42 | 0.08 | 1 | 0.04 | 0.02 | 0.00 | 0.06 | 0.00 |
Vehicle Number | 0.00 | 0.09 | 0.06 | 0.57 | 0.01 | 0.01 | 0.16 | 0.12 | 0.09 | 0.09 | 0.04 | 1 | 0.10 | 0.35 | 0.03 | 0.09 |
Type of Vehicle | 0.03 | 0.09 | 0.06 | 0.01 | 0.04 | 0.05 | 0.14 | 0.04 | 0.04 | 0.02 | 0.02 | 0.10 | 1 | 0.27 | 0.18 | 0.10 |
Casualty Class | 0.02 | 0.02 | 0.03 | 0.43 | 0.01 | 0.02 | 0.22 | 0.13 | 0.01 | 0.05 | 0.00 | 0.35 | 0.27 | 1 | 0.13 | 0.20 |
Sex of Casualty | 0.07 | 0.03 | 0.01 | 0.01 | 0.04 | 0.00 | 0.02 | 0.03 | 0.00 | 0.04 | 0.06 | 0.03 | 0.18 | 0.13 | 1 | 0.02 |
Age of Casualty | 0.01 | 0.05 | 0.02 | 0.11 | 0.01 | 0.04 | 0.11 | 0.09 | 0.01 | 0.04 | 0.00 | 0.09 | 0.10 | 0.20 | 0.02 | 1 |
Precision | Recall | F1-Score | Support | |
---|---|---|---|---|
Fatal | 61% | 18% | 29% | 32 |
Serious | 27% | 35% | 41% | 442 |
Slight | 22% | 47% | 32% | 17,773 |
Accuracy | 81% | 2247 | ||
Macro avg | 49% | 34% | 32% | 2247 |
Weighted avg | 76% | 79% | 71% | 2247 |
Precision | Recall | F1-Score | Support | |
---|---|---|---|---|
Fatal | 66% | 10% | 29% | 32 |
Serious | 16% | 17% | 41% | 442 |
Slight | 20% | 83% | 30% | 17,773 |
Accuracy | 81% | 2247 | ||
Macro avg | 70% | 49% | 54% | 2247 |
Weighted avg | 79% | 81% | 79% | 2247 |
Precision | Recall | F1-Score | Support | |
---|---|---|---|---|
Fatal | 75% | 53% | 55% | 32 |
Serious | 15% | 37% | 14% | 442 |
Slight | 10% | 20% | 31% | 17,773 |
Accuracy | 88% | 2247 | ||
Macro avg | 89% | 67% | 74% | 2247 |
Weighted avg | 89% | 89% | 87% | 2247 |
Precision | Recall | F1-Score | Support | |
---|---|---|---|---|
Fatal | 76% | 51% | 44% | 32 |
Serious | 15% | 40% | 35% | 442 |
Slight | 9% | 9% | 31% | 17,773 |
Accuracy | 87% | 2247 | ||
Macro avg | 59% | 68% | 73% | 2247 |
Weighted avg | 81% | 79% | 70% | 2247 |
Precision | Recall | F1-Score | Support | |
---|---|---|---|---|
Fatal | 56% | 48% | 34% | 32 |
Serious | 15% | 12% | 16% | 442 |
Slight | 29% | 40% | 50% | 17,773 |
Accuracy | 87% | 2247 | ||
Macro avg | 59% | 68% | 73% | 2247 |
Weighted avg | 81% | 79% | 70% | 2247 |
Precision | Recall | F1-Score | Support | |
---|---|---|---|---|
Fatal | 98% | 88% | 54% | 32 |
Serious | 91% | 89% | 63% | 442 |
Slight | 87% | 98% | 93% | 17,773 |
Accuracy | 88% | 2247 | ||
Macro avg | 92% | 61% | 77% | 2247 |
Weighted avg | 88% | 88% | 86% | 2247 |
MSE | MAE | RMSE | |
---|---|---|---|
Bayes | 0.279039 | 0.252336 | 0.528241 |
SVM | 0.253227 | 0.224744 | 0.503216 |
LR | 0.249221 | 0.220739 | 0.464589 |
RF | 0.215843 | 0.197152 | 0.464586 |
Stacking | 0.133066 | 0.125946 | 0.364783 |
KNN | 0.141077 | 0.125946 | 0.375602 |
Authors and Study Area | Input/Independent Variable | Output/Dependent Variable | Data Partitioning | Performances (%) | Severity Level |
---|---|---|---|---|---|
Md. Ebrahim Shaik (2021) [3] | Accident time, zone and location, collision type | Injury severity | Training = 80%, Validation = 20% | Accuracy of the RNN model was 71.77%, whereas the MLP and BLR models achieved 65.48% and 58.30%, respectively | Summarizes the different models |
Rezapour, M., Nazneen, S., Ksaibati, K., (2020) [4] | 2430 motorcycle crashes in a mountainous area in the United States over a 10-year period | Injury severity | Training = 80%, Validation = 20% | AUC ranges in value from 0 (100% wrong) vs. 1 (100% right) | Prediction of motorcycle crashes |
Sameen et al. (2019), Malaysia [5] | Accident time, zone and location, collision type, surface and lighting condition, accident reporting | Injury severities | 10-fold cross-validation | SD: RNN = 1.24 CNN = 0.53 FFNN = 2.21 Accuracy: RNN = 73.76 CNN = 70.30 FFNN = 68.79 | PDO = 238 (last section), 209 (main route) Evident injury = 58 (last section), 155 (main route) Disabling injury = 82 (last section), 666 (main route) |
Abhishek Chakraborty (2019) [6] | Pedestrian–vehicular interaction concerning ‘pedestrian-vehicular volume ratio’ and lack of ‘accessibility of pedestrian cross-walk’ | Accidents, traffic/mortality | Training = 80%, Testing = 20% | Accidents, traffic/mortality | |
Lee et al., 2019 [7] | Road geometry data, precipitation data, and traffic accident data over nine years corresponding to the Naebu Expressway, which is located in Seoul, Republic of Korea | Severity of traffic accidents in Seoul City | Training = 75%, Testing = 25% | Accuracy of 1.6878, followed by curve length (CL) at 1.1213 | Vehicle type (VT) showing a decrease of −1.2282, accident time (AT) at −2.9598, and super-elevation (Se) having the most negative impact at −3.8938. |
Our Study | Traffic Accidents 2019 Leeds (TAL19) dataset | Slight, serious, fatal | Training = 80%, Testing = 20% | Precision = 98%, Recall = 60%, Score = 70% | Slight, serious, fatal, MSE = 0.133066, MAE = 0.125946, RMSE= 0.364783 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Published by MDPI on behalf of the World Electric Vehicle Association. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
El Mallahi, I.; Riffi, J.; Tairi, H.; Nikolov, N.S.; El Mallahi, M.; Mahraz, M.A. Optimizing Traffic Accident Severity Prediction with a Stacking Ensemble Framework. World Electr. Veh. J. 2025, 16, 561. https://doi.org/10.3390/wevj16100561
El Mallahi I, Riffi J, Tairi H, Nikolov NS, El Mallahi M, Mahraz MA. Optimizing Traffic Accident Severity Prediction with a Stacking Ensemble Framework. World Electric Vehicle Journal. 2025; 16(10):561. https://doi.org/10.3390/wevj16100561
Chicago/Turabian StyleEl Mallahi, Imad, Jamal Riffi, Hamid Tairi, Nikola S. Nikolov, Mostafa El Mallahi, and Mohamed Adnane Mahraz. 2025. "Optimizing Traffic Accident Severity Prediction with a Stacking Ensemble Framework" World Electric Vehicle Journal 16, no. 10: 561. https://doi.org/10.3390/wevj16100561
APA StyleEl Mallahi, I., Riffi, J., Tairi, H., Nikolov, N. S., El Mallahi, M., & Mahraz, M. A. (2025). Optimizing Traffic Accident Severity Prediction with a Stacking Ensemble Framework. World Electric Vehicle Journal, 16(10), 561. https://doi.org/10.3390/wevj16100561