## 3 Model Building and Algorithm Design
### Prediction Algorithm Design  
According to the analysis of the above model establishment and solution, the mine pressure hazard prediction algorithm is designed, and the design process of the algorithm is shown in Figure 2.  
The design process of the algorithm mainly includes the following steps:  
Step 1. Obtain the original mine pressure monitoring data in the mine pressure monitoring management information system of C Coal Mine. Step 2. Preprocess original data to obtain the sample dataset, including denoising processing and standardized processing, to eliminate the interference of abnormal data and dimensions on the prediction results. Step 3. Initialize the weights of all evaluation indicators as decimals between 0 and 1. Step 4. Substitute the initialized weights and the sample dataset into Formula (6) to calculate the predicted values of this iteration. Step 5. Calculate the gradient of this iteration according to Formula (16). Step 6. Update the weights of all evaluation indicators using the Adagrad gradient algorithm according to Formula (18). Step 7. Determine whether the number of iterations reaches the initial setting. If it does not reach the initial setting, go back to step 4 for the next iteration; if it reaches the initial setting, output the current weights. The prediction algorithm is implemented according to the design process, and the pseudo code is shown in Algorithm 1. ```
1:Input: Features = \(\{F_{1},F_{2},\ldots,F_{m}\}\), Labels = \(\{l_{1},l_{2},\ldots,l_{m}\}\), LearnRate
2:Output: W = \(\{\omega_{0},\omega_{1},\omega_{2},\ldots,\omega_{n}\}\)
3:Step1: Load Data and assign them to Features and Labels
4:for\(i\) in range m do// m is the number of samples
5:for\(j\) in range n do// n is the number of Features
6:\(F_{i}\) = \(\left\{f_{1},f_{2},\ldots,f_{j}\right\}\)\(\leftarrow\) feature_pushback(\(F_{i}\))
7:endfor
8:\(l_{i}\) \(\leftarrow\) label_pushback(\(l_{i}\))
9:endfor
10:Step2: Standardize the loaded data
11:for\(i\) in range n do
12:\(\mu\) \(\leftarrow\) average(\(F_{i}\))
13:\(\sigma\) \(\leftarrow\) standard_deviation(\(F_{i}\))
14:for\(j\) in range m do
15:\(f_{j}\) \(\leftarrow\) \((f_{j}-\mu)/\sigma\)
16:endfor
17:endfor
18:Step3: Initialize W
19:for\(i\) in range n do
20:\(\omega_{n}\) \(\leftarrow\) random_number(0,1)// Initialize each \(\omega\) to a decimal between 0 and 1
21:endfor
22:Step4: Train model
23:while Stopping criterion not met do
24:for\(i\) in range m do
25:\(\omega\) \(\leftarrow\)\(\bigtriangledown\omega\)\(L\)(\(h(Features^{i};\omega),Labels^{i})/\)// Compute gradient by the Sigmoid function and loss function
26:endfor
27:\(\tau\) \(\leftarrow\)\(r+\epsilon+\omega^{2}\) (square element-wise)// Accumulate gradient, and \(\epsilon\) is smooth index
28:\(\omega\) \(\leftarrow\)\(\omega\) - \(\frac{learn\)\(\omega\)\(\leftarrow\)\(\omega\) (\(\frac{1}{\sqrt{\tau}}\)element-wise)//Update \(\omega\)
29:endwhile
30:Return W

Figure 2: Design process of prediction algorithm. ## 4 Experiments

### Data Preparation

The data of the mine pressure monitoring management information system of C Coal Mine are obtained and preprocessed as a sample dataset. The dataset has a total of 1436 sets of data and a total of 25 data indicators. The coal mine has a total of five working faces, and the dataset example is shown in Table 1. We used Z-score standardization to eliminate the impact of different dimensions on the predication results. The measured value was not processed. A measured value of 0 indicates that the mine pressure value does not exceed the standard and there is no danger. A measured value of 1 indicates that the mine pressure value exceeds the standard and there is danger. Among the influencing factors, eight of the influencing factors shown in Table 1 were selected as the evaluation index system X [29; 32] in the sample dataset. The evaluation indicators are detailed as follows [36]:

1.