## 2 The BP Neural Network Model
### Selection of the Sample Data  
The accuracy and reliability of the first weighting prediction depend on the understanding of the roof pressure theory. Before mining, the coal seam is balanced with the strata in all directions. After excavating the cut hole, the rock will be deformed due to the destruction of the original stress balance, and a new stress balance will be generated, resulting in the formation of a temporarily balanced rock loosening circle above the roof. The roof weighting refers to the pressure of the hydraulic support supporting the circle. Two main factors affect the roof pressure of the working face: the geological conditions and mining process parameters. The geological conditions mainly include the lithology and thickness of the direct roof and basic roof of the working face, the inclination, and the depth of coal seam and other parameters. The mining technological parameters mainly include the support pattern, the length, width, and mining height of the working face, and the advance speed [22; 23; 24; 25; 26]. There is a nondeterministic relationship between the first weighting and the various influencing factors in the coal mine roof, and the influence degree of each factor on the output results is also different. Too many input parameters will affect the speed of the neural network training and bring about some difficulties in data acquisition. Therefore, a correlation analysis of various factors is needed to select the appropriate sample parameters. The gray correlation analysis method is adopted in this paper to analyze the relationships between various factors, which applies to nonlinear problems with complex structures and can be used to conduct a quantitative comparative analysis of a series of dynamic data [27]. The initial sample input parameters chosen are the depth and dip of the coal seam and their varying rates, the length and width of the working face, the thickness of the coal  
Figure 1: Flowchart of the BP neural network. seam, main roof and immediate roof, mining height, advance speed, and roof condition. The output parameters are selected as the initial pressure and periodic pressure. Because the data for the mining height, dip, and coal thickness are only average values and are changing, a simple average value cannot reflect the change of the values, so this paper introduces the rate of change of the mining height \(\Delta S\), the rate of change of the dip \(\Delta\beta\), and the rate of change of the coal thickness \(\Delta M\). \[\Delta s=\frac{s_{2}-s_{1}}{\overline{s}} \tag{1}\]  
\[\Delta\beta=\frac{\beta_{2}-\beta_{1}}{\overline{\beta}} \tag{2}\]  
\[\Delta M=\frac{M_{2}-M_{1}}{\overline{M}}, \tag{3}\]  
where \(S_{1}\), \(S_{2}\), and \(\overline{S}\) are the minimum, maximum, and average values, respectively, of the buried depth;\(\beta_{1}\), \(\beta_{2}\), and \(\overline{\beta}\) are the minimum, maximum, and average values, respectively, of the coal seam pitch; and \(M_{1}\), \(M_{2}\), and \(\overline{M}\) are the minimum, maximum, and average values, respectively, of the coal thickness. Table 1 represents a portion of the original data. Because the dimensions and orders of magnitude of each input parameter are different, the input parameters must be dimensionless before conducting the gray correlation analysis [28], and the formula used is Equation (4):  
\[x_{i}^{\prime}(k)=\frac{x_{i}(k)}{\frac{\mathbbm{1}}{m}\sum\limits_{k=1}^{m}x _{i}(k)}, \tag{4}\]  
where \(x_{i}^{\prime}(k)\) is the \(k\)th dimensionless value of the \(i\)th input parameter, \(x_{i}^{\prime}(k)\) is the \(k\)th value of the \(i\)th input parameter, and \(m\) is the total of the \(i\)th input parameter.