# Prediction of Tunnel Face Stability Using a Naive Bayes Classifier
## 5 Prediction of Stability and Estimation of Errors
For example, if a sample with \(c~{}=~{}15\) kPa and \(\varphi~{}=~{}25^{\circ}\) is stable, samples with \(c~{}=~{}15\) kPa, \(\varphi~{}=~{}30^{\circ}\), or \(c~{}=~{}25\) kPa, \(\varphi~{}=~{}30^{\circ}\), or \(c~{}=~{}30\) kPa, \(\varphi~{}=~{}30^{\circ}\) are also stable (geometry parameters remains constant). In such a manner, 52 additional samples were obtained and labeled according to strength reduction analyses, as shown in Figure 8.  
\[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}\]0 Strength reduction factors with additional samples. \[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}\]1 Error estimation for the first classifier. (**a**) Stable probability of the samples with \(F_{s}\geq 1\); (**b**) unstable probability of the samples with \(F_{s}<1\). With these extra 52 stable samples, the number of stable samples becomes \(45+52\ =\ 97\), the number of unstable samples remains \(750-45\ =\ 705\), while the total number of samples increases to \(750+52\ =\ 802\). As a result, the prior probability of the stable and unstable states can be altered:  
\[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}\]2  
\[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}\]3  
Table 3 summarizes the calibrated model parameters associated with the PDFs of the features. Another naive Bayes classifier (referred to as the second classifier subsequently) was constructed with the PDFs (Figure 9) of the features, as well as the recalculated prior probabilities. Note that the model parameters relating to the unstable samples remain constant while those relating to the stable samples changed slightly due to the additional stable samples. Error estimation of the second classifier was performed in the same way. The results in Figure 10 demonstrate that the rate of type I error decreases substantially from 40% to 6%, and the rate of type II error increases from 0% to 0.28%. If necessary, adding other samples can further improve the accuracy of the classifier. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Stable Samples**} & \multicolumn{4}{c}{**Unstable Samples**} \\ \hline \(x\) & C/m & \(D\)/m & \(c\)/kPa & \(\varphi\)/\({}^{\circ}\) & \(x\) & C/m & \(D\)/m & \(c\)/kPa & \(\varphi\)/\({}^{\circ}\) \\ \(\mu\) & 16.13 & 5.59 & 24.30 & 24.33 & \(\mu\) & 17.61 & 10.29 & 14.55 & 14.55 \\ \(\sigma\) & 8.90 & 1.06 & 5.00 & 5.16 & \(\sigma\) & 8.52 & 3.44 & 7.00 & 7.00 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Parameters associated with PDF (the second classifier). Figure 9: Updated PDFs of features with extra stable samples: (**a**) the cover depth; (**b**) the diameter; (**c**) the cohesive strength; (**d**) the friction angle. To check the validation of the constructed classifiers, 50 new samples were randomly chosen and labeled according to strength reduction analyses. The calculated stable or unstable probabilities of the samples are plotted vs. the simulated safety factors and shown in Figures 11 and 12. As can be seen, most of the test samples can be correctly classified, and the 2 nd classifier performs much better than the first one regarding both stable and unstable samples. This is consistent with the conclusion obtained from the error estimations of the two classifiers using the training dataset. Consequently, the 2 nd naive Bayesian classifier is recommended for initial predictions of tunnel face stability. A number of predictions can be readily conducted using Equations (7) and (8) based on  
Figure 11: Prediction of the test data using the first classifier. (**a**) Stable probability of the samples with \(F_{s}\geq 1\); (**b**) unstable probability of the samples with \(F_{s}<1\). Figure 12: Prediction of the test data using the second classifier.