## 4 Engineering Case Application
### Rock-Mass Classification Prediction
Figure 21 shows that the BILSTM and SVM models performed better regarding the prediction of class III surrounding rocks, involving fewer errors, with no obvious differences evident in the figure, while the MLP model performed in general. For the prediction of class IV surrounding rocks, the prediction accuracy of the three methods decreased, with the final performances being BILSTM > MLP > SVM, and the SVM model having more error points. For the prediction of class V surrounding rocks, the BILSTM model was the best, and the other two models had similar prediction results. Figures 20 and 21 show that the BILSTM model proposed in this study outperforms the other two methods. The performance and prediction results of each model were quantitatively evaluated and compared using the evaluation metrics in Section 3.2. The results of each evaluation metric are shown in Table 7, where the following can be seen: (1) All metrics of the BILSTM model were higher than those of the other two models; hence, the BILSTM model exhibited better prediction ability, with the values of each metric being \(\text{Accuracy}_{\text{overall}}=0.900\), \(\text{Precision}_{\text{overall}}=0.904\), \(\text{Recall}_{\text{overall}}=0.898\), and \(\text{F}_{\text{1-overall}}=0.900\). (2) For the prediction of a certain class of surrounding rock, the BILSTM model exhibited excellent performance. Taking class V surrounding rocks as an example, we considered the precision, recall, and F1 metrics together. Regarding precision, the BILSTM model had 0.889, while the MLP and SVM models had 1.000; regarding recall, the BILSTM model had 0.889, while the MLP and SVM models had 0.722 and 0.611, respectively; regarding the F1 value, the BILSTM model had 0.889, while the MLP and SVM models had 0.839 and 0.759, respectively. Combining the results of the three metrics, even though the precision of the BILSTM model was lower than those of the MLP and SVM models, it can still be concluded that the prediction ability of the BILSTM model for class V surrounding rocks was better than those of the MLP and SVM models. Figure 21: Scatter plot of the actual class predicted results. (**a**) BILSTM, (**b**) MLP, and (**c**) SVM. Figure 20: Actual classes and predicted results. Overfitting reflects the poor generalization ability of the model, i.e., the model has good performance in the training set, but poor performance in the test set. To assess the overfitting, the BILSTM, MLP, and SVM models were used to predict the training and test sets. Table 9 presents the results. The performance was evaluated based on accuracy, and the differences between the training-set and test-set accuracies were used to evaluate the generalization performance of the model. Table 9 shows the following: (1) The BILSTM model had the highest accuracy values in both the training and test sets, thereby proving its high performance. (2) The difference values of the BILSTM, MLP, and SVM models were 0.054, 0.116, and 0.094, respectively. The value of the BILSTM model was the lowest, indicating that it has a good generalization performance, followed by that of the SVM model, while the MLP model exhibited the worst generalization. Although the MLP and SVM models performed well on the training set, they performed poorly on the test set and suffered from overfitting. The BILSTM deep neural network model proposed in this paper can handle unbalanced datasets well and performs well while predicting the surrounding rock classes. Applying this model in practical engineering can provide for the accurate identification of the surrounding rock classes in front of the tunnel face and serve as a basis for dynamically designing tunnels.