## 3 Model Development
### Rockburst Prediction Model
(2) Model evaluation  
The prediction models developed in this study were compared to eleven supervised learning algorithms in the machine learning algorithm package in scikit-learn, including K-nearest neighbor (KNN), decision trees (DT), multilayer perceptron (MLP), gradient boosting decision trees (GBTD), random forest (RF), naive Bayes model (NBM), Gaussian processes (GP), bagging of GP (BagGP), bagging of KNN (BagKNN), bagging of NBM (BagNBM), and LightGBM. First, the performance of the eighteen prediction models was evaluated using the test dataset. The prediction results were plotted as confusion matrices, as shown in Figure 12. The accuracy rate is in yellow, while the precision and recall are in green. To visually compare the performance of each model, the accuracy, recall, and F1 score of different algorithms are demonstrated in Figure 13. The higher the indices' values, the better their prediction performance. Figure 12: Test sample confusion matrix. Figure 12 illustrates the confusion matrices for the test set, showcasing the performance of various models in predicting rockburst hazard levels. Each matrix provides a detailed breakdown of classification results into four categories: none (I), light (II), moderate (III), and strong (IV). The matrices indicate the number of true positives, false positives, true negatives, and false negatives for each category, with larger numbers corresponding to darker colored squares. By means of the confusion matrix, the comprehensive evaluation of model classification performance can be obtained. The confusion matrices reveal that the PSO-BPNN-AdaBoost and PSO-BPNN-XGBoost models achieved the highest classification accuracy among all models. These models demonstrated a strong ability to correctly classify samples across all four rockburst levels, highlighting their robustness and effectiveness in capturing the complex patterns of the dataset. However, some misclassifications were observed, particularly between adjacent levels, such as light (II) and moderate (III), which can be attributed to the imbalanced nature of the dataset and the overlapping feature space of these categories. In contrast, models such as the BP and KNN exhibited lower accuracy and higher misclassification rates, frequently confusing moderate (III) and strong (IV) levels. This outcome reflects their limited capacity to discern subtle variations in the feature space. The analysis also highlights the critical impact of preprocessing techniques like SMOTE. Models trained on the balanced dataset achieved more consistent performance with fewer misclassifications, particularly for minority classes such as none (I) and strong (IV), which are underrepresented in the raw dataset. These results emphasize the importance of data preprocessing in enhancing model accuracy and reliability. Moreover, the necessity of employing suitable data balancing strategies is underscored to improve the predictive capability and generalizability of machine learning models, especially for complex classification problems involving imbalanced datasets. Overall, the accuracy values of different models ranged from 0.485 to 0.901. PSO-BPNN-AdaBoost performed best with an accuracy of 0.901, followed by PSO-BPNN-XGBoost with an accuracy of 0.851. Compared to other models, the PSO-BPNN-AdaBoost model exhibited remarkably high accuracy, recall, and F1 score, indicating its significant advantages. In addition, the performance of the standalone BP model was poor, with an accuracy of only 0.485. After the generalization ability of the BPNN was enhanced by PSO optimization, the performance was significantly improved, which proved the advantages of the BPNN optimized by PSO. Figure 13: Accuracy, recall, and F1 scores of different models. Furthermore, the ROC curves of the eighteen prediction models for each rockburst class sample were plotted to evaluate their performance, as shown in Figure 14. At the same time, the corresponding AUC (area under curve) values were calculated. The ROC curve generally showed a convex trend as the threshold changed.