## 3 Methodology
### The ReMAHA Algorithm
#### 3.2.4 ReMAHA
\begin{table}
\begin{tabular}{c c} \hline \hline
**Models** & **Settings** \\ \hline SMOTE & sampling\_strategy = ‘auto’, k\_neighbors = 5 \\ ReMAHA & k = 4 \\ ADASYN & sampling\_strategy = ‘auto’, n\_neighbors = 5 \\ ROS & sampling\_strategy = ‘auto’ \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Sampling Parameter Settings. This is mainly reflected in the improvement of recall, where higher recall indicates better identification of minority class samples. However, as recall increases, some precision values decrease. This is because with the increase in minority class samples predicted, the precision of predictions may decrease. As shown in Table 10, ReMAHA achieves a precision of 71.41 and 76.31, recall of 75.60 and 53.23, and an F1-Score of 73.44 and 62.71 for labels 1 and 4, respectively, with oversampling performance relatively superior to other models. Figure 6a illustrates the ranking of feature importance in the original data. Figure 7 shows the effect of the oversampling algorithms ReMAHA, SMOTE, ADASYN, and ROS on the correlation of the data, respectively. It is noticeable that, compared to the original data, ReMAHA and ROS demonstrate the closest effects. However, ROS directly duplicates existing data, leading to a sensitive identification of certain classes during prediction, while yielding poor identification for other classes. Figure 6b demonstrates the confusion matrix before sampling, while Figure 8 presents the confusion matrices for various oversampling algorithms. Manifested in the confusion matrices, SMOTE, ROS, and ADASYN all exhibited varying degrees of overfitting, primarily by misclassifying label 2 and label 3 as label 1 or label 4. This occurrence is primarily attributed to insufficient data quality in the generated samples. For instance, the process of generating new data might not account for correlations or result in excessive overlap among generated data, rendering correct categorization challenging. Figure 5: Predictive performance of different oversampling models. Figure 6: Performance of the original data: (**a**) feature correlation; and (**b**) confusion matrix. Figure 8: Confusion matrix: (**a**) ReMAHA; (**b**) SMOTE; (**c**) ADASYN; and (**d**) ROS. Figure 7: Feature correlation: (**a**) ReMAHA; (**b**) SMOTE; (**c**) ADASYN; and (**d**) ROS. ### Predictive Model Comparison Experiment

To evaluate the effectiveness of ReMAHA-CatBoost, we conducted experiments involving eight different models (Table 11). These eight models were divided into two groups for comparison: prediction model comparison experiments, and prediction + sampling (hybrid) model comparison experiments. At the algorithm level, to ensure the accuracy of the experiments, we chose boosting algorithms, including AdaBoost [43], GBDT [44], XGBoost [45], LightGBM [46], and CatBoost. To ensure fairness in the experiments, default parameters were used for all models. First, we compared the prediction models without any sampling. US-Accidents Table 12 shows the results of the five algorithms on the unsampled U.S. accident dataset. It can be observed that AdaBoost performs significantly worse on the minority class label 1 compared to the other models. While it achieves a high recall for the minority class label 4, the low F1-Score indicates that AdaBoost identifies more instances of label 4 but with poor precision. This is because adaptive models focus more on misclassified samples in each iteration, and with the highly imbalanced dataset, the adaptive model tends to favor the majority class during prediction. CatBoost, XGBoost, and LightGBM, as emerging variants of gradient-boosting algorithms, have similar performance. CatBoost achieves an F1-Score of 72.53 for class label 1 on this dataset, slightly higher than the other two. When considering both minority class labels, CatBoost performs better overall. CatBoost's superior performance in identifying minority classes in this experiment is mainly attributed to its built-in symmetric trees used as split nodes, making it more suitable for imbalanced datasets.