Systems

Predicting Traffic-Accident Severity in Sarajevo (2019–2025): An Imbalance-Aware, Interpretable Machine-Learning Study

Muhamed Begović, Ahmad B. Hassanat, Amel Kosovac, Adnan Omerhodžić, Teodora Kovačević

Key points

From the paper's conclusion
  • The models are post-crash severity classifiers, not prospective crash-location predictors, and must be revalidated before being applied to later years.

Abstract

Reliable classification of the severity of traffic accidents requires appropriate treatment of class imbalance. This paper applies machine-learning methods to a verified and standardised database of police-recorded injury accidents from Sarajevo Canton, Bosnia and Herzegovina: 1517 accidents from August 2019 to December 2025, with 28 predictors. Severity was defined as a binary Killed or Seriously Injured (KSI) outcome: 410 Major (27.0%) and 1107 Minor (73.0%) accidents. Seventeen classifiers and a soft-voting ensemble were compared under 10 × 10 repeated stratified cross-validation, with Major-class recall as the primary measure. Precision, F1, balanced accuracy, the areas under the receiver operating characteristic and precision–recall curves (ROC-AUC, PR-AUC), and calibration were also reported. Classifiers were compared with the Nadeau–Bengio corrected resampled t-test. Random Data Partitioning with Voting Rule (RDPVR; recall 0.822 ± 0.056) and Balanced Random Forest (0.821 ± 0.063) recognised the most KSI accidents and did not differ significantly. The soft-voting ensemble and cost-weighted eXtreme Gradient Boosting (XGBoost) offered a better precision–recall balance (F1 0.749 and 0.733) and better-calibrated scores than these two ensembles. Leak-free threshold tuning moved the models along the precision–recall trade-off without materially changing F1. SHapley Additive exPlanations (SHAP) and permutation importance identified pedestrian involvement, location, accident year, primary-road category, and vertical geometry as the most important predictive features. Because police coordinates are approximate, a supportive analysis without them was also run: recall of the two leading ensembles fell only slightly, to 0.79–0.80. Performance was largely retained under spatial block validation. Forecasting from earlier years worked for 2022 (ROC-AUC 0.77–0.82) and moderately for 2023 (0.61–0.78), but collapsed for 2024–2025 (0.34–0.57). The models are post-crash severity classifiers, not prospective crash-location predictors, and must be revalidated before being applied to later years.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers

Predicting Traffic-Accident Severity in Sarajevo (2019–2025): An Imbalance-Aware, Interpretable Machine-Learning Study — Science Skim