## 5 Results
### Performance Comparison with other Algorithms  
To further validate the superiority of the RFECV-Optuna-XGBoost model in recognizing the surrounding rock grades of TBM excavation, a comparative analysis was conducted using the RF, GBDT, and DT algorithms against the model presented in this study. Moreover, to maximize the performance of each model, Optuna hyperparameter optimization was performed on all three models to obtain their respective optimal hyperparameter combinations. The key hyperparameters of each model, the settings of the optimized hyperparameters, and their ranges are listed in Table 7, and the final optimization results are also presented in Table 7. It should be noted that the same dataset was used for training and testing all three algorithms. Based on the hyperparameter optimization results shown in the table, after Optuna optimization, the RF algorithm's optimal hyperparameter combination included 'n_estimators' at 290, 'learning_rate' at 0.4856,'max_depth' at 13,'min_samples_split' at 10,'min_samples_leaf' at 6, and'max_features' at 'auto'. For the GBDT model, the best \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Feature Set** & **Accuracy** & **Precision** & **Recall** & **F1** \\ \hline Complete feature set & 0.9833 & 0.9803 & 0.9813 & 0.9807 \\ Optimal subset of features & 0.9083 & 0.9074 & 0.9114 & 0.9090 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Validation results for the optimal feature subset. hyperparameter combination obtained through optimization included 'n_estimators' at 51, 'learning_rate' at 0.4674,'max_depth' at 18,'min_samples_split' at 6, and'min_samples_leaf' at 9. For the DT model, the best hyperparameter combination obtained through optimization included 'criterion' at 'gini','max_depth' at 21,'min_samples_split' at 0.1019, and'min_samples_leaf' at 3. Applying these optimal hyperparameter combinations to the RF, GBDT, and DT algorithms and testing them on the KS Tunnel dataset resulted in the achievement of the accuracy, precision, recall, and F1 scores and the generation of confusion matrices. From Section 5.3 to Section 5.4, we compare the Optuna-XGBoost algorithm with the RF, GBDT, DT, PSO-XGBoost, and XGBoost algorithms. These results are illustrated in Figures 6 and 7, respectively. The performance of each model on the test set, including the accuracy, precision, recall, and F1 scores and the confusion matrix, is presented in Figure 8.  
As shown in Figure 7, compared to the unoptimized XGBoost and PSO-XGBoost models, the four evaluation metrics improved by 4.18-5.35%, 3.54-4.64%, 4.16-5.15%, and 3.59-5.45%, respectively. This indicates that Optuna is a more efficient method for hyperparameter optimization than PSO. Figures 6 and 7 show that among the six algorithms, the Optuna-XGBoost algorithm exhibited a notably superior overall performance. Compared to the underperforming DT model, the RFECV-Optuna-XGBoost model in this study achieved the best scores in all four evaluation metrics on the test set: accuracy, precision, recall, and F1 score. The improvements over the RF, GBDT, and DT in these metrics were 3.15-14.56%, 2.79-15.75%, 2.55-15.53%, and 2.68-15.95%, respectively. Therefore, the RFECV-Optuna-XGBoost model demonstrates excellent overall performance on the test set. In addition, the confusion matrix results must be considered. Figure 8 shows that only one prediction error was misclassified as IV in cases where the surrounding rock grade was II. When the actual surrounding rock grade was IV, there was only one prediction error, a misclassification as IIIb. These results demonstrate the effectiveness of the Optuna-XGBoost model in accurately predicting surrounding rock grades under various conditions. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithm** & **Hyperparameter** & **Best Search Space** & \begin{tabular}{c} **Optimal** \\ **Hyperparameter** \\ \end{tabular}  \\ \hline RF & \begin{tabular}{c} n\_estimators \\ learning\_rate \\ max\_depth \\ min\_samples\_split \\ min\_samples\_leaf \\ max\_features \\ \end{tabular}  &