## 3 Model Building and Algorithm Design
### Model Solution
\(\frac{\partial}{\partial\omega_{1}}\mathrm{J}(\omega_{1})\) represents the partial derivative of the loss function \(\mathrm{J}(\omega_{l})\) with respect to \(\omega\), and the derivation process is as follows:  
\[ \begin{split}\frac{\partial}{\partial\omega_{1}}\mathrm{J}( \omega_{i})&=-\frac{1}{\mathrm{m}}\sum\limits_{j=1}^{\mathrm{m}} \left[\mathrm{y}^{(j)}\cdot\frac{1}{\mathrm{h}_{\omega}\left(\chi_{i}^{(j)} \right)}-\frac{\mathrm{\hat{\alpha}h}_{\omega}\left(\chi_{i}^{(j)}\right)}{ \mathrm{\hat{\alpha}}\omega_{i}}-\left(1-\mathrm{y}^{(j)}\right)\cdot\frac{1}{ \mathrm{1}-\mathrm{h}_{\omega}\left(\chi_{i}^{(j)}\right)}\cdot\frac{\mathrm{ \hat{\alpha}h}_{\omega}\left(\chi_{i}^{(j)}\right)}{\mathrm{\hat{\alpha}} \omega_{i}}\right]\\ &\hskip 28.452756 pt=-\frac{1}{\mathrm{m}}\sum\limits_{j=1}^{ \mathrm{m}}\left[\left(\mathrm{y}^{(j)}\cdot\frac{1}{\mathrm{h}_{\omega}\left( \chi_{i}^{(j)}\right)}-\left(1-\mathrm{y}^{(j)}\right)\cdot\frac{1}{\mathrm{1 }-\mathrm{h}_{\omega}\left(\chi_{i}^{(j)}\right)}\right)\cdot\frac{\mathrm{ \hat{\alpha}h}_{\omega}\left(\chi_{i}^{(j)}\right)}{\mathrm{\hat{\alpha}} \omega_{i}}\right]\\ &\hskip 28.452756 pt=-\frac{1}{\mathrm{m}}\sum\limits_{j=1}^{ \mathrm{m}}\left[\mathrm{y}^{(j)}\cdot(1-\mathrm{h}_{\omega}\left(\chi_{i}^{( j)}\right))-\left(1-\mathrm{y}^{(j)}\right)\cdot\frac{1}{\mathrm{1}-\mathrm{h}_{ \omega}\left(\chi_{i}^{(j)}\right)}\right]\mathrm{x}_{i}^{(j)}\\ &\hskip 28.452756 pt=-\frac{1}{\mathrm{m}}\sum\limits_{j=1}^{ \mathrm{m}}\left[\mathrm{y}^{(j)}-\mathrm{h}_{\omega}\left(\chi_{i}^{(j)} \right)\right]\mathrm{x}_{i}^{(j)}\\ &\hskip 28.452756 pt=\frac{1}{\mathrm{m}}\sum\limits_{j=1}^{ \mathrm{m}}\left[\mathrm{h}_{\omega}\left(\chi_{i}^{(j)}\right)-\mathrm{y}^{(j) }\right]\mathrm{x}_{i}^{(j)}\end{split}  \tag{16}\]  
The update formula for \(\omega\) in the batch gradient descent algorithm is shown in Formula (17). \[\omega_{1}:=\omega_{1}-\alpha\frac{1}{\mathrm{m}}\sum\limits_{j=1}^{\mathrm{ m}}\left[\mathrm{h}_{\omega}\left(\chi_{i}^{(j)}\right)-\mathrm{y}^{(j)}\right] \mathrm{x}_{i}^{(j)} \tag{17}\]  
In the formula, \(\mathrm{i}=1,2,\ldots,\mathrm{n}\), and \(\mathrm{n}\) represents the number of selected evaluation indicators; \(\alpha\) represents the learning rate. Finally, the obtained \(\omega_{1}\) is brought into Formula (6), and the quantitative expression between the mine pressure hazard and each evaluation indicator can be obtained. In order to improve the accuracy, computational speed, and robustness of the logistic regression prediction model, the Adagrad gradient algorithm is used to solve the model in this paper. The core idea of the Adagrad gradient algorithm is that if the gradient of a parameter is always very large, its corresponding learning rate will become smaller to prevent oscillation. If the gradient of a parameter is always very small, then the learning rate of the parameter becomes larger, allowing it to be updated more quickly. The update formula for \(\omega\) in the Adagrad gradient algorithm is shown in Formula (18). \[\omega_{\mathrm{t+1,i}}:=\omega_{\mathrm{t}i}-\frac{\alpha}{\sqrt{\mathrm{G} _{\mathrm{t,i}}+}\in\mathrm{g}_{\mathrm{t,i}}} \tag{18}\]  
In the formula, \(\mathrm{t}\) represents the number of rounds for calculating the gradient, \(\alpha\) represents the learning rate, \(\mathrm{G}_{\mathrm{t,j}}\) represents the quadratic sum of the gradients from the first round to the t-th round, \(\in\) represents the smoothing term, which is used to avoid the case where the denominator is 0 and is usually taken as \(10^{-10}\), and \(\mathrm{g}_{\mathrm{t,i}}\), for \(\mathrm{i}=\) 1,2,3\(\ldots\) i, represents the gradient of the i-th evaluation indicator calculated in the t-th round.