# Prediction of Tunnel Face Stability Using a Naive Bayes Classifier
## 2 Description of the Proposed Method
Using [PERSON] theorem, the conditional probability can be decomposed as follows:  
\[P(A_{n}|\mathbf{B})\ =\ \frac{P(A_{n})P(\mathbf{B}|A_{n})}{P(\mathbf{B})}. \tag{5}\]  
Using Bayesian probability terminology, Equation (5) can be rewritten as:  
\[\text{Posterior}\ =\ \frac{\text{Prior}\times\text{Likelihood}}{\text{ Evidence}}. \tag{6}\]  
If we choose \(\mathbf{B}\ =\ (C,D,c,\varphi)\) as the associated features influencing the face-stability of tunnels, the posterior probabilities concerning the stable and unstable states can be expressed as:  
\[P(\textit{Stable}|C,D,c,\varphi)\ =\ \frac{P(\textit{Stable})P(C|\textit{Stable })P(D|\textit{Stable})P(c|\textit{Stable})P(\varphi|\textit{Stable})}{\textit{ evidence}}, \tag{7}\]  
\[P(\textit{Unstable}|C,D,c,\varphi)\ =\ \frac{P(\textit{Unstable})P(C|\textit{Unstable })P(D|\textit{Unstable})P(c|\textit{Unstable})P(\varphi|\textit{Unstable})}{ \textit{evidence}}, \tag{8}\]  
where _evidence_ is a normalization constant that can be calculated as:  
\[ \begin{split}&\textit{evidence}\ =\ P(\textit{Stable})P(C|\textit{Stable })P(D|\textit{Stable})P(c|\textit{Stable})P(\varphi|\textit{Stable})+\\ &\ P(\textit{Unstable})P(C|\textit{Unstable})P(D|\textit{ Unstable})P(c|\textit{Unstable})P(\varphi|\textit{Unstable}).\end{split}  \tag{9}\]  
A naive Bayes classifier can be constructed by synthesizing the naive Bayes probability model and a decision rule. One common rule is the well-known maximum a posteriori (MAP) decision rule. Under this circumstance, the prediction of a tunnel face stability can be accordingly performed such that \(P(\textit{Stable}|C,D,c,\varphi)>P(\textit{Unstable}|C,D,c,\varphi)\) indicates a stable state while \(P(\textit{Stable}|C,D,c,\varphi)<P(\textit{Unstable}|C,D,c,\varphi)\) indicates an unstable state. Using the evidence, the posterior probabilities of the events are normalized and their sum becomes 1, as shown in Equation (10). In conjunction with _MAP_ decision rule, the posterior probabilities of the events can be employed to classify the stable and unstable states such that \(P(\textit{Stable}|C,D,c,\varphi)>0.5\) and \(P(\textit{Unstable}|C,D,c,\varphi)<0.5\) represent a stable state, \(P(\textit{Stable}|C,D,c,\varphi)<0.5\) and \(P(\textit{Unstable}|C,D,c,\varphi)>0.5\) represent an unstable state. \[P(\textit{Stable}|C,D,c,\varphi)+P(\textit{Unstable}|C,D,c,\varphi)\ =\ 1 \tag{10}\]With the number of the stable samples (denoted by \(n_{2}\)) and unstable samples (denoted by \(n_{1}\)), the prior probabilities of the stable and unstable states can be determined as follows:  
\[P(\textit{Stable})\ =\ n_{2}/(n_{1}+n_{2}),\ P(\textit{Unstable})\ =\ n_{1}/(n_{1}+n_{2}). \tag{11}\]  
Beyond that, the model parameters, i.e., expectations and standard deviations, were estimated and calibrated by the well-known maximum likelihood functions before the identification of the probability density functions of the related features. After that, it is possible to calculate the likelihood (i.e., \(P(x_{n}|\textit{Stable})\) and \(P(x_{n}|\textit{Unstable})\)) of each feature. A naive Bayes classifier was subsequently constructed based on the identified prior probabilities, as well as the calculated likelihood of each feature. The posterior probabilities of the stable and unstable states can be calculated with a given set of values of the features. It enables the prediction of the face-stability of tunnels by comparing the values of the two posterior probabilities.