## 3 Methodology
### The ReMAHA Algorithm
#### 3.2.4 ReMAHA
Table 13 displays the performance of hybrid models. We combined ReMAHA with five predictive algorithms to assess the impact of sampling models on predictive models. \begin{table}
\begin{tabular}{c c} \hline \hline
**Models** & **Settings** \\ \hline CatBoost & iterations = 500, learning\_rate = 0.03, depth = 6 \\ AdaBoost & n\_estimators = 50, learning\_rate = 1.0 \\ GBDT & learning\_rate = 0.1, n\_estimators = 100, max\_depth = 3 \\ XGBoost & learning\_rate = 0.3, max\_depth = 3 \\ LightGBM & num\_leaves = 31, learning\_rate = 0.1, max\_depth = \(-\)1, n\_estimators = 100 \\ \hline \end{tabular}
\end{table} 
Table 11: Predictive Model Parameter Settings. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Class** & **Metric** & **CatBoost** & **AdaBoost** & **GBDT** & **XGBoost** & **LightGBM** \\ \hline \multirow{3}{*}{Severity 1} & Precision & 71.82 & 53.71 & 64.99 & 72.70 & 69.25 \\  & Recall & 73.27 & 13.09 & 44.52 & 65.37 & 61.55 \\  & F1–Score & 72.53 & 21.05 & 52.84 & 68.84 & 65.17 \\ \hline \multirow{3}{*}{Severity 2} & Precision & 91.02 & 84.04 & 86.52 & 90.63 & 89.64 \\  & Recall & 94.96 & 95.34 & 95.78 & 94.91 & 94.93 \\  & F1–Score & 92.95 & 89.33 & 90.91 & 92.73 & 92.21 \\ \hline \multirow{3}{*}{Severity 3} & Precision & 73.92 & 58.32 & 68.94 & 72.70 & 71.42 \\  & Recall & 62.82 & 29.19 & 41.91 & 61.27 & 56.58 \\  & F1–Score & 67.92 & 38.90 & 52.13 & 66.50 & 63.14 \\ \hline \multirow{3}{*}{Severity 4} & Precision & 73.97 & 77.58 & 80.56 & 77.17 & 75.63 \\  & Recall & 44.35 & 37.46 & 31.12 & 44.08 & 41.89 \\ \cline{1-1}  & F1–Score & 55.46 & 50.53 & 44.89 & 56.11 & 53.91 \\ \hline \hline \end{tabular}
\end{table} 
Table 12: Performance of each prediction model (%). As shown in Figure 9, the experimental results show that all model predictions using ReMAHA oversampling mixing are better than the unmixed model. With the introduction of ReMAHA oversampling, the models have shown notable improvements in F1-Score, ranging from 0.3% to 9.32%, especially in the severity levels 1 and 4. While the addition of oversampling increases the number of predictions for minority class samples, it can lead to a decrease in precision if misclassified. However, ReMAHA has demonstrated improvements in F1-Score, precision, and recall for minority class categories 1 and 4. From the perspective of algorithms and sampling, the combined ReMAHA and CatBoost show the most stable predictive performance. Particularly, the F1-Score and recall for minority classes 1 and 4 are the highest, indicating that this hybrid model accurately identifies minority class samples. To highlight the contrast before and after sampling, we computed the differences between the models using various prediction algorithms (CatBoost, AdaBoost, GBDT, XGBoost, and LightGBM) after employing the ReMAHA sampling and those used before, as depicted in Figure 10. Although after processing with the ReMAHA oversampling algorithm, the weights of minority class samples have increased, potentially leading to a decrease in precision while enhancing recall. Overall, upon incorporating ReMAHA oversampling, the majority of performance metrics for prediction models have significantly improved, especially for the label 4. ## 5 Discussion

ReMAHA-CatBoost's comparisons at different levels confirm its excellent performance in oversampling and prediction. These experimental results indicate that ReMAHA-CatBoost is effective in recognizing different severity levels of traffic accidents. At the same time, we did not consume too much extra computer resources in the process of generating data, in the ReMAHA oversampling algorithm to generate new data, consumed 2594.3 MB of computer memory, less than the consumption of SMOTE, ROS, and ADASYN algorithms. It is worth noting that the addition of oversampling algorithms can increase the number of predictions for minority class samples. However, with increased data generation, the risks also grow.