## 3 Model Building and Algorithm Design
### Prediction Algorithm Design
Experimental process: Select 1, 2, 3... 12 evaluation indicators to resume logistic regression prediction models, which were solved using the data processed using the optimal preprocessing method in Experiment 1. The accuracy rate, recall rate, and F1-score of each prediction result were also calculated. Figure 5: The influence of data obtained using different preprocessing methods on the prediction results. Experiment 3:

Experimental objective: Verify the prediction effect of the logistic regression model solved using the Adagrad optimization algorithm. Experimental process: Logistic regression model, support vector machine (SVM), decision tree, and naive Bayes were selected as comparison models, and the accuracy, recall, F1-score, and prediction time of each model were calculated, respectively. #### 4.4.3 Experimental Comparative Analysis

The results of Experiment 1 are shown in Figure 5. In this paper, the 3\(\sigma\) principle, deleting missing values, and Z-score standardization are used to preprocess the data. Compared with other preprocessing methods, the data obtained through this method can improve the accuracy, precision, recall, and F1-score of model prediction results up to 88%, 66.67%, 68.3%, and 67.46%. The results of Experiment 2 are shown in Figure 6. When the number of evaluation indicators is selected from one to three, the accuracy of the model prediction results does not reach 50%, indicating that the model established by selecting too few evaluation indicators cannot accurately predict the mine pressure hazard. As the number of evaluation indicators increases, the accuracy of the model prediction results increases, and when the number of evaluation indicators reaches eight, the accuracy, precision, recall, and F1-score of the model prediction results reach the maximum value. After the number of evaluation indicators exceeds eight, the accuracy of the model prediction results decreases as the number of evaluation indicators increases. In this paper, eight evaluation indicators were selected to establish the prediction model of mine pressure hazard, and the accuracy, precision, recall, and F1-score of the model reached the maximum value, meaning the model can correctly predict the mine pressure hazard. The results of Experiment 3 are shown in Table 5. It can be concluded from the table that the logistic regression model is significantly better than the other models for classifying

Figure 6: The influence of the number of evaluation indicators selected on the prediction results. and predicting the mine pressure hazard. Additionally, the logistic regression model solved using the Adagrad gradient algorithm showed the highest increase in accuracy, precision, recall, and F1-score of 17.5%, 54.74%, 66.64%, and 50% compared with other models, while the model took the shortest time to make predictions. Therefore, the logistic regression prediction model solved using the Adagrad gradient algorithm can be used as an effective method to predict mine pressure hazard. The algorithms mentioned above are briefly introduced below [37]. 1. Support vector machine (SVM) is a binary classification model, and its learning strategy is to maximize the interval. It can deal with nonlinear classification tasks. At present, it is only suitable for tasks with small batch samples. When the number of samples is large, the calculation complexity is high. 2. Decision tree is a recursive process from root to leaf; it can be used for both classification and regression tasks. Its core problem is how to select the appropriate properties to split the sample at each step. However, it can easily overfit when using too-complex data. 3. The naive Bayes classifier is a supervised learning algorithm, which originates from classical mathematics theory. It needs to estimate few parameters and has a stable classification efficiency. It is suitable for incremental training, and its speed is fast, but can easily have poor classification effect, and it is more sensitive to the expression form of input data.