# Slope Stability Prediction Based on Incremental Learning Bayesian Model and Literature Data Mining
## 2 Materials and Methods
### Incremental Naive Bayes Model
#### 2.2.2 Incremental Learning Bayesian Model  
The naive Bayesian algorithm, a type of supervised machine learning algorithm, stands as the simplest form of Bayesian classification model, featuring high efficiency, accuracy, strong generalization ability, and suitability for incremental learning. It derives from the Bayesian theorem, with its calculation formula as follows:  
\[P(\,C_{i}|X)=\frac{P(\,X|C_{i})P(C_{i})}{P(X)} \tag{1}\]  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**No.** & **References** & \(\mathbf{H}\) & \(\mathbf{\beta}\) & \(\gamma\) & \(\mathbf{C}\) & \(\mathbf{\varphi}\) & \(\mathbf{ru}\) & **Other Variables** \\ \hline
1 & [22] & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & Null \\
2 & [23] & ✓ & ✓ & & ✓ & ✓ & & Peak ground \\  & & & & & ✓ & ✓ & & acceleration \\
3 & [24] & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & Null \\
4 & [25] & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & Null \\
5 & [26] & ✓ & ✓ & & ✓ & ✓ & & Soil Young’s Modulus, \\  & & & & & & & & Soil Depth \\
6 & [27] & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & Null \\
7 & [28] & ✓ & ✓ & ✓ & ✓ & ✓ & & Rainfall intensity, \\  & & & & & ✓ & ✓ & ✓ & & Rainfall duration \\
8 & [29] & & & & ✓ & ✓ & ✓ & & Null \\
9 & [30] & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & Null \\
10 & [31] & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & Null \\ \hline \hline \end{tabular}
\end{table}
Table 1: Factors selected for slope stability prediction.  
where \(C\) represents category label, \(X\) represents features of classification objects, \(P(C_{i})\) is the prior probability of the sample label \(C_{i}\), \(P(X|C_{i})\) represents the probability of feature \(X\) under the condition that the sample label is \(C_{i}\), \(P(X)\) is the prior probability of feature \(X\).  
Using Equation (1) to calculate the probability \(P(C_{i}|X)\) of each label under the condition of feature \(X\), the maximum probability is considered to be the label to which the sample to be classified belongs.  
When new sample data emerge from the original dataset, incremental learning is facilitated by utilizing new sample pairs to adjust the parameters \(P(C_{i})\) and \(P(X|C_{i})\). The methodology for this correction is outlined as follows:  
\[P^{\prime}(C_{i})=\frac{NP(C_{i})+I(C^{\prime}=C_{i})}{N+1} \tag{2}\]  
\[P^{\prime}(x_{j}|C_{i})=\frac{N_{i}P\big{(}x_{j}|C_{i})+I(C^{\prime}=C_{i})I(x ^{\prime}=x_{j})}{N_{i}+1} \tag{3}\]  
\[\left\{\begin{array}{l}P^{\prime}\big{(}x_{j}|C_{i}\big{)}=\frac{1}{\sqrt{2 \pi}\sigma^{\prime}_{i,x}}\exp\left[-\frac{\big{(}x_{j}-\mu^{\prime}_{i,x} \big{)}^{2}}{2\sigma^{\prime}_{i,x}\big{)}}\right]\\ \mu^{\prime}_{i,x}=\frac{\mu_{i,x}N_{i}+x^{\prime}I(C^{\prime}=C_{i})}{N_{i} +1}\\ \sigma^{\prime}_{i,x}\big{.}^{2}=\frac{\left[\sigma^{\prime}_{i,x}+\big{(}\mu^ {\prime}_{i,x}-\mu_{i,x}\big{)}^{2}\right]+\big{(}\mu^{\prime}_{i,x}-x^{ \prime}\big{)}^{2}}{N_{i}+1}\end{array}\right. \tag{4}\]  
In Equations (2)-(4), \(P^{\prime}(C_{i})\) is the corrected prior probability of label \(C_{i}\), \(P^{\prime}\big{(}x_{j}|C_{i})\) is the corrected occurrence probability of feature \(x_{j}\) under the condition of label \(C_{i}\); When \(x\) is a discrete variable, \(P^{\prime}\big{(}x_{j}|C_{i}\big{)}\) is calculated by Equation (3), When \(x\) is a continuous variable, \(P^{\prime}\big{(}x_{j}|C_{i}\big{)}\) is calculated by Equation (4); \(N\) and \(N_{i}\) are the total number of samples and the number of samples labeled as \(C_{i}\), respectively; Function \(I(\cdot)\) is an indicator function. When the condition in parentheses is true, the value is 1, otherwise it is 0; \(C^{\prime}\) is the label of the newly added sample, and \(x^{\prime}\) is the eigenvalue of the newly added sample; \(\mu_{i,x}\), \(\sigma_{i,x}\) and \(\mu^{\prime}_{i,x^{\prime}}\)\(\sigma^{\prime}_{i,x}\) are the mean and variance of the feature \(x^{\prime}\) in the sample labeled \(C_{i}\) before and after correction, respectively.