# Determining Rock Joint Peak Shear Strength Based on GA-BP Neural Network Method
## 3 Peak Shear Strength Prediction Model
### GA-BP Neural Network  
The genetic algorithm was used to optimize the BP neural network, and the GA-BP neural network peak shear strength prediction model was established. The neural network algorithm was realized by using MATLAB code. The process is shown in Figure 6. Of the 205 sets of data, 80% were used as the training set and 20% as the test set. The ratio of the training set to the test set was 4:1. The maximum number of iterations of the genetic algorithm was set to 1000, the learning rate was 0.01, the genetic generation was 50, and the population size was five. The weights and thresholds of the BP neural network can be regarded as the gene sequence in the genetic algorithm. The selection, crossover and mutation operations of the genetic algorithm were used to optimize the weights and thresholds of the neural network to achieve the effect of optimizing the neural network. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**R\({}^{2}\)** & **MAE** & **MBE** & **RMSE** \\ \hline
0.713497 & 0.458708 & 0.077069 & 0.661966 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Evaluation of prediction results of JRC-JCS model. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \(\sigma\) & \(JRC\) & \(JCS\) & \(\varphi\) & \(Size\) & \(v_{n}\) \\ \hline \(p\)-value & \(<\)0.01 & \(<\)0.01 & \(<\)0.01 & \(<\)0.01 & 0.015 & \(<\)0.01 \\ \(r_{xy}\) & 0.711 ** & 0.568 ** & \(-\)0.309 ** & 0.420 ** & \(-\)0.17 * & 0.359 ** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Correlation analysis between various factors and peak shear strength. The neural network module first needs to determine the structure of the neural network. After determining the structure, the weights and thresholds obtained by the genetic  
Figure 5: The scatter plot of predicted values and experimental values of the JRC-JCS model. Figure 6: GA-BP neural network model prediction flow chart. algorithm after iteration are added to the network, so that the connection between the input layer, the hidden layer and the output layer is completed. The training set data and the test set data are then used to train and test the network, so as to complete the establishment of the neural network model. Using this model, the rock joint shear strength can be predicted, and the operation can be repeated until the error requirements are met. By observing the peak shear strength predicted by the JRC-JCS model, it can be seen that \(\sigma_{n}\), \(\varphi\), \(JRC\), and \(JCS\) have a good mapping relationship with peak shear strength. The four factors (\(\sigma_{n}\), \(\varphi\), \(JRC\), \(JCS\)) contained in the JRC-JCS model are used as the input layer to establish a four-factor GA-BP neural network model. The structure of the neural network is shown in Figure 7a. The input layer contains \(\sigma_{n}\), \(\varphi\), \(JRC\), \(JCS\), there are seven hidden layers, and the output layer is the peak shear strength. Table 3 shows that in addition to the four factors of \(\sigma_{n}\), \(\varphi\), \(JRC\) and \(JCS\), the influence of _size_ and \(v_{n}\) on the peak shear strength is also significant. To improve the accuracy of the GA-BP neural network in predicting the peak shear strength, the factors of _size_ and \(v_{n}\) are  
Figure 7: Neural network structure diagram: (**a**) GA-BP neural network four-factor model structure diagram; (**b**) GA-BP neural network five-factor-1 model structure diagram; (**c**) GA-BP neural network five-factor-2 model structure diagram; (**d**) GA-BP neural network six-factor model structure diagram. also added to the input layer of the GA-BP neural network, and two neural network models with 5-7-1 structure are established. To distinguish these two five-factor models, the model with _size_ was named as the five-factor-1 model, and its structure is shown in Figure 7b. The model with \(v_{n}\) was named as five-factor-2 model, and its structure is shown in Figure 7c.