# Prediction Model for Shield Tunneling Roll Angle and Pitch Angle: A PCA-PSO-LGBM Approach
## 4 Result and Discussion  
### PCA-PSO-LGBM Model Prediction Results  
The basic characteristics of the 11 tunnelling parameters in Table 1, except the roll angle and pitch angle, were determined by PCA. The cumulative contribution rate threshold was generally set to more than 85%. In order to minimize the loss of information in the original data, this threshold was set to 95% in this paper. Table 3 shows the first nine principal components with a cumulative contribution rate of 95% and their respective contribution rates. After PCA processing, the selected nine tunnelling parameters and seven geological parameters were used as the input parameters of the model. Although the belt conveyor speed and the screw conveyor speed were discarded among the input parameters, these two tunnelling parameters are not important factors that affect the shield machine's roll angle and pitch angle because the belt conveyor is mainly responsible for transporting the truck excavated by the shield machine from inside the tunnel to the yard or dump on the ground, and the rotation of the screw conveyor can improve the muck and then transport the improved muck to the belt conveyor system to realize the continuous mucking operation. That is to say, the rotation speeds of the belt conveyor and the screw conveyor have little relationship with the machine-rock interaction during shield tunnelling and have little influence on the roll angle and the pitch angle, so they can be ignored. The processed dataset of 474 rings was divided into a training set, validating set, and testing set at a ratio of 4:1:1, followed by the construction of predictive models for the roll angle and pitch angle, respectively. The optimal hyperparameter values for the LGBM model of both the roll angle and pitch angle after optimization with PSO are shown in Table 4. To quantify the predictive capability of the model, the Mean Absolute Error \(MAE\) and the Coefficient of Determination \(R^{2}\) were used as performance evaluation metrics. The definitions of these two indicators are as follows:  
\[MAE=\frac{1}{n}\sum_{i=1}^{n}|\hat{y}_{i}-y_{i}|, \tag{19}\]  
\[R^{2}=1-\sum_{i=1}^{n}{(\hat{y}_{i}-y_{i})^{2}}/\sum_{i=1}^{n}{(\overline{y}-y _{i})^{2}}, \tag{20}\]  
where \(n\) represents the number of samples, \(\hat{y}_{i}\) denotes the predicted value, \(y_{i}\) denotes the true value, and \(\overline{y}\) represents the average value. The closer \(MAE\) is to 0 and \(R^{2}\) is to 1, the higher the prediction accuracy of the model. Figures 11 and 12 present the prediction results of the PCA-PSO-LGBM model, showing that for both the roll angle and pitch angle, the predicted values closely match the actual \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Principal** & **CS** & **PA** & **PB** & **PC** & **PD** & **PE** & **PF** & **HT** & **HP** \\
**Components** & 0.315 & 0.176 & 0.127 & 0.100 & 0.082 & 0.063 & 0.055 & 0.027 & 0.027 \\ \hline
\begin{tabular}{c} Contributing \\ contribution rate \\ \end{tabular} & 0.315 & 0.491 & 0.618 & 0.718 & 0.800 & 0.863 & 0.918 & 0.945 & 0.972 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: PCA feature extraction results. values. The \(MAE\) for the roll angle on the testing set is only 0.068\({}^{\circ}\), with an \(R^{2}\) reaching 0.980. For the pitch angle, the \(MAE\) on the testing set is only 0.048\({}^{\circ}\), with an \(R^{2}\) value of 0.985. Figure 13 provides a statistical analysis of the absolute error between predicted and actual values in the testing set, revealing that most of the prediction errors for the roll angle are below 0.10\({}^{\circ}\), accounting for 81% of the cases, while only 3.8% of the predictions have errors exceeding 0.20\({}^{\circ}\). The absolute values of the prediction errors for the pitch angle are all below 0.20\({}^{\circ}\), with 87.34% of them being below 0.10\({}^{\circ}\).