# Prediction of Tunnel Face Stability Using a Naive Bayes Classifier
## 5 Prediction of Stability and Estimation of Errors  
Together with the identified PDFs, a naive Bayes classifier (referred to as the first classifier subsequently) can be constructed with the calculated prior probabilities. If we consider a tunnel with \(C=12\) m, \(D=6\) m, \(c=24\) kPa, \(\varphi=18^{\circ}\), the stable and unstable probability of the given value of the cover depth, \(C=12\) m, can be calculated based on its PDFs:  
\[P(C|\text{Stable})=\frac{1}{\sqrt{2\pi{\cdot}8.689^{2}}}e^{(\frac{-(12-15.78)^{ 2}}{2\times 8.689^{2}})}=0.0403, \tag{21}\]  
\[P(C|\text{Unstable})=\frac{1}{\sqrt{2\pi{\cdot}8.52^{2}}}e^{(\frac{-(12-17.61) ^{2}}{2\times 8.52^{2}})}=0.0377. \tag{22}\]  
Similarly, the values of the other probabilities can be calculated according to the PDFs of the features as:  
\[P(D|\text{Stable})=0.3487,\;P(D|\text{Unstable})=0.0533, \tag{23}\]  
\[P(c|\text{Stable})=0.0795,\;P(c|\text{Unstable})=0.0229, \tag{24}\]  
\[P(\varphi|\text{Stable})=0.0364,\;P(\varphi|\text{Unstable})=0.0505. \tag{25}\]  
The normalized constant can be identified as:  
\[evidence=2.44\times 10^{-6}+2.18\times 10^{-6}=4.62\times 10^{-6}. \tag{26}\]  
The posterior probability of the stable state is calculated as:  
\[P(\text{Stable}|12\text{ m},6\text{ m},24\text{ kPa},18^{\circ})=\frac{2.44\times 10^{-6}}{4.6 2\times 10^{-6}}=0.528. \tag{27}\]  
And the posterior probability of the unstable state is:  
\[P(\text{Unstable}|12\text{ m},6\text{ m},24\text{ kPa},18^{\circ})=\frac{2.18\times 10^{-6}}{4.6 2\times 10^{-6}}=0.472. \tag{28}\]  
As mentioned above, the face-stability of the tunnel with the calculated \(P(\text{Stable}|C,D,c,\varphi)>P(\text{Unstable}|C,D,c,\varphi)\) can be concluded to be stable. For verification, a 2D numerical model was built with OptumG2 to perform a Strength Reduction analysis with the same values of the features. Figure 6 shows the adaptive mesh of the model, including the geometry parameters, strength parameters, and the boundary conditions. Normal fixities were applied on the boundary of the excavated element to serve as the temporary lining. The simulated safety factor is \(F_{s}=1.047\), which means that a limit state can be achieved if the strength parameters \(c_{cr}=24/1.047=22.92\) kPa and \(\tan\varphi_{cr}=\tan 18^{\circ}/1.047=0.31(\varphi_{cr}=17.24^{\circ})\)  
Figure 6: Strength reduction analysis for verification. are adopted in an analysis while the other conditions remain constant. In other words, it indicates a stable state with \(F_{s}~{}=~{}1.047>1\), verifying the above prediction. In the same way, the error rate of the constructed naive Bayes classifier can be estimated with the entire training data. The estimation results are indicated in Figure 7, where two red dashed lines with the posterior probability equal to 0.5 are added as baselines to distinguish the error estimations, as located below the baseline. Results in Figure 7 show that 18 of the 45 stable samples were predicted to be unstable. The error rate estimated for the stable samples (40%) is the well-known indicator of type I error, which is an underestimation of the face-stability. The safety factors of the error estimations range from 1.01 to 1.15, which indicates that type I error is more likely to happen when the face-stability of a tunnel is close to the limit state, i.e., \(F_{s}\approx 1.0\). On the contrary, type II error is an overestimation of the face-stability. Fortunately, the posterior probabilities of the unstable samples show no points located below the baseline, indicating that the rate of type II error is zero. This is mainly because the number of the stable samples is much less than that of the unstable samples. As a result, we extended the ranges of the strength parameters with two higher values, i.e., \(c~{}=~{}30\) kPa and \(\varphi~{}=~{}30^{\circ}\), intended to obtain additional stable samples to reduce the rate of type I error. For samples with safety factors greater than 1.0, the material parameters were increased to high levels to obtain new stable samples.