## 5 Results and Discussion  
### Model Evaluation  
After determining the optimal hyperparameter combinations, it was crucial to comprehensively and objectively evaluate the models' performance to ensure they provide high-precision rock mass classification predictions for engineering applications. Although the models demonstrated perfect fitting ability on the training set, their generalization capability needed to be verified using the test set.  
Confusion matrices for each model on the test set were established, as shown in Figure 7. A confusion matrix is a table where rows represent actual classes and columns represent predicted classes. From the figure, it is evident that all models achieve a perfect prediction for class II, with a value of 16. The unoptimized XGBoost performs poorly on class III, misclassifying four instances. After optimization, both BO-XGBoost and ZOA-XGBoost improve the correct classification numbers for classes III and IV. Various evaluation metrics calculated from the confusion matrix are presented in Table 4. The unoptimized XGBoost shows the poorest predictive performance, with the following metrics: Accuracy of 0.821, Kappa of 0.738, Precision of 0.829, Recall of 0.821, and F1-score of 0.813. The optimized models exhibit better predictive performance. Specifically, ZOA-XGBoost significantly outperforms the unoptimized XGBoost model across multiple performance metrics, highlighting ZOA's advantage in hyperparameter tuning. The metrics for ZOA-XGBoost are Accuracy of 0.923, Kappa of 0.887, Precision of 0.932, Recall of 0.932, and F1-score of 0.922. BO also enhances XGBoost's predictive performance, albeit slightly less than ZOA-XGBoost, but still significantly better than the unoptimized model. The metrics for BO-XGBoost are Accuracy of 0.897, Kappa of 0.850, Precision of 0.916, Recall of 0.897, and F1-score of 0.896. These results indicate that BO is also effective in selecting XGBoost hyperparameters and significantly improving model performance. Figure 8 visually presents the evaluation metric scores for the three models on the test set. It is evident that ZOA-XGBoost achieves the highest score, demonstrating superior predictive performance. The performance ranking of the models is as follows: ZOA-XGBoost > BO-XGBoost > XGBoost. Additionally, Figure 9 illustrates the receiver operating characteristic (ROC) curves and the area under the ROC curve (AUC) values for each model across different classes. The closer the ROC curve is to the top left corner, the better the model's performance. Based on the curve distribution and AUC values, ZOA-XGBoost still exhibits the best performance, providing superior predictions for rock mass classification.  
Figure 6: Iterative convergence graph of the BO-XGBoost model.  
Figure 8: The final ranking of models during the testing phase.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **ACC** & **Kappa** & **Precision** & **Recall** & **F1-Score** \\ \hline XGBoost & 0.821 & 0.738 & 0.829 & 0.821 & 0.813 \\ BO-XGBoost & 0.897 & 0.850 & 0.916 & 0.897 & 0.896 \\ ZOA-XGBoost & 0.923 & 0.887 & 0.932 & 0.923 & 0.922 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Evaluation results of models during the testing phase.  
Figure 7: Confusion matrix of models during the testing phase: (a) XGBoost; (b) BO -XGBoost; (c) ZOA-XGBoost.