Abstract
In recent years, deformation disasters in mine shafts have occurred frequently, posing a threat to mine safety. The nonlinear coupling relationship between shaft surrounding rock deformation and rock mass mechanical parameters is a key criterion for surrounding rock stability. However, existing machine learning prediction methods are rarely applied to shaft deformation, and issues such as poor accuracy and generalization of single models remain. To address this, the study proposes a feature-weighted Stacking ensemble model, which considers 15 feature variables; using RMSE, MAE, R2, and inter-model MAPE correlation as evaluation metrics, GBDT, XGBoost, KNN, and MLP are selected as base learners, with Lasso linear regression as the meta-learner. Prediction errors are corrected by weighting the outputs of base learners based on prediction accuracy. Experiments show that, using MAPE as the evaluation metric, the improved model reduces the error by 2.59% compared with the best base learner KNN, by 6.83% compared with XGBoost, and by 0.18% more than the traditional Stacking algorithm, making it suitable for predicting weak surrounding rock shaft deformation under multi-feature conditions.
1. Introduction
With the deepening development of underground space, the number of soft rock vertical shaft projects is increasing, and they face significant challenges in deformation control during both construction and operation [1]. Soft rock refers to a type of rock mass that exhibits low strength, high deformability, and significant time-dependent effects under engineering disturbance and water–rock coupling. Typical examples include mudstone, sandstone, and shale. The mechanical behavior of soft rock lies between that of soil and hard rock, often leading to substantial deformation issues in deep underground engineering, which threaten structural stability and personnel safety. This has become a critical issue in deep resource exploitation [2,3]. Therefore, evaluating and predicting the stability of shaft surrounding rock is of great significance. Current prediction methods for shaft deformation and geological parameters in mining areas mainly fall into three categories: data-driven machine learning methods, mechanical mechanism-based theoretical analysis methods, and model prediction methods using empirical parameters. Julio Garzón-Roca applied ANN and SVM models to construct a quantitative estimation GIS-based artificial intelligence prediction technology [4]. Wang proposed a drilling-based rock compressive strength inversion model (DP-σc), providing an innovative approach for in situ rock compressive strength evaluation [5]. Based on a full-scale simulation dataset, Pavel Spesivtsev achieved bottom hole pressure parameter prediction through artificial neural network training [6]. Wu integrated Random Forest with Recursive Feature Elimination (RF-RFE) and Bayesian Optimization with Natural Gradient Boosting (BO-NGBoost) to develop a hybrid framework for high-precision prediction of tunnel deformation induced by adjacent foundation pit excavation [7]. Xu derived an analytical formula for vertical additional stress based on elastic mechanics, providing a theoretical basis for determining key mechanical parameters [8]. Han combined the probability integral method with the Knothe time function to construct a dynamic prediction model that captures the time-dependent characteristics of strata movement [9]. Tang developed a deformation-time series prediction model using support vector machines (SVM), providing a quantitative disaster warning approach for geotechnical engineering [10]. Khan synergistically integrated mechanical analysis, numerical simulation, and neural network techniques to establish a failure prediction model, forming a multi-method collaborative evaluation framework with cross-validation capabilities [11]. Furthermore, Yuan proposed a hybrid grey–Markov model for surface subsidence prediction [12]. Bai constructed a dynamic update model based on fuzzy multi-attribute decision-making (FMADM) to assess large deformation risks [13]. Feng improved the analysis model considering equipment crowding-out effects to achieve fine calculation of surrounding rock radial deformation under excavation disturbance [14].
Currently, scholars abroad have conducted extensive research on the prediction of surrounding rock deformation in shaft and tunnel construction, focusing on machine learning algorithms such as Artificial Neural Networks (ANNs), Support Vector Machines (SVMs), and Random Forests (RF). These methods have significant advantages in handling high-dimensional, nonlinear problems. Among them, the Backpropagation Neural Network (BPNN), as a representative model of artificial neural networks, demonstrates remarkable advantages in settlement prediction due to its excellent robustness, making it one of the mainstream methods in this field. To optimize prediction accuracy, researchers have integrated ANNs with methods such as wavelet theory and fuzzy logic, as well as developed improved SVM algorithms, overcoming the performance limitations of single machine learning models. Among these, ensemble learning algorithms like RF have gained widespread attention due to their ability to handle high-variance data and noise robustness [15]. Given the critical influence of hyperparameter configuration on model performance, intelligent optimization algorithms are used for hyperparameter tuning, forming intelligent methods that couple metaheuristic algorithms with machine learning (ML) techniques, effectively finding the globally optimal parameter combinations. In terms of improving model robustness, related studies have constructed fitness functions for the Particle Swarm Optimization (PSO) algorithm through k-fold cross-validation and identified geological and geometric parameters as the core influencing variables for deformation prediction [16,17,18].
Although existing studies based on statistical analysis, numerical simulation, and machine learning methods have made progress in predicting the convergence deformation of roadway surrounding rock, the accuracy of predicting shaft surrounding rock deformation still needs improvement [19,20]. To this end, this paper proposes a weighted improved Stacking ensemble learning method for predicting convergence deformation of soft rock shaft surrounding rock. First, based on a comparative analysis of prediction performance and combined with model evaluation metrics, Random Forest (RF), Extreme Gradient Boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), and k-Nearest Neighbors (KNN) were selected as base learners. By constructing a dynamic weighting mechanism, weights are allocated based on the prediction performance of the base learners, enabling adaptive correction of prediction errors and effectively suppressing the prediction bias of individual models. Compared to single models and traditional Stacking methods, the proposed approach significantly enhances prediction accuracy.
2. Methodology and Database
2.1. Machine Learning Algorithm
2.1.1. Gradient Boosting Decision Tree
Gradient Boosting Decision Tree [21] is an ensemble learning algorithm based on the gradient boosting framework, which optimizes the model by sequentially adding weak decision tree learners. In each iteration, the residuals of the current model’s predictions on the training data are first calculated, and then a new decision tree is trained to fit these residuals, gradually reducing the overall loss function of the model. The newly trained decision tree is multiplied by a small learning rate before being added to the current model. This process continues iteratively until the pre-set number of iterations or convergence criteria are met, resulting in a strong learner model with powerful predictive ability and feature interaction capability. The prediction process of this algorithm is illustrated in Figure 1.
Figure 1.
Schematic diagram of machine learning algorithm: (a) GBDT; (b) XGBoost; (c) KNN; different colors and shapes represent different categories of sample points: blue solid circles represent one category of samples, pink hollow circles represent the second category of samples, and orange hexagons represent the third category of samples; (d) MLP; (e) Lasso.
is the predicted value of the model. The goal of gradient boosting is to find a function that minimizes the loss function. The model can be expressed as:
At each step , find a new weak learner by optimizing the following objective function:
where is the training sample. In order to simplify the optimization process, we use the Taylor expansion to approximate the loss function, so as to obtain the residuals of each sample, and then train a new weak learner to fit these residuals:
At each step, a new decision tree is trained to fit the residual of the previous step. The training process of the decision tree is to find the optimal partition point by recursively dividing the feature space to minimize the error on the leaf nodes.
2.1.2. Extreme Gradient Lifting
Extreme Gradient Boosting [22] is an ensemble learning algorithm based on gradient boosting decision trees. It consists of multiple CART decision trees, where each decision tree predicts the residuals of the sum of the true value and the predictions of all previous decision trees. The final result is obtained by summing the predictions of all decision trees. Unlike random forests, where each decision tree is given the same voting weight, in the XGBoost algorithm, the generation of the next decision tree is related to the training and prediction of the previous decision tree. The prediction process of this algorithm is illustrated in Figure 1. Its objective function is shown in Equation (4):
where is the loss function, which measures the gap between the predicted value and the real value. is the regularization term, which controls the complexity of the tree.
where is the number of leaf nodes of the tree; is the predicted value of the th leaf node; is L1 regular coefficient and is L2 regular coefficient are hyperparameters, which are used to adjust the regularization strength.
2.1.3. K Nearest Neighbor
K-Nearest Neighbors [23] is an instance-based learning method. The basic idea is to find the K most similar (nearest) sample points to a new sample point in the training dataset, and then predict the target value of the new sample based on the target values of these K nearest neighbors. For the sample point to be predicted, its distance to all sample points in the training dataset is computed. Common distance metrics include Euclidean Distance, Manhattan Distance, and others. The prediction process of this algorithm is illustrated in Figure 1.
Euclidean distance formula:
Manhattan distance formula:
The core idea of KNN regression is to obtain the prediction result by averaging (or weighted averaging) the output values of the K nearest neighbor samples around the target sample.
2.1.4. Multilayer Perceptron
Multilayer Perceptron [24] is a basic neural network structure commonly used to solve classification and regression problems. It consists of multiple layers, including an input layer, hidden layers, and an output layer, with information flowing in a unidirectional manner through the network, thus referred to as a “feedforward” neural network. It is one of the most fundamental and widely used neural network structures in the field of deep learning. Inspired by the information transmission process between neurons in the human brain, it is also notable for its strong fitting ability, making it suitable for a variety of classification and regression problems. The prediction process of this algorithm is illustrated in Figure 1.
where is the weight vector; is bias; is the input vector.
2.1.5. Least Absolute Shrinkage and Selection Operator
Lasso (Least Absolute Shrinkage and Selection Operator) is a linear regression model that incorporates regularization by adding an L1 norm to the loss function [25]. By imposing L1 regularization, the model compresses insignificant coefficients to exactly zero, enabling variable selection and reducing model complexity to prevent overfitting. The algorithm’s prediction workflow is illustrated in Figure 1. The loss function is as follows:
where is the regularization parameter. Unlike ridge regression, it uses an L1-norm regularization term. This regularization term will make some coefficients exactly zero, thus playing the role of feature selection.
2.2. Superparametric Optimization Method
Optuna uses the TPE algorithm, which integrates multiple optimization methods to enhance efficiency [26]. It reduces computational consumption through pruning, achieving optimization with limited iterations. First, the model parameter space, maximum iteration count, and performance metrics are defined. A probabilistic model is built based on historical data to fit the posterior distribution of hyperparameters, guiding the selection of new parameters. Then, through iterative cycles, the parameter combinations to be evaluated are selected, and inefficient trials are dynamically pruned, balancing exploration and exploitation to improve efficiency. Finally, the optimal hyperparameter combination is determined based on the full set of experimental results. Grid Search (GS), as a classic hyperparameter optimization method [27], first defines the candidate value range for each hyperparameter based on prior knowledge, constructing a search space that includes both numerical and categorical parameters. It then performs an exhaustive search of all possible parameter combinations through cross-validation (CV), iterating through model training and performance evaluation on the training set. The optimal parameter combination is selected based on pre-defined metrics. In this study, the GS method is used for hyperparameter optimization of GBDT, XGBoost, and KNN models, while the Optuna algorithm is used for hyperparameter optimization of the MLP model to enhance the model’s learning and generalization performance.
2.3. K-Fold Cross-Validation
In machine learning model construction, datasets are typically divided into training and test sets for model training and performance validation. While the conventional ratio-based division method is simple and easy to use, the ratio can be adjusted according to the specific characteristics of the problem. However, in small sample scenarios, this method may lead to insufficient data utilization, and the rationality of the division strategy directly affects the model construction and validation results. To address this issue, k-fold cross-validation (k-fold CV) is considered an efficient data utilization method. The core process is as follows: first, the original dataset is randomly divided into k non-overlapping subsets. In each iteration, k-1 subsets are used as training data, and the remaining 1 subset is used as validation data. This process is repeated k times, and the model performance is evaluated by averaging the prediction errors from the k validation results [28]. This method ensures full utilization of the limited data through a cyclical training-validation mechanism using subsets. In this study, 5-fold cross-validation (k = 5) is used, and the specific process is shown in Figure 2.
Figure 2.
k cross validation flow chart.
2.4. Implementation of Prediction Model
Figure 3 shows the framework of the proposed weighted improved Stacking ensemble learning algorithm. This framework consists of a two-layer model architecture: the first layer contains the base learners, and the second layer is the meta-learner. The specific implementation process is as follows: the original dataset is first input into the base learners for training, generating preliminary prediction results. Then, through a dynamic weighting strategy, differentiated weights are assigned to the outputs of the base learners. The weighted prediction values are used as input features for the meta-learner, which fits the second-layer model to produce the final prediction results. This ensemble framework combines the strengths of multiple base learners to achieve multidimensional representation of the data pattern, effectively improving the model’s generalization ability. Additionally, by utilizing the meta-learner for secondary modeling of the preliminary prediction results, the prediction bias of individual models is corrected, further optimizing the overall prediction accuracy.
Figure 3.
Tacking integrated prediction framework process.
2.5. Database Analysis
2.5.1. Distribution Characteristics of Characteristic Variables
The soft rock deformation database employed in this study is mainly derived from five representative soft rock engineering projects at the Tiaohu Mine in Xinjiang, China, and the Jiumian soft rock tunnel in Sichuan Province, China. In addition, the database is supplemented by statistically processed results obtained from multiple numerical simulations conducted under various working conditions. The data from the Tiaohu Mine in Xinjiang were primarily collected from four vertical shaft soft rock projects, including the intake shaft, return air shaft, and the main and auxiliary inclined shafts. The excavation depths of these shafts range from 500 to 540 m. The lithology of the engineering area is dominated by siltstone, fine sandstone, and mudstone, and the surrounding rock generally exhibits pronounced softening and rheological behavior. The Jiumian soft rock tunnel has a total length of approximately 244 km and a maximum burial depth of 1092 m. The main lithologies in the project area include schist, phyllitic schist, carbonaceous shale, limestone, and dolomite, which are typical soft rock formations. The geological structure in this region is highly complex, resulting in poor stability of the surrounding rock. In the above-mentioned projects, surrounding rock deformation was mainly monitored using three-dimensional laser scanning technology, which enabled high-precision spatial deformation measurements of shaft walls and tunnel surrounding rock. The monitoring frequency was once per day, and the measurement accuracy reached up to 0.1 mm, thereby ensuring the accuracy and reliability of the surrounding rock deformation data.
Numerous studies have demonstrated that deformation of surrounding rock in vertical shafts is governed by the combined effects of multiple factors, which can be generally categorized into three groups: geometric characteristics, geological properties, and construction parameters. Based on the measured data from the aforementioned soft rock engineering projects, a total of 630 valid data samples were collected and organized in this study to establish a soft rock shaft surrounding rock deformation database. The database contains 15 parameters, among which X1–X14 represent the maximum principal stress of rock, porosity, softening coefficient, saturated compressive strength, uniaxial compressive strength, internal friction angle, cohesion, elastic modulus, Poisson’s ratio, surrounding rock classification index (BQ), temperature, rock quality designation (RQD), water inflow, and shaft radius, respectively, while Y denotes the corresponding shaft wall deformation. Due to differences among shaft projects in terms of burial depth, lithology, and geological conditions, the influence of each factor on surrounding rock deformation varies. To comprehensively characterize the overall distribution of the dataset, a systematic statistical analysis was conducted. The mean, minimum, maximum, median, and standard deviation of each feature variable were calculated, and the statistical results are summarized in Table 1.
Table 1.
Descriptive statistics of variable parameters in dataset.
Using Python’s StandardScaler (python 2.2.3, numpy 2.2.5, pandas 2.2.3, scikit-learn 1.7.0, shap 0.47.2, xgboost 3.0.0, matplotlib 3.10.1, lightgbm 4.6.0), the training and test datasets were standardized, normalizing each feature to a standard normal distribution with a mean of 0 and a standard deviation of 1. After standardization, the distribution patterns of the 14 feature variables were visualized using violin plots, as shown in Figure 4. This figure clearly depicts the probability density distribution characteristics and the central tendencies of the data across each dimension.
Figure 4.
Standardized eigenvalue distribution based on violin plot.
2.5.2. Correlation Analysis of Characteristic Variables
Correlation analysis, as a classic statistical method for quantifying the degree of association between variables [29], effectively reveals the correlation between features and the target variable. Among the various metrics, Pearson’s correlation coefficient and Spearman’s correlation coefficient are two mainstream methods: the former is suitable for quantitatively characterizing linear relationships. In this study, Pearson’s correlation coefficient is used to conduct a bi-dimensional analysis, which includes visualizing the thermal correlation between feature variables and analyzing the relationship between the prediction errors of individual models and the feature variables. The mathematical expression is shown in Equation (10).
where is the number of samples; is characteristic; is the target variable; and are the mean values of sample and sample , respectively. The range of Pearson correlation coefficient is −1~1. The greater the absolute value of the correlation coefficient, the stronger the correlation between variables, and the smaller the absolute value, the weaker the correlation between variables. However, the Pearson correlation coefficient is only sensitive to linear features. For variables with nonlinear correspondence, Pearson correlation coefficient cannot be used for correlation analysis.
In this study, a total of 15 features were collected and statistically analyzed, including 14 input features and one output feature. The Pearson correlation coefficient was used for calculation, with each small square representing the correlation coefficient between variables, ranging from −1 to 1. The intensity of the color reflects the magnitude of the correlation, with darker colors indicating stronger correlations. As shown in Figure 5, it can be observed that the correlation coefficient between feature X5 (compressive strength) and X8 (elastic modulus) is 0.89, indicating a strong positive linear correlation. The correlation coefficients between feature X3 (softening coefficient) and X10 ([BQ]) are −0.68, showing a certain negative linear correlation, which indicates an inverse trend in their variation. In contrast, the correlations between X9 (Poisson’s ratio) and X13 (water inflow), as well as X2 (porosity) and X14 (borehole radius), are 0.01, indicating almost no linear relationship between them. The correlation between X10 ([BQ]) and X13 (water inflow) is 0.00, suggesting no correlation at all, reflecting the complex relationship network among the dataset’s feature variables. The overall correlation coefficients between the selected variables in this study are relatively small, and the low correlations between feature variables help enhance the reliability of the regression results.
Figure 5.
Correlation coefficient heat map of characteristic variables.
As shown in Figure 6, the correlation coefficients between X2 (porosity), X9 (Poisson’s ratio), X11 (temperature), and the dependent variable are all less than 0.20, suggesting that these variables may not have a significant impact on predicting borehole deformation. However, this does not mean that these features are entirely useless. In fact, in complex data modeling, there are often nonlinear interactions between features, and these potential interaction mechanisms may need to be captured through feature engineering or an ensemble learning framework. Therefore, these variables are retained for further analysis, and model-based feature evaluation will be used to assess the importance of these features in the subsequent sections.
Figure 6.
Correlation coefficient diagram of characteristic independent variables and dependent variables.
3. Model Construction Analysis
3.1. Advantages of Weighted Improved Stacking Ensemble Learning
Existing studies have shown that single prediction models, due to limitations imposed by their own algorithm assumptions, data adaptability, or structural characteristics, are sensitive to data noise, outliers, and distribution shifts, and lack dynamic adjustment capabilities [30,31], which leads to a decline in prediction accuracy. While traditional Stacking ensemble algorithms improve model generalization by leveraging the complementary advantages of multiple algorithms [32], their meta-learner trains on the direct output of the base learners. When some base learners exhibit significant prediction bias, their output features can introduce noise, causing the meta-learner to fit irrelevant information and reducing the generalization performance of the ensemble model. To address this issue, this paper proposes a Stacking improvement algorithm based on prediction accuracy weighting. A dynamic weight allocation mechanism is constructed, where differential weighting is applied based on the prediction performance of base learners on the validation set. High-accuracy base learners are assigned higher weights, while low-accuracy base learners are given lower weights. This method dynamically corrects the prediction errors of base learners, enhances the contribution of valid features, suppresses the interference of noisy features, and generates a dataset that is more conducive to training the meta-learner.
3.2. Base Learner Selection
In the Stacking ensemble learning framework, the selection of base learners has a decisive impact on the performance of the ensemble model. According to the “diversity-accuracy” balance principle in ensemble learning theory, the choice of base learners must meet two criteria: first, each individual model must possess high predictive accuracy [33]; second, there must be significant diversity among the models, achieved through algorithmic differences, to capture the data patterns from multiple dimensions. The rationale behind this strategy is that high-accuracy base learners provide a reliable information source for ensemble prediction, while the diversity among models enhances the model’s ability to fit complex data distributions through complementary feature expressions. Specifically, algorithmic diversity allows each base learner to form differentiated decision boundaries in the feature space, enabling them to uncover potential patterns in the data from different perspectives. This results in effective information complementarity during the fusion process in the meta-learner, preventing the accumulation of bias from individual models and ultimately improving the overall robustness and generalization performance of the predictive method.
3.2.1. Base Learner Selection Metrics
To ensure the accuracy of surrounding rock deformation prediction results, the selection of base learners is crucial. Based on the principles of base learner selection, this study uses Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the Coefficient of Determination (R2) as evaluation criteria for base learner selection. The specific calculation formulas are shown in Equations (11) and (12).
In addition, the Mean Absolute Percentage Error (MAPE) is used to calculate the error results for each fold in the cross-validation process of the base learners. Based on the MAPE values of each fold, an error correlation analysis is performed for the base learners. The MAPE evaluation metric is then used as the final evaluation criterion for the prediction performance of surrounding rock deformation in the borehole.
where is the true value; is the predicted value; is the average value of the true value, and is the number of samples.
The MAPE is a commonly used statistical metric for measuring the error between predicted and actual values. It reflects the accuracy of the prediction results by calculating the relative percentage of the prediction error, with the result presented as a percentage, making it intuitive and easy to understand. By taking the absolute value, this metric avoids the cancelation of positive and negative errors, and its robustness to extreme values is superior to that of RMSE, MAE, and other squared error metrics. MAPE is particularly suitable for regression problems, especially in scenarios where the actual values are positive.
3.2.2. Comparative Analysis of Single Model Error
To illustrate the process and rationale for selecting the optimal base learners for the Stacking ensemble prediction, this section first analyzes the prediction performance and differences in various individual models. Nine individual prediction models, including RF, GBDT, XGBoost, SVR, LightGBM, KNN, Decision, CatBoost, and MLP, are selected as candidates for the base learners. The results of each base learner’s individual predictions are compared. The dataset is divided using 5-fold cross-validation, generating five sets of training and testing data. The average evaluation metrics of each individual prediction model across the five cross-validation sets are shown in Figure 7, while the MAPE values for each fold and their averages are presented in Table 2.
Figure 7.
RMSE, MAE and R2 values of the base learner prediction model.
Table 2.
MAPE values of each single prediction model.
To analyze the prediction differences among the models, the Pearson correlation coefficients of the prediction errors for each model were calculated, and the results are shown in Figure 8. As can be seen from the table, the prediction accuracies of the RF model, SVR, LightGBM, and CatBoost are relatively low at 15.48%, 16.99%, 15.92%, and 17.44%, respectively. As shown in Figure 8, the error correlations of all models are generally high, which is due to the strong learning capabilities of the models, resulting in similar distributions of training errors. According to the base learner selection criteria, although XGBoost’s prediction performance is lower than that of RF and Decision models in terms of accuracy, the correlation of XGBoost with KNN and MLP is relatively low. The error correlations between MLP and other algorithms are also not high. Based on these considerations, GBDT, XGBoost, KNN, and MLP models were ultimately selected as the base learners for the Stacking ensemble prediction.
Figure 8.
Correlation analysis of prediction error of each model.
3.3. Feature Weighting Improvement
The core of the proposed feature-weighted Stacking ensemble method lies in the implementation of differentiated weight allocation based on the prediction performance of each base learner. This method uses the Mean Absolute Percentage Error (MAPE) of the base learners as the quantitative basis for weight distribution. By constructing a dynamic weighting model, the prediction results of each base learner are assigned weights that match their prediction accuracy. The formula for calculating these weights is shown in Equation (15):
where is the weight of the primary learner, , is the number of primary learners, is the value of the I-th base learner, is the mean absolute percentage error of the T-th base learner.
3.4. Meta-Learner Selection
Stacking can combine the strengths of individual base models while ignoring their weaknesses. However, to avoid the risk of overfitting, selecting an appropriate meta-learner is crucial. In most cases, the meta-learner is chosen to be a model with strong generalization ability or simplicity. Therefore, linear regression (LR), elastic network regression (ENet), Huber loss regression model (Huber), and Lasso regression (Least Absolute Shrinkage and Selection Operator, Lasso) are selected as the meta-learners, as they are relatively simple models. The MAE, RMSE, and R2 values of the meta-learners are shown in Figure 9.
Figure 9.
The RMSE, MAE and R2 values of the six-element learner prediction model.
As shown in Figure 9, based on a comparison of the MAE, RMSE, and R2 values of the four models, it can be concluded that the Lasso regression model, when used as the meta-learner, has the lowest MAE and RMS error values compared to the Linear, Huber, and Enet regression models, and the highest coefficient of determination (R2) among the four. Therefore, the Lasso regression model is selected as the meta-learner due to its superior prediction performance.
4. Results and Discussion
4.1. Performance Analysis
The scatter plots of the prediction results for the four best base learners (GBDT, XGBoost, KNN, MLP) obtained in Section 3.2 and the best meta-learner Lasso model (Least Absolute Shrinkage and Selection Operator, Lasso) obtained in Section 3.4 for both the training and test datasets are shown in Figure 10. To compare the predicted results with the actual values, a reference line is used, representing the scenario where the predicted values align with the measured deformation values. MAE, RMSE, and MAPE are employed to evaluate the prediction performance, where smaller errors indicate better predictive capability. The correlation between the measured and predicted values is assessed using R2.
Figure 10.
Prediction results of six machine learning methods on data sets: (a) GBDT; (b) XGBoost; (c) KNN; (d) MLP; (e) Traditional Stacking; (f) Weighted improved Stacking.
Figure 11 shows the prediction performance of 11 machine learning algorithm models for the MAPE evaluation index of soft rock wellbore surrounding rock deformation, reflecting the prediction accuracy of each model. The smaller the MAPE value, the better the model’s prediction performance. It can be seen that among traditional machine learning algorithms, the GBDT model has a MAPE of 12.10%, which is at an intermediate level overall, while the KNN model has a MAPE of 11.24%, performing the best among traditional algorithms such as RF, Decision, XGB, LGB, and SVR. Among gradient boosting algorithms, the CatBoost model’s MAPE reaches as high as 17.33%, performing poorly compared to other gradient boosting algorithms, while the MLP model has a MAPE of 14.45%. In addition, the MAPE values of the two ensemble methods, Stacking1 and Stacking2, are 8.83% and 8.65%, respectively. Stacking1 is an unweighted Stacking ensemble learning algorithm, which reduces the prediction error by at least 2.41% compared to a single prediction model. Stacking2 is a weighted and improved Stacking ensemble learning algorithm, which reduces the prediction error by at least 2.59% compared to a single prediction model.
Figure 11.
MAPE value of each model prediction error.
Overall, the Stacking ensemble method exhibits the lowest MAPE value in this task, indicating its advantage in prediction accuracy. On the other hand, gradient boosting algorithms such as CatBoost perform poorly in this study, and may require further parameter tuning or the combination with other methods to enhance their performance. Traditional models (such as KNN and GBDT), which perform relatively well, are used as base learners in the ensemble framework to ensure the prediction accuracy of the ensemble learning method.
As shown in Table 3, the GBDT model shows superior performance in terms of MAE, RMSE, R2, and MAPE, with its prediction results distributed around the reference line and a small dispersion. These performance metrics can further clarify that the GBDT model achieves the lowest RMSE and MAE, and the highest R2 among the single prediction models. In comparison, the KNN model’s predictive ability is quite similar to that of the GBDT model, with both models yielding nearly identical results and metrics. The MPL model, however, exhibits significant deviations from the actual values, producing the highest RMSE and MAE, as well as the lowest correlation between the measured and predicted values. The traditional stacking model shows considerable improvement over the single prediction models across all four evaluation metrics. The weighted improvement of the stacking prediction model exhibits a slight increase in RMSE, but further enhances the MAE, R2, and MAPE metrics compared to the traditional stacking model.
Table 3.
Errors of six machine learning methods on the test set.
In the context of borehole soft rock deformation prediction, the primary focus is on the accuracy of relative errors. MAPE effectively reflects the relative deviation of the prediction results, making it particularly suitable for scenarios where the predicted values are positive and there is a high demand for relative error precision, offering strong engineering interpretability. In contrast, RMSE is more sensitive to a small number of extreme deformation points and may be amplified when the sample distribution is uneven or there are local large deformations. MAPE, on the other hand, demonstrates better robustness, effectively avoiding the cancelation of positive and negative errors, and providing a more stable evaluation of model performance under extreme deformation conditions. Therefore, MAPE is chosen as the primary optimization metric in this study.
As shown in Figure 12, a comparative analysis is conducted between the prediction results of six machine learning methods and the measured monitoring deformation values on the test dataset. In terms of key absolute error metrics, the weighted improved Stacking model demonstrates outstanding predictive performance, with its error level significantly lower than that of the traditional Stacking model, and substantially superior to the other four single prediction models. This advantage is particularly evident in engineering scenarios involving large deformation of soft rocks. From this, we can conclude that the traditional Stacking model shows some improvement over the single models, but the weighted improved Stacking model outperforms the others in the field of soft rock deformation prediction, offering precise predictions of the actual deformation evolution in soft rock engineering. In contrast, the other single prediction models exhibit relatively high error values, making them less suitable for predicting large deformations in soft rock engineering projects.
Figure 12.
Comparison of data prediction results from six machine learning methods with actual monitoring values: (a) GBDT; (b) XGBoost; (c) KNN; (d) MLP; (e) Traditional Stacking; (f) Weighted improved Stacking.
4.2. Optimal Model Explanation
SHAP (SHapley Additive exPlanations) analysis, as an important tool for model interpretability [34,35], quantifies the marginal impact of each feature variable on the prediction results by assigning standardized contribution values. This method is based on the Shapley value theory from cooperative game theory, constructing an additive explanation model to systematically characterize the directional perturbation effects of feature variables on the output in the local prediction space, thereby enabling a structured interpretation of the model’s decision-making logic.
The left side of Figure 13 shows that X5 (compressive strength) red high-value points are mostly concentrated in the positive SHAP value region (left of 0), while blue low-value points are mainly in the negative region (right of 0). This indicates that higher values of compressive strength have a suppressive effect on the model output (borehole deformation), while lower values promote it, with a significant effect range (SHAP values ranging from −5 to 15). The distribution of red and blue points for X1 (maximum principal stress) is dispersed, with both positive and negative SHAP values present. Specifically, the red high-value points are entirely on the right side of the SHAP value region, while the blue low-value points are almost entirely on the left side, suggesting that an increase in X1 (maximum principal stress) positively promotes borehole deformation, while a decrease in X1 (maximum principal stress) has a suppressive effect on deformation. The importance of X12 (cohesion), X14 (borehole radius), and X8 (elastic modulus) is relatively high, with their SHAP values distributed more widely. X12 (cohesion) red points (high values) are mostly in the negative SHAP region, while blue points (low values) are predominantly in the positive region, showing a monotonically negative correlation. This suggests that the higher the rock cohesion, the less favorable it is for the deformation of the borehole surrounding rock. X14 (borehole radius) has most of its high-value points in the positive region and most of its low-value points in the negative region, indicating that an increase in borehole radius positively influences deformation. X9 (Poisson’s ratio) and X2 (softening coefficient) have SHAP values mostly concentrated around 0, with an even color distribution, indicating a minimal impact on the model’s output.
Figure 13.
Importance analysis of characteristic variables.
In the feature importance chart on the right side of Figure 13, the bar graph displays the size of each feature’s impact on the model’s prediction results and its proportion of importance. The rock’s compressive strength, as the most important feature, not only shows a significant suppressive effect on the model output in the left SHAP chart but also occupies the largest proportion in the feature importance bar chart on the right (38.1%). Maximum principal stress has a positive correlation with the output and ranks second in importance, accounting for 11.0%. X12 (rock quality designation, RQD), X14 (borehole radius), and X8 (elastic modulus) follow closely behind, accounting for 10.6%, 9.6%, and 9.1%, respectively. X9 (Poisson’s ratio) and X2 (softening coefficient) have an importance proportion of less than 1%, making them the least important features with almost no effect on the model’s output.
5. Conclusions
This study systematically presents the prediction process of surrounding rock deformation in vertical shafts using the weighted improved Stacking machine learning ensemble algorithm. The entire process can be divided into four stages: feature variable correlation analysis, base learner selection, meta-learner selection, and feature importance analysis. A comprehensive comparison of the prediction performance of GBDT, XGBoost, KNN, MLP, unweighted Stacking ensemble learning, and weighted improved Stacking ensemble learning algorithms in predicting borehole surrounding rock deformation is made, leading to the following conclusions:
- (1)
- To overcome the limitations of single prediction models, a feature-weighted Stacking ensemble learning method is proposed based on the predictive performance of the models and MAPE correlation analysis. Four base learning models are selected from nine individual models, along with the linear meta-learner model with the best performance. This approach aims to address the issues of limited application and low accuracy of machine learning in the prediction of deformation in weak vertical shafts.
- (2)
- The prediction results indicate that the feature-weighted Stacking ensemble learning algorithm outperforms individual prediction models and traditional Stacking models, demonstrating superior performance. The MAPE is reduced by an additional 0.18% compared to the traditional Stacking model, achieving higher prediction accuracy. This method is suitable for engineering applications involving the prediction of deformation in weak surrounding rock vertical shafts under conditions with multiple feature variables.
- (3)
- Feature importance analysis reveals that different feature variables contribute differently to the deformation of the shaft wall surrounding rock, highlighting the complexity and uncertainty of shaft engineering. Among the predicted importance results of various influencing factors, rock compressive strength, maximum principal stress of the surrounding rock, rock integrity index (RQD), and shaft radius are identified as the most significant factors, which are closely related to the deformation of the shaft wall surrounding rock. The results of the feature importance analysis are fully consistent with the real-world situation.
Author Contributions
L.Z.: conducted analyzed the data and wrote the first draft of the manuscript. S.Y.: Supervision, writing—review and editing; Q.F.: edited the manuscript. H.J.: Project support and data provision. All authors have read and agreed to the published version of the manuscript.
Funding
This research is financially supported by the Deep Earth Probe and Mineral Resources Exploration-National Science and Technology Major Project (Gtant NO. 2024ZD1004103) and the Beijing Natural Science Foundation (NO. 2242045).
Institutional Review Board Statement
Not applicable.
Data Availability Statement
Data will be made available on request.
Conflicts of Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
References
- Sun, X.; Li, G.; Zhao, C.; Liu, Y.; Miao, C. Investigation of deep mine shaft stability in alternating hard and soft rock strata using three-dimensional numerical modeling. Processes 2018, 7, 2. [Google Scholar] [CrossRef] [Scilit]
- Li, A.; Ding, X.; Yu, Z.; Wang, M.; Mu, Q.; Dai, Z.; Li, H.; Zhang, B.; Han, T. Prediction model of fracture depth and water inrush risk zoning in deep mining coal seam floor. Environ. Earth Sci. 2022, 81, 315. [Google Scholar] [CrossRef] [Scilit]
- Wang, T.; Guo, G.; Li, H.; Yin, H.; Zheng, H.; Meng, F.; Zhang, L. The full period interactive response mechanism between surface subsidence and large energy events in deep mining of super-thick weakly cemented overburden. Environ. Earth Sci. 2025, 84, 147. [Google Scholar] [CrossRef] [Scilit]
- Garzón-Roca, J.; Torrijo, F.-J.; Rodríguez-Peces, M.-J.; Ramos, A. Geological strength index quantitative estimation of flysch rock masses from on-field geomechanical data based on ai tools. Bull. Eng. Geol. Environ. 2025, 84, 348. [Google Scholar] [CrossRef] [Scilit]
- Wang, Q.; Ma, F.; Gao, H.; Jiang, B.; Bian, Z. Drilling-based measuring method of rock strength through the ide intelligent system. Bull. Eng. Geol. Environ. 2025, 84, 314. [Google Scholar] [CrossRef] [Scilit]
- Spesivtsev, P.; Sinkov, K.; Sofronov, I.; Zimina, A.; Umnov, A.; Yarullin, R.; Vetrov, D. Predictive model for bottomhole pressure based on machine learning. J. Pet. Sci. Eng. 2018, 166, 825–841. [Google Scholar] [CrossRef] [Scilit]
- Wu, X.; Feng, Z.; Liu, J.; Chen, H.; Liu, Y. Predicting existing tunnel deformation from adjacent foundation pit construction using hybrid machine learning. Autom. Constr. 2024, 165, 105516. [Google Scholar] [CrossRef] [Scilit]
- Xu, X.-F.; Jing, L.-W.; Yang, R.-S.; Li, Q. Distribution rules of additional force and secondary ground pressure stress of shaft wall in seepage sedimentation. J. China Coal Soc. 2010, 35, 203–207. [Google Scholar] [CrossRef]
- Han, J.; Zou, J.; Hu, C.; Yang, W. Study on size design of shaft protection rock/coal pillars in thick soil and thin rock strata. Energies 2019, 12, 2553. [Google Scholar] [CrossRef] [Scilit]
- Tang, Y.; Wang, J.; Peng, X.; Wang, J. Study on coal mine shaft chaos characteristics and deformation prediction model. Met. Mine 2011, 40, 149–152. [Google Scholar]
- Khan, M.-M.; Krige, G.-J. Evaluation of the structural integrity of aging mine shafts. Eng. Struct. 2002, 24, 901–907. [Google Scholar] [CrossRef] [Scilit]
- Yuan, D.; Geng, C.; Zhang, L.; Zhang, Z. Application of gray-markov model to land subsidence monitoring of a mining area. IEEE Access 2021, 9, 118716–118725. [Google Scholar] [CrossRef] [Scilit]
- Bai, C.; Xue, Y.-G.; Qiu, D.; Yang, W.; Su, M.; Ma, X. Real-time updated risk assessment model for the large deformation of the soft rock tunnel. Int. J. Geomech. 2021, 21, 04020234. [Google Scholar] [CrossRef] [Scilit]
- Feng, D.-L.; Wu, H.-N.; Chen, R.-P.; Liu, F.-X.; Yao, M. An analytical model to predict the radial deformation of surrounding rock during shaft construction via shaft boring machine. Tunn. Undergr. Space Technol. 2023, 140, 105321. [Google Scholar] [CrossRef] [Scilit]
- Zhang, P.; Wu, H.-N.; Chen, R.-P.; Chan, T.-H. Hybrid meta-heuristic and machine learning algorithms for tunneling-induced settlement prediction: A comparative study. Tunn. Undergr. Space Technol. 2020, 99, 103383. [Google Scholar] [CrossRef] [Scilit]
- Tang, L.; Na, S.-H. Comparison of machine learning methods for ground settlement prediction with different tunneling datasets. J. Rock Mech. Geotech. Eng. 2021, 13, 1274–1289. [Google Scholar] [CrossRef] [Scilit]
- Poulos, H.-G.; Davis, E.-H. The use of elastic theory for settlement prediction under three-dimensional conditions. Geotechnique 2015, 18, 67–91. [Google Scholar] [CrossRef] [Scilit]
- Müthing, N.; Zhao, C.; Hölter, R.; Schanz, T. Settlement prediction for an embankment on soft clay. Comput. Geotech. 2018, 93, 87–103. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.; Wu, Y.; Li, M.; Liu, Y.; Xu, W.; Yan, L.; Xie, W.-C. A novel fdem-gsa method with applications in deformation and damage analysis of surrounding rock in deep-buried tunnels. Tunn. Undergr. Space Technol. 2024, 154, 106106. [Google Scholar] [CrossRef] [Scilit]
- Song, T.; Zhou, Y.; Chen, T.; Sun, B. Prediction of nonuniform large deformation in deep layered rock tunnels: Comprehensive application of data-driven and theoretical models. Tunn. Undergr. Space Technol. 2025, 158, 106448. [Google Scholar] [CrossRef] [Scilit]
- Fu, F.; Jiang, J.; Shao, Y.; Cui, B. An experimental evaluation of large scale GBDT systems. Proc. VLDB Endow. 2019, 12, 1357–1370. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; An, X.; Li, Q.; Wang, C.; Yu, H.; Zhou, X.; Geng, Y.-A. Application of xgboost algorithm in the optimization of pollutant concentration. SSRN Electron. J. 2022, 276, 106238. [Google Scholar] [CrossRef] [Scilit]
- Zhang, S. Challenges in KNN Classification. IEEE Trans. Autom. Control 2021, 34, 4663–4675. [Google Scholar] [CrossRef] [Scilit]
- Teng, F.; Mao, Y.; Li, Y.; Qian, S.; Nanehkaran, Y.-A. Comparative models of support-vector machine, multilayer perceptron, and decision tree predication approaches for landslide susceptibility analysis. Open Geosci. 2024, 16, 20220642. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.; Lee, C.-M.; Feng, R.; Chi, S.-L. An analog neural network approach for the least absolute shrinkage and selection operator problem. Neural Comput. Appl. 2018, 29, 389–400. [Google Scholar] [CrossRef] [Scilit]
- Akiba, T.; Sano, S.; Yanase, T.; Ohta, T.; Koyama, M. Optuna: A Next-generation Hyperparameter Optimization Framework. In Proceedings of the KDD ’19: The 25th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 2623–2631. [Google Scholar] [CrossRef] [Scilit]
- Fayed, H.-A.; Atiya, A.-F. Speed up grid-search for parameter selection of support vector machines. Appl. Soft Comput. 2019, 80, 202–210. [Google Scholar] [CrossRef] [Scilit]
- Pohjankukka, J.; Pahikkala, T.; Nevalainen, P.; Heikkonen, J. Estimating the prediction performance of spatial models via spatial k-fold cross validation. Int. J. Geogr. Inf. Sci. 2017, 31, 2001–2019. [Google Scholar] [CrossRef] [Scilit]
- Shantal, M.; Othman, Z.; Bakar, A.-A. A novel approach for data feature weighting using correlation coefficients and min–max normalization. Symmetry 2023, 15, 2185. [Google Scholar] [CrossRef] [Scilit]
- Morita, K.; Mizuno, T.; Kusuhara, H. Investigation of a data split strategy involving the time axis in adverse event prediction using machine learning. J. Chem. Inf. Model. 2022, 62, 3982–3992. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Etim, B.; Al-Ghosoun, A.; Renno, J.; Seaid, M.; Mohamed, M.-S. Machine learning-based modeling for structural engineering: A comprehensive survey and applications overview. Buildings 2024, 14, 3515. [Google Scholar] [CrossRef] [Scilit]
- Lei, W.; Wang, J. Dynamic stacking ensemble monitoring model of dam displacement based on the feature selection with pca-rf. J. Civ. Struct. Health Monit. 2022, 12, 557–578. [Google Scholar] [CrossRef] [Scilit]
- Rouhani, M.-M.; Farrokh, E. TBM performance prediction based on XGBoost models: A case study of the ghomrud water conveyance tunnel (Lots 3 and 4). Bull. Eng. Geol. Environ. 2025, 84, 304. [Google Scholar] [CrossRef] [Scilit]
- Hancock, J.-T.; Khoshgoftaar, T.-M.; Liang, Q. A problem-agnostic approach to feature selection and analysis using shap. J. Big Data 2025, 12, 12. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.; Liang, Q.; Hancock, J.-T.; Khoshgoftaar, T.-M. Feature selection strategies: A comparative analysis of SHAP-value and importance-based methods. J. Big Data 2024, 11, 44. [Google Scholar] [CrossRef] [Scilit]
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. |
© 2026 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.














