# Prediction Model of Borehole Spontaneous Combustion Based on Machine Learning and Its Application

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

_{2}, CO, C

_{2}H

_{4}, CO/∆O

_{2}and C

_{2}H

_{4}/C

_{2}H

_{6}were selected as the input indexes for the prediction of borehole spontaneous combustion, and the spontaneous combustion temperature was selected as the output indexes to train the built model. The prediction performance and accuracy of the model were evaluated using four indexes: the mean absolute error (MAE), mean absolute percentage error (MAPE), root mean square error (RMSE) and coefficient of determination (R2). At the same time, the prediction results of the HGS-RF model were compared with those of the RF model, Sparrow search algorithm (SSA) optimization RF model, particle swarm optimization RF model (PSO) optimization RF model and quantum particle swarm optimization RF model (QPSO) optimization. The results showed that the MAE of the RF, SSA-RF, PSO-RF, QPSO-RF and HGS-RF model samples were 17.541, 15.7752, 12.5903, 6.8594 and 6.6921, respectively. MAPE was 13.81%, 10.9766%, 9.6802%, 4.5731% and 5.1536%, respectively. RMSE values were 21.5646, 15.2017, 17.0091, 11.9879 and 12.1691, respectively. The R2 values were 0.9043, 0.9315, 0.9266, 0.9668, and 0.9717, respectively. At the same time, the reliability of the HGS-RF model was supplemented by taking the test data of the Zhengjia1204 coal mining face as an example. Finally, the model was applied to the prediction of borehole spontaneous combustion in the Jinniu Coal Mine, Shanxi Province. The prediction results show that the HGS-RF model can predict the spontaneous combustion temperature of different boreholes quickly and accurately. The results show that the HGS-RF model is more universal and stable than other models, indicating that the HGS-RF model is more suitable for the prediction of borehole spontaneous combustion.

## 1. Introduction

## 2. Basic Principles

#### 2.1. The Index Gas Is Coupled with the Spontaneous Combustion Temperature of Coal

- (1)
- Sensitivity: In the process of natural oxidation reaction of coal, there will inevitably be a certain determination index gas, and with the intensification of coal oxygen reaction and the rise of coal temperature, the change trend of the determination index shows monotonicity.
- (2)
- Uniqueness: In the case that the coal has not undergone a natural oxidation reaction, there is no gas, and the gas will only be generated in the process of natural oxidation of coal, indicating that the gas has uniqueness.
- (3)
- Regularity: When coal is undergoing natural oxidation reaction, a certain indicator gas appears, and all coal samples on the working face are generated during natural oxidation. However, the temperature point at which this gas is generated at the earliest does not change much, and there is a good corresponding relationship between the concentration or generation rate of this gas and coal temperature.
- (4)
- Testability: When coal is a natural oxidation reaction, a gas generated can be measured by the existing detection instrument, or the amount of a gas generated can be measured by the existing detection instrument, which indicates that the gas has testability.

#### 2.2. Hunger Games Search Algorithm

_{1}and W

_{2}are defined by the following equation:

_{1}, r

_{2}and r

_{3}are all random numbers between [0, 1]. hungy (i) represents the hunger level of each individual and is calculated using Equation (3).

_{4}is a random number between [0, 1]; BF is the current optimal fitness value; WF is the current worst fitness value; UB and LB are the upper and lower bounds of the search area, respectively; LH is the minimum value that can be obtained by the set H; and the general value is 100.

_{1}and r

_{2}are both random numbers within [0, 1]; W

_{1}and W

_{2}are weight values calculated based on the characteristics of the hungry individuals; Xb represents the global optimal solution; X (t) represents the position of the current individual; l is a self-set constant; R is a random number at [−a, a]; and the size of a is related to time t.

#### 2.3. Random Forest Algorithm

#### 2.3.1. Decision Tree

#### 2.3.2. Bagging Though

#### 2.3.3. RF Algorithm

- The Bagging sampling method is used to extract k data subsets (S
_{i}, i = 1, 2, ..., k) from the original data set S, and in this k times of extraction, the data not extracted each time constitute k out of pocket data sets, and the extracted data sets are called in-pocket data sets. - Randomly select m * attributes from m features as a sub dataset, and then select the optimal feature from that subset for partitioning to construct a CART decision tree.
- Each CART decision tree grows to its maximum degree without any pruning operation, and the value of m remains constant.
- In total, k CART decision trees are generated for each of the k extractions, and each tree does not influence each other and exists independently.
- The generated decision trees are integrated to form a Random Forest, and the average of the output values of all decision trees is taken as the final prediction value of the Random Forest.

## 3. Prediction Models Based on HGS-RF for Spontaneous Combustion in Boreholes

#### 3.1. Construction of HGS-RF Model

- (1)
- Initialize the number of individuals N, the maximum number of iterations Maxiter, the constant l, and the upper and lower bounds and dimension of the parameter space D.
- (2)
- The location information of the hungry individual X
_{i}is initialized, and the fitness value is computed based on the fitness function, where the fitness function of the HGS-RF prediction model is the mean squared error of the training set. The fitness value corresponding to the hungry individual with the smallest fitness value is chosen as the global optimum. - (3)
- According to Equation (1), update the location information and hunger characteristics of hungry individuals, calculate the fitness value of the updated hungry individuals and compare it with the extreme fitness value of the individual. Then, select a better result for iterative updating.
- (4)
- The optimal value of the hungry individual is compared to the global optimum, and a smaller fitness value is chosen as the new global optimum.
- (5)
- Repeat steps (3) and (4) to determine if the maximum number of iterations Maxiter has been reached. If so, terminate the iteration and select the parameter corresponding to the global optimal value as the optimal parameter.
- (6)
- The optimal parameters are given to the Random Forest to construct the HGS-RF prediction model.

#### 3.2. Performance Evaluation Metrics for Models

_{i}is the predicted value, °C; y

_{i}is the true value, and °C is the average of the true values, °C. The smaller the MAE, MAPE, and RMSE values are, and the closer the R

^{2}is to 1, the better the performance is.

#### 3.3. Data Sources

_{2}H

_{4}, C

_{2}H

_{6}and other gases with the increase of temperature was obtained. The characteristics of the spontaneous combustion of coal were determined, and five prediction indexes of spontaneous combustion temperature were obtained [26], namely CO, O

_{2}, CO/ΔO

_{2}, C

_{2}H

_{4}and C

_{2}H

_{4}/C

_{2}H

_{6}. A total of 337 experimental data of spontaneous combustion characteristics meeting the conditions were obtained for analysis, and the O

_{2}concentration, CO concentration, C

_{2}H

_{4}concentration, CO/∆O

_{2}ratio and C

_{2}H

_{4}/C

_{2}H

_{6}ratio were selected as the input indexes and temperature the as output index. Some experimental sample data are shown in Table 1.

#### 3.4. Application of the HGS-RF Prediction Model

#### 3.4.1. Determine Model Parameters

#### 3.4.2. Prediction Results and Comparative Analysis

_{U}and lower limit B

_{L}of parameter space D was [10, 1] and [200, 50], respectively. The leaf parameters n in RF_ estimator and min_ samples_ were optimized by HGS with values of 100 and 2, respectively. The remaining parameters remained the same as in the previous text. The population size in the PSO was 60, the maximum number of iterations was 200, the learning factor was 1.5, the speed limit was maximum 1 and minimum −1, the inertia weight was 0.8, the population limit was maximum 5 and minimum −5; the number of sparrow populations in the SSA was 30, with a maximum number of iterations of 120; and the proportion of sparrow population discoverers was 20%. The number of the QPSO population was 30, the maximum number of iterations was 200, the parameter search range was [0.001, 100] and the shrinkage expansion coefficient α decreased linearly from 1.0 to 0.5. Based on the model parameter settings and algorithm descriptions described above, a comparison of the actual and predicted values of coal temperature in the test samples of different prediction models was finally obtained, as shown in Figure 3; The fitting effect of the training and testing samples is shown in Figure 4.

#### 3.4.3. Model Reliability Verification

_{2}, CO, CO

_{2}, CH

_{4}, C

_{2}H

_{4}, C

_{2}H

_{6}, CO/∆O

_{2}and C

_{2}H

_{4}/C

_{2}H

_{6}were selected as input indicators, and temperature was selected as the output indicator. Among them, the n_estimators and min_samples_leaf parameters in the RF were obtained by HGS optimization, and the values were 150 and 5, respectively. The other parameters were consistent with those in Section 3.4.2 of this paper. The comparison of evaluation indicators of each model is shown in Figure 4. It can be seen more intuitively from Figure 5 that the HGS-RF model had the best effect, and the MAE of each model test sample was 20.3956, 11.3362, 15.9737, 12.5852 and 13.9737, respectively. The MAPE was 14%,7.02%, 12.18%, 6.98% and 10.66%, respectively. The RMSE was 37.572, 21.2852, 24.9035, 20.4032 and 23.3373, respectively. The R2 was 0.8138, 0.932, 0.8534, 0.9092 and 0.891, respectively. Combined with the above analysis results, it was finally determined that the regression analysis model of coal spontaneous combustion temperature based on HGS-RF model is a simple and reliable method, and the prediction results were closer to the actual situation.

## 4. Analysis of Analysis of Engineering Examples

## 5. Conclusions

- (1)
- By combining the Hunger Games search algorithm and the Random Forest algorithm, we constructed an early warning model for the hazard level of spontaneous combustion in boreholes based on the HGS-RF and compared the predictions with the RF, SSA-RF, PSO-RF and QPSO-RF models. The results show that the predictions of the HGS-RF model were closer to the actual situation, while the RF model had strong generalization performance but poor prediction accuracy. The SSA-RF and PSO-RF models were prone to overfitting, Although the prediction result of QPSO-RF model is similar to that of HGS-RF model, the running time of this model is relatively long and more preparation is required, so the HGS-RF model is the most practical.
- (2)
- Compared to the RF, SSA-RF, PSO-RF and QPSO-RF models, the HGS-RF model showed a decrease in the MAE of 7.0189, 5.0831, 4.8982 and 0.1637, respectively, in the test samples. MAPE decreased by 3.6564%, 3.823%, 4.5266%, but it increased by 0.5805% compared to the QPSO-RF model, respectively; RMSE decreased by 9.3955, 3.0326 and 4.84, but it increased by 0.1812 compared to the QPSO-RF model, respectively; R
^{2}increased by 0.0674, 0.0402 0.0451 and 0.0049, respectively. The HGS-RF based drilling spontaneous combustion degree warning model can achieve more accurate prediction results without complex parameter settings and optimization, and it is robust and generalizable. - (3)
- The reliability of the HGS-RF model was verified by taking the data of the 1024 coal face of the Zhengjia Coal Industry as an example. The results show that the HGS-RF model had certain reliability, and the results were the closest to the actual situation. In order to further verify the universality and stability of the HGS-RF model, it was applied to the Jinniu Coal Mine in Shanxi Province and compared with other regression models. The results show that the regression results of the HGS-RF model were accurate and reliable, and better results have been obtained in the prediction of borehole spontaneous combustion in different mines, indicating that the HGS-RF model can accurately predict the borehole spontaneous combustion temperature.

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Qiao, M.; Ren, T.; Roberts, J.; Yang, X.; Li, Z.; Wu, J. New insight into proactive goaf inertisation for spontaneous combustion management and control. Process Saf. Environ. Prot.
**2022**, 161, 739–757. [Google Scholar] [CrossRef] - Wang, W.; Qi, Y.; Liu, J. Study on multi field coupling numerical simulation of nitrogen injection in goaf and fire-fighting technology. Sci. Rep.
**2022**, 12, 1–18. [Google Scholar] [CrossRef] - Zhang, Y.; Niu, K.; Du, W.; Zhang, J.; Wang, H.; Zhang, J. A method to identify coal spontaneous combustion-proneregions based on goaf flow field under dynamic porosity. Fuel
**2021**, 288, 119690. [Google Scholar] [CrossRef] - Jia, X. Study on Influencing Mechanism and Prevention Technology of Coal Spontaneous Combustion Caused by Borehole Gas Extraction. Ph.D. Thesis, Liaoning Technical University, Fuxin, China, 2022. [Google Scholar]
- Lu, H.; Zhao, Y.; Fang, Z. Study on the spontaneous combustion and ignition law of lignite in the coal mine of Shuilianta based on variable oxygen conditions. Coal Sci. Technol.
**2021**, 49, 152–158. [Google Scholar] - Wen, H.; Wang, W.; Tao, W.; Chen, X.; Jiang, X.; Cheng, B. Research on spontaneous coal combustion prediction and prevention and control technology during the withdrawal of ultra-long synthesized mining face. Coal Sci. Technol.
**2020**, 48, 167–173. [Google Scholar] - Lei, C.; Deng, J.; Cao, K.; Ma, L.; Xiao, Y.; Ren, L. A random forest approach for predicting coal spontaneous combustion. Fuel
**2018**, 223, 63–73. [Google Scholar] [CrossRef] - Wang, F.; Wang, J.; Gu, L.; Liu, P. Determination method for coal spontaneous combustion degree based on grey target decision model. China Sci. Pap.
**2019**, 14, 980–984. [Google Scholar] - Qi, Y.; Qi, Q.; Wang, W.; Zhou, X. A forecast model for the spontaneous combustion risk in the goaf based on set valued statistics-entropy and its application. J. Saf. Environ.
**2019**, 19, 1526–1531. [Google Scholar] - Wang, W.; Jia, B.; Qi, Y. Prediction model of spontaneous combustion risk of extraction drilling based on improved CRITIC modified G2-TOPSIS method and its application. China Saf. Sci. J.
**2019**, 29, 26–31. [Google Scholar] - Zhou, X.; Zhu, Y.; Zhang, J.; Qin, S.; Wang, Y. Study on prediction model of coal spontaneous combustion based on PSO-XGBoost. Min. Saf. Environ. Prot.
**2022**, 49, 79–84. [Google Scholar] - Zhai, X.; Zhang, W.; Wang, K.; Wang, W. Research on comprehensive evaluation of spontaneous combustion hazard of mine coal based on SEM. Coal Eng.
**2020**, 52, 101–105. [Google Scholar] - Zhao, L.; Wen, G.; Shao, L. PCA-AdaBoost Prediction Model for Coal Spontaneous Combustion in Blanketed Areas with Unbalanced Data. China Saf. Sci. J.
**2018**, 28, 74–78. [Google Scholar] - Deng, J.; Lei, C.; Cao, K.; Ma, L. Random forest method for predicting coal spontaneous combustion in gob. J. China Coal Soc.
**2018**, 43, 2800–2808. [Google Scholar] - Zheng, X.; Li, M.; Zhang, Y.; Jiang, P.; Wang, B. Research on the prediction model of coal spontaneous combustion temperature based on random forest algorithm. Ind. Mine Autom.
**2021**, 47, 58–64. [Google Scholar] - Jia, P.; Lin, K.; Guo, F. A temperature prediction model for coal spontaneous combustion based on PSO-SRU deep artificial neural networks. J. Mine Autom.
**2022**, 48, 105–113. [Google Scholar] - Wen, T.; Yu, F. Research on the prediction of coal spontaneous combustion based on KPCA-Fisher discriminant analysis. Min. Saf. Environ. Prot.
**2018**, 45, 49–53+58. [Google Scholar] - Shukla, U.S.; Mishra, D.P.; Mishra, A. Prediction of spontaneous combustion susceptibility of coal seams based on coal intrinsic properties using various machine learning tools. Environ. Sci. Pollut. Res.
**2023**, 30, 69564–69579. [Google Scholar] [CrossRef] [PubMed] - Lawal, A.I.; Onifade, M.; Abdulsalam, J.; Aladejare, A.E.; Gbadamosi, A.R. On the Performance Assessment of ANN and Spotted Hyena Optimized ANN to Predict the Spontaneous Combustion Liability of Coal. Combust. Sci. Technol.
**2022**, 194, 1408–1432. [Google Scholar] [CrossRef] - Zhou, X.; Yang, J.; Zu, Y.; Zhang, J. Study on gas outflow prediction based on NMF-HGS-RF. Min. Saf. Environ. Prot.
**2023**, 50, 117–123. [Google Scholar] - Yang, Y.; Chen, H.; Heidari, A.A.; Gandomi, A.H. Hunger Games Search: Visions, Conception, Implementation, Deep Analysis, Perspectives, and Towards Performance Shifts. Expert Syst. Appl.
**2021**, 177, 114864. [Google Scholar] [CrossRef] - Yang, Y. Intelligent Optimization Algorithm for Node Localization Based on Multiple Communication Radii. Master’s Thesis, Lanzhou University of Science and Technology, Lanzhou, China, 2022. [Google Scholar]
- Li, C.; Zhao, L. CACC-RF-based risk prediction of rutters indicating notch jamming failures. J. China Railw. Soc.
**2022**, 44, 46–55. [Google Scholar] - Tian, R.; Meng, H.; Cheng, S.; Chen, S.; Wang, C.; Shi, L. Rockburst Intensity Classification Prediction Model under RF-AHP-Cloud Modeling. China Saf. Sci. J.
**2020**, 30, 166–172. [Google Scholar] - Cheng, J.; Shang, D.; Zhao, Z.; Chen, C. A machine learning-based method for predicting fracture behavior of rock samples containing filled fractures. J. Rock Mech. Eng.
**2023**, 42, 3458–3472. [Google Scholar] - Jiang, P. A Machine Learning-Based Model for Predicting the Temperature of Spontaneous Coal Combustion. Master’s Thesis, Xi’an University of Science and Technology, Xi’an, China, 2020. [Google Scholar]
- Sun, H.; Yang, J.; Jing h Tu, H.; Zhou, X. NOx prediction model for coal-fired boilers based on Bayesian optimization-random forest regression. J. Chin. Soc. Power Eng.
**2023**, 43, 910–916. [Google Scholar]

**Figure 3.**Comparison of the real and predicted values for different model test samples. (

**a**) RF model; (

**b**) SSA-RF model; (

**c**) PSO-RF model; (

**d**) QPSO-RF model; (

**e**) HGS-RF model.

**Figure 4.**Fitting plots of the training and test samples for different models. (

**a**) RF model; (

**b**) SSA-RF model; (

**c**) PSO-RF model; (

**d**) QPSO-RF model; (

**e**) HGS-RF model.

**Figure 5.**Comparison of the evaluation indexes of the Zhengjia Coal Industry models. (

**a**) Mean absolute error comparison; (

**b**) average absolute percentage error comparison; (

**c**) root-mean-square error comparison; (

**d**) coefficient of determination comparison.

O_{2}/% | CO/10^{−6} | C_{2}H_{4}/10^{−6} | CO/∆O_{2} | C_{2}H_{4}/C_{2}H_{6} | °C |
---|---|---|---|---|---|

17.06 | 130 | 0 | 0.33 | 0 | 47.6 |

16.84 | 103 | 0 | 0.25 | 0 | 47.71 |

17.43 | 113 | 0 | 0.32 | 0 | 47.93 |

17.92 | 123 | 0 | 0.4 | 0 | 48.04 |

17.48 | 109 | 0 | 0.31 | 0 | 48.81 |

… | … | … | … | … | … |

16 | 1597 | 0.46 | 3.19 | 0.04 | 114.93 |

17.72 | 667 | 0.23 | 2.03 | 0.02 | 115.28 |

14.71 | 1340 | 0.36 | 2.13 | 0.03 | 115.99 |

16.94 | 1582 | 0.57 | 3.9 | 0.02 | 116.34 |

19.03 | 1495 | 0.4 | 7.59 | 0.03 | 117.05 |

… | … | … | … | … | … |

6.51 | 12986 | 685.74 | 8.96 | 0.11 | 405.76 |

3.52 | 13370 | 294.14 | 7.65 | 0.11 | 414.47 |

1.89 | 14248 | 490.07 | 7.46 | 0.12 | 418.83 |

1 | 14134 | 890.72 | 7.07 | 0.12 | 427.54 |

1.5 | 13429 | 291 | 6.89 | 0.11 | 431.9 |

Parameter | Role |
---|---|

n_estimators | Number of decision trees |

oob_sore | Whether to use external samples to assess model strengths and weaknesses |

criterion | Classification criteria for nodes |

max_features | Maximum number of features required to construct an optimal model of a decision tree |

max_depth | Limit the maximum depth of the decision tree |

min_samples_split | The minimum number of samples that can be divided into nodes is set as 2 in this paper. |

min_samples_leaf | Minimum number of samples contained in a leaf node |

**Table 3.**Comparison of the evaluation metrics for the different prediction models for a mine in Shandong Province.

Model | Model Performance | |||||||
---|---|---|---|---|---|---|---|---|

R^{2} | MAPE/% | RMSE | MAE | |||||

Train | Test | Train | Test | Train | Test | Train | Test | |

RF | 0.9519 | 0.9043 | 5.46 | 13.81 | 15.7439 | 21.5646 | 7.9857 | 17.541 |

SSA-RF | 0.9616 | 0.9315 | 4.3563 | 10.9766 | 12.4116 | 15.2017 | 7.3011 | 15.7752 |

PSO-RF | 0.9654 | 0.9266 | 5.1076 | 9.6802 | 11.1453 | 17.0091 | 6.872 | 12.5903 |

QPSO-RF | 0.9817 | 0.9668 | 3.892 | 4.5731 | 7.421 | 11.9879 | 6.751 | 6.8594 |

HGS-RF | 0.9851 | 0.9717 | 4.87 | 5.1536 | 8.327 | 12.1691 | 5.3669 | 6.6921 |

**Table 4.**Comparison of the evaluation indexes of the different prediction models in the Jinniu Coal Mine.

Model | Model Performance | |||||||
---|---|---|---|---|---|---|---|---|

R^{2} | MAPE/% | RMSE | MAE | |||||

Train | Test | Train | Test | Train | Test | Train | Test | |

RF | 0.9247 | 0.8815 | 14.67 | 17.16 | 14.3257 | 18.5114 | 9.7461 | 15.3247 |

SSA-RF | 0.9395 | 0.9267 | 12.19 | 14.31 | 11.5645 | 15.1763 | 8.1965 | 13.2972 |

PSO-RF | 0.9441 | 0.9075 | 11.84 | 18.55 | 14.1946 | 19.5681 | 7.2296 | 12.9467 |

QPSO-RF | 0.9702 | 0.9418 | 8.29 | 9.61 | 9.8425 | 12.367 | 7.0325 | 10.8637 |

HGS-RF | 0.9781 | 0.9556 | 8.65 | 11.13 | 10.0396 | 13.9179 | 6.8507 | 8.339 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Qi, Y.; Xue, K.; Wang, W.; Cui, X.; Liang, R.
Prediction Model of Borehole Spontaneous Combustion Based on Machine Learning and Its Application. *Fire* **2023**, *6*, 357.
https://doi.org/10.3390/fire6090357

**AMA Style**

Qi Y, Xue K, Wang W, Cui X, Liang R.
Prediction Model of Borehole Spontaneous Combustion Based on Machine Learning and Its Application. *Fire*. 2023; 6(9):357.
https://doi.org/10.3390/fire6090357

**Chicago/Turabian Style**

Qi, Yun, Kailong Xue, Wei Wang, Xinchao Cui, and Ran Liang.
2023. "Prediction Model of Borehole Spontaneous Combustion Based on Machine Learning and Its Application" *Fire* 6, no. 9: 357.
https://doi.org/10.3390/fire6090357