## 3 Model Building and Algorithm Design
### Prediction Algorithm Design
In comparison with these other models, the accuracy rate, precision rate, recall rate, and F1-score of the prediction results of the logistic regression model solved using the Adagrad optimization algorithm increased by 17.5%, 54.74%, 66.64%, and 50% at the highest, and the prediction time of this model was the shortest. Therefore, the prediction method using the Adagrad optimization algorithm to solve the logistic regression model can be used as an effective mine pressure hazard prediction method. ### Practical Application

After the logistic regression prediction model is established, the mine pressure data are preprocessed, the Adagrad optimization algorithm is used to solve the prediction model, and the mine pressure data actually recorded by the C Coal Mine pressure monitoring management information system are used to verify the fitted prediction model. At the same time, by comparing the four evaluation indices with the existing classification algorithms, it can be concluded that the improved algorithm in this paper is the best of the four indices, and the prediction takes the least time. This proves that the improved algorithm can be effectively applied to the actual mine pressure warning scenario. After proving this, the mine pressure hazard prediction function is added to the mine pressure monitoring management information system of C Coal Mine in a practical application. This function is based on the logistic regression prediction method, and the mine pressure hazard warning interface is designed to display the warning results. The specific display of the interface is shown in Figures 7 and 8. The interface displays the number and position of each hydraulic \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Prediction Model** & **Accuracy** & **Precision** & **Recall** & **F1-Score** &
\begin{tabular}{c} **The Time Spent** \\ **on Prediction (ms)** \\ \end{tabular} \\ \hline Logistic & 94\% & 83.33\% & 90.9\% & 0.87 & 112,375 \\ (via Adagrad gradient algorithm) & Logistic & 86\% & 66.67\% & 72.73\% & 0.7 & 356,178 \\ (via batch gradient descent algorithm) & SVM & 82\% & 56.25\% & 81.82\% & 0.67 & 182,741 \\ Decision tree & 84\% & 66.67\% & 54.55\% & 0.6 & 219,746 \\ Naive Bayes & 80\% & 53.85\% & 63.64\% & 0.58 & 276,193 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Assessment results of different prediction models. support and the ore pressure data and time read by the sensor in real time. When the sensor records the new ore pressure data into the database, the interface immediately predicts the incoming data. In the prediction process, if y = 0 is calculated from the measured data, the early warning result in the system returns to 0. The information of the hydraulic support on the interface is displayed as white, indicating that the mine pressure value in the mining operation area is safe and there is no danger, as shown in Figure 7. In this case, the mining face can work normally. If y = 1 is obtained from the measured data through calculation, the warning result returns to 1 and the hydraulic support on the interface becomes an eye-catching red color, as shown in Figure 8. The red data send a warning signal to mine managers. Since the location coordinates of the hydraulic support are also included in the

Figure 8: Warning interface in the presence of hazard data. Figure 7: Mine pressure hazard warning interface. early warning interface, it is more convenient for managers to trace the source to find the mine location where the hydraulic support is located. According to the data corresponding to the hydraulic support, the manager can analyze and judge the situation and make correct production decisions in time, which can effectively avoid possible dangers. After the mine pressure hazard prediction function was implemented in C Coal Mine, the actual results of the prediction function were continuously recorded within six weeks.