## 2 Material and Methods
### The BP Neural Network Model
The error performance function is obtained as follows:  
\[E_{k}=\frac{1}{2}\sum k(T_{k}(T_{k}-f(\sum_{j=1}^{g}W_{jk}f(\sum_{i=1}^{n}w_{ ij}-c_{j})-c_{k}))) \tag{4}\]  
By deriving the error function from the weight and threshold of the output, we have the following:  
\[\frac{\partial E_{k}}{\partial w_{jk}}=-(T_{k}-\Theta_{k})f^{\prime}(\sum_{j=1 }^{g}O_{j}w_{jk}-c_{k})O_{j} \tag{5}\]  
\[\frac{\partial E_{k}}{\partial c_{k}}=(T_{k}-\Theta_{k})f^{\prime}(\sum_{j=1 }^{g}O_{j}w_{jk}-c_{k}) \tag{6}\]  
The error of the output node is obtained as follows:  
\[\delta_{k}=(T_{k}-\Theta_{k})f^{\prime}(\sum_{j=1}^{g}O_{j}w_{jk}-c_{k}) \tag{7}\]By substituting Equation (7) into Equations (5) and (6), the following equations are described as follows:  
\[\frac{\partial E_{k}}{\partial w_{jk}}=-\delta_{k}O_{j} \tag{8}\]  
\[\frac{\partial E_{k}}{\partial c_{k}}=\delta_{k} \tag{9}\]  
The weight and threshold adjustment formulas are described as follows:  
\[w_{jk}(e+1)=w_{jk}(e)+\Delta w_{jk}=w_{jk}(e)+\eta\delta O_{j} \tag{10}\]  
\[T_{k}=f\left(\sum_{j=1}^{g}O_{j}w_{jk}-c_{k}\right)\quad k=1,2,\ldots,s \tag{2}\]0  
In the hidden layer nodes, the weight and threshold are described as follows:  
\[T_{k}=f\left(\sum_{j=1}^{g}O_{j}w_{jk}-c_{k}\right)\quad k=1,2,\ldots,s \tag{2}\]1  
\[T_{k}=f\left(\sum_{j=1}^{g}O_{j}w_{jk}-c_{k}\right)\quad k=1,2,\ldots,s \tag{2}\]2  
\(\eta\) is the learning rate of the BP neural network in Equations (10), (11), and (13). Simulation  
The evaluation object of the BP neural network is the overall safety of the coal mine; the number of neurons in the input layer is the same as the number of indicators in the index system for evaluating the safety risk in the underground coal mine, and a total of 46 secondary evaluation indicators were used as nodes in the input layer. In developing the predictive models, the input data were normalized before training the network to ensure the accuracy of the predicted results. This was performed to minimize the magnitude effect on the prediction results. The data sets were normalized to the range 0-1 using the following equations:  
\[T_{k}=f\left(\sum_{j=1}^{g}O_{j}w_{jk}-c_{k}\right)\quad k=1,2,\ldots,s \tag{2}\]3  
where \(X\) represents the original data, \(X_{norm}\) represents normalized data, and \(X_{max}\) and \(X_{min}\) are the maximum and minimum values, respectively, before normalization. The transformed data provides the risk evaluation value corresponding to the index, which satisfies the model's requirements. Of the data sets, 329 were selected for the training and testing data sets. [PERSON] et al. suggested that 70-80% of the whole data set should be used as a training set. Therefore, 264 and 65 data sets were used in this study to develop the underground coal mine safety risk assessment prediction models. 1. Activation function selection: The transfer function selection between the layers of the BP neural network is an important part of the network. The coal safety risk assessment depends on various factors, such as the problem's complexity, the data set's size, and the desired output. In this study, the hyperbolic tangent (tanh) and sigmoid functions were adopted for the hidden and output layers, respectively. 2. Training function: The training function in the BP neural network is responsible for adjusting the network weights during the training process. The goal of the training function is to minimize the difference between the network's output and the desired output for a given input. This study used the Levenberg-Marquardt algorithm as the best and optimal training function to adjust the connection weight and reduce the mean square error. 3. Determination of the number of hidden layer nodes: the hidden layer node is determined based on the complexity of the problem being solved, the amount and quality of the available data, and the desired level of accuracy. Therefore, in this study, a trial-and-error approach was used. A different number of nodes was adopted, and the performances of the networks were compared.