Method for predicting rock shear strength based on Bayesian method-meta-heuristic optimization
The prediction system constructed using Bayesian methods and metaheuristic optimization solves the problem of insufficient cross-scenario generalization ability in rock shear strength prediction, and achieves high-precision and robust shear strength parameter prediction, applicable to complex geological conditions and multi-scale structural effects.
Patent Information
- Application Number
- CN202511906886.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies for predicting rock shear strength often rely on specific lithology or a single data source, resulting in limited cross-scenario generalization ability, large prediction errors, and insufficient consideration of complex geological conditions and multi-scale structural effects.
A prediction system based on Bayesian method-metaheuristic optimization is adopted. By optimizing four models with Bayesian methods and combining six metaheuristic algorithms to adjust the hyperparameters of the optimal improved model, an SMA-RF model is constructed for prediction, achieving high-precision and reliable prediction of shear strength parameters.
It achieves high-precision and robust prediction under small sample and high noise conditions, provides a rapid assessment scheme for rock mass shear strength, and improves the model's cross-scenario applicability and prediction accuracy.
Smart Images

Figure CN121706580A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of rock mechanics parameter prediction, and relates to a method for predicting rock shear strength based on a Bayesian method-meta heuristic optimization. BACKGROUND
[0002] Rock mechanics parameters are physical parameters reflecting the mechanical behavior of rocks under external forces, such as shear strength, compressive strength, tensile strength, elastic modulus, Poisson's ratio, porosity, permeability, etc. The cohesion c and internal friction angle φ in shear strength can reflect the state of rock destruction under instability conditions and are more suitable for providing strength parameters in dam, slope and underground cavern rock mass analysis. Generally, shear strength can be directly measured in the field (rock triaxial test or shear test), but it is difficult to conduct in-situ tests in a relatively complex geological environment, and the rock mass needs to be taken back from the field and obtained through indoor tests. However, the structure of the rock mass is damaged during the process of obtaining the rock mass in the field, and it is difficult to obtain a rock mass exactly the same as in the stratum; and indoor tests need to prepare multiple samples to measure the mechanical parameters, and the results measured will also differ from the in-situ tests.
[0003] Under the background of machine learning, it is a breakthrough to use a method that is low in cost, fast in speed and reliable. Studies have shown that the random forest model can effectively identify the key features affecting the physical and mechanical properties of rocks through its variable importance measure, and can be used to select the most representative input factors to achieve accurate prediction of parameters such as Young's modulus and uniaxial compressive strength. There are also studies that have constructed a multi-input improved model of rock tensile strength based on artificial neural networks, and compared the effects of different optimization strategies on the performance of the model. The hybrid ANN (such as lwo-ANN) after algorithm optimization has higher prediction accuracy and can more effectively describe the nonlinear variation of rock tensile strength. In addition, through the exploration of parameters, it is found that there is a certain relationship between physical parameters and rock shear strength, and it is time-consuming and laborious to estimate the shear strength of rocks using empirical equations after a large number of tests. It is very meaningful to consider introducing machine learning to predict the shear strength of rock materials. There are also studies that have systematically compared various machine learning models, and the results show that CatBoost performs best in multiple evaluation indicators, further verifying the effectiveness of machine learning methods in dealing with the complex nonlinear strength characteristics of rock mass.
[0004] Traditional triaxial and shear tests have problems such as sampling difficulty, high cost, long cycle, and are difficult to meet the demand of rapid and reliable parameter acquisition under complex working conditions. The above studies show that a variety of mechanical parameters can be effectively used for shear strength prediction, and show the potential of machine learning methods in reducing test cost and improving prediction efficiency. However, these studies are mostly dependent on specific lithology or single data source, and the cross-scene generalization ability of the model is limited, and the consideration of different geological conditions, sampling differences and multi-scale structure effects is insufficient. SUMMARY
[0005] The purpose of the present application is to provide a method for predicting rock shear strength based on Bayesian method-meta heuristic optimization, which solves the problem that the prior art in the process of predicting shear strength is mostly dependent on specific lithology or single data source, the cross-scene generalization ability of the model is limited, and the consideration of different geological conditions, sampling differences and multi-scale structure effects is insufficient, resulting in large prediction error.
[0006] The technical scheme adopted by the present application is a method for predicting rock shear strength based on Bayesian method-meta heuristic optimization, which is implemented according to the following steps: Step 1, pre-processing the original data; Step 2, Bayesian optimization of four models, output four improved models, and select an optimal improved model from them; Step 3, adjusting the hyperparameters of the optimal improved model using six meta-heuristic algorithms; Step 4, using the output model of step 3 to predict the training set and test set, calculating the evaluation index, and selecting the SMA-RF model with the optimal comprehensive performance from the six RF hybrid models; Step 5, using the optimal SMA-RF model determined in step 4 to predict all test samples, and outputting the predicted value of the cohesion c and the internal friction angle φ .
[0007] The beneficial effects of the present application are that (1) a three-layer joint prediction system composed of Bayesian inference-machine learning model-meta heuristic algorithm optimization is first constructed, by introducing Bayesian prior at the model entrance, establishing a multi-model prediction structure in the middle layer, and performing hyperparameter global optimization in the output layer, the small sample high precision prediction ability and reliable uncertainty expression that traditional methods cannot achieve are realized. (2) For GMM, Dirichlet, Wishart and Gaussian are introduced as priors to solve the overfitting of maximum likelihood; for Bi-LSTM, Monte-Carlo Dropout is added to make the network have posterior sampling capability; for Light-GBM, a Bayesian residual model based on T distribution prediction is constructed; for RF, an "ensemble forest structure based on posterior weighted" is proposed to replace the traditional equal weight average. (3) A unified random forest hyperparameter global optimization framework is established, so that six kinds of meta heuristic algorithms can be embedded in the same optimization process, realizing the collaborative optimization of parameters such as tree depth, feature number and leaf node number. (4) The three-layer prediction system still has high precision and high robustness under small sample and high noise conditions, providing an effective alternative scheme for the rapid evaluation of rock mass shear strength, which has important application value. BRIEF DESCRIPTION OF DRAWINGS
[0008] Figure 1 is the input parameter scatter plot according to the present application; Figure 2a is the cohesion scatter plot according to the present application, Figure 2b is the internal friction angle scatter plot; Figure 3 is the Pearson correlation coefficient diagram according to the present application; Figure 4 is the implementation flowchart of the method of the present application; Figure 5a is the scatter plot between the cohesion prediction value and the true value under the GMM model of the present application, Figure 5b is the scatter plot between the internal friction angle prediction value and the true value under the GMM model of the present application; Figure 6a is the scatter plot between the cohesion prediction value and the true value under the GMM model of the present application, Figure 6b is the scatter plot between the internal friction angle prediction value and the true value under the GMM model of the present application; Figure 7a is the scatter plot between the cohesion prediction value and the true value under the Bi-LSTM model of the present application, Figure 7b is the scatter plot between the internal friction angle prediction value and the true value under the Bi-LSTM model of the present application; Figure 8a is the scatter plot between the cohesion prediction value and the true value under the Bi-LSTM model of the present application, Figure 8bThis is a line graph showing the predicted and actual values of the internal friction angle under the Bi-LSTM model of this invention; Figure 9a This is a scatter plot of the predicted and actual cohesion values under the Light-GBM model of this invention. Figure 9b This is a scatter plot of the predicted and actual values of the internal friction angle under the Light-GBM model of this invention; Figure 10a This is a line graph showing the predicted and actual values of cohesion under the Light-GBM model of this invention. Figure 10b This is a line graph showing the predicted and actual values of the internal friction angle under the Light-GBM model of this invention; Figure 11a This is a scatter plot showing the relationship between the predicted and actual cohesion values under the RF model of this invention. Figure 11b This is a scatter plot showing the relationship between the predicted and actual values of the internal friction angle under the RF model of this invention. Figure 12a This is a line graph showing the predicted and actual values of cohesion under the RF model of this invention. Figure 12b This is a line graph showing the predicted and actual values of the internal friction angle under the RF model of this invention; Figure 13a This is the ratio of the cohesion prediction parameter model of the present invention. Figure 13b This is the ratio of the internal friction angle prediction parameter model of this invention; Figure 14a This is a comparison chart of the cohesion performance of the random forest model of this invention. Figure 14b This is a comparison chart of the internal friction angle performance of the random forest model of this invention; Figure 15 This describes the implementation process of the RF hybrid model of the present invention; Figure 16a This is an iterative curve of the cohesion of the RF hybrid model of the present invention. Figure 16b This is the iterative curve of the internal friction angle in the RF hybrid model of this invention. Detailed Implementation
[0009] Reference Figure 4 The method of the present invention is implemented according to the following steps: Step 1: Preprocess the raw data by normalizing, removing noise, and completing missing data to form a dataset that can be used for Bayesian initialization, providing high-quality input for the prior construction of subsequent models.
[0010] The preprocessed dataset was divided into training and testing sets, with the training set comprising 80% and the testing set comprising 20%. Siltstone mudstone, sandpaper mudstone, siltstone, argillaceous siltstone, medium-grained sandstone, and fine-grained sandstone were selected as reference benchmarks, with natural density as the benchmark. ρ Moisture content ω0, water absorption ω a Porosity φand natural compressive strength R The input parameters are used to predict the shear strength of the rock.
[0011] The raw data mentioned above were all measured in the laboratory. A total of 100 points were selected as the dataset, and 80 points were randomly selected for model training. The remaining 20 points were used as the test set to test the prediction accuracy. The six parameter values in Table 1 show distributions and densities across various ranges. ρ and internal friction angle φ The difference between the maximum and minimum values is not large, at 2.14 kg / m³. 3 2.72 kg / m 3 And 33.42°, 41.02°. From Figure 1 It is evident that the distribution of natural density, moisture content, water absorption, and porosity is relatively concentrated, without significant dispersion, indicating that the above data is reasonable. From Figure 2a and Figure 2b It can be seen that the data obtained from the experiment are widely distributed, especially the distribution of the internal friction angle and shear strength. c and φ The shear strength parameter exhibits a strong correlation with the five input parameters, making it highly suitable for constructing an improved model to predict this parameter, thereby yielding reliable prediction results. Figure 3 Correlation analysis shows that, using the Pearson correlation coefficient to observe the linear relationship between the corresponding variables, there is a certain correlation between the input and output of these seven parameters, including moisture content ω0 and water absorption ω. a Porosity φ Natural compressive strength R and cohesion c internal friction angle φ It exhibits a strong linear correlation and density. ρ With cohesion c internal friction angle φ The linear correlation is relatively weak. From Figure 3 It is evident that the parameters can, to some extent, show the relationship between input and output, but they cannot directly determine the basis for the optimal improved model. The optimal prediction still needs to be obtained by comparing different models.
[0012] Table 1. Basic Data Information
[0013] Step 2: Add a Bayesian inference module (prior construction, posterior update, residual modeling, posterior weighting, etc.) to each of the four models: Gaussian Mixture Model (GMM), Bi-Short Memory Network (Bi-LSTM), Lightweight Gradient Boosting Machine (Light-GBM), and Random Forest (RF). This outputs four improved models with uncertainty quantification capabilities. Select the optimal improved model from these four models. Before using the four models GMM, Bi-LSTM, Light-GBM and RF, we first use Bayesian methods to optimize these four models, such as denoising, stabilization and standardization, dimensionality reduction, completion, and smoothing, to help improve the accuracy of each model. After comparison, we select the optimal improved model, which is the Bayesian-RF model obtained later.
[0014] Step 3: Adjust the hyperparameters of the optimal improved model using six metaheuristic algorithms. Using the best-performing Bayesian-RF model from step 2 as the base model and its posterior prediction error as the fitness function, six metaheuristic algorithms (PKO, BWO, SCSO, SMA, SFOA, and BA) are employed for hyperparameter global search. The hyperparameters of the optimal improved model are then adjusted, resulting in six RF hybrid models: PKO-RF, BWO-RF, SCSO-RF, SMA-RF, SFOA-RF, and BA-RF, used to improve the predicted shear strength. c and φ ).
[0015] Step 4: Use the output model from Step 3 to predict on the training and test sets, and calculate... R ²、 MSE , RMSE , MAE , MAPE The evaluation index is used to select the best overall performance model from the six RF hybrid models, namely the SMA-RF model.
[0016] Accuracy prediction is performed on the model under the optimal algorithm using the coefficient of determination. R 2 Mean square error MSE Root mean square error RMSE Mean absolute error MAE Mean absolute percentage error MAPE The indicators are used to evaluate the model's prediction accuracy and error level, with values ranging from [value range missing]. ; R 2 This indicates the goodness of fit; a larger value means a stronger explanatory power of the model. MSE , RMSE and MAE The smaller the value, the better the model; MAPE The relative error is measured as a percentage.
[0017] Step 5: Use the optimal SMA-RF model determined in Step 4 to make a final prediction on all test samples, outputting a more accurate cohesion.c With internal friction angle φ The predicted value.
[0018] After the model's accuracy prediction is completed, the remaining test set values are tested to select the optimal hybrid model, and finally, more accurate shear strength parameters are predicted, thus achieving the optimization prediction goal of this invention.
[0019] The four improved models selected in step 2 of this invention are described below: 1) Bayesian-GMM model: Gaussian Mixture Model (GMM) is an unsupervised clustering algorithm and a probabilistic model, consisting of a... K It is a linear combination of Gaussian distributions, let... That is: (6) In the formula, Let be the probability density function. K This represents the dimension of the Gaussian distribution. X for K A set of vectors in 3D space. is the mixture parameter of the Gaussian distribution, with a value range of [0,1]. For the first K A uniform vector with a Gaussian distribution. For the first K The covariance matrix of the Gaussian distribution. It is the first K The probability density function of the Gaussian distribution is expressed as: (7) In the formula, d It is a set of vectors X Dimensions It is the determinant of the covariance matrix. It is the inverse of the covariance matrix.
[0020] While Gaussian distributions (GMMs) can fit complex Gaussian distributions and are computationally fast, they also have limitations, such as the inability to quickly specify the number of clusters. K One issue is its sensitivity to outliers. Integrating Bayesian methods into GMM can effectively compensate for this shortcoming, enhancing automated cluster handling and reducing overfitting. Therefore, it is assumed that the posterior distribution of the nonlinear parameters is... In the implementation process, the Expectation-Maximization (EM) algorithm is used to calculate the uniform vector, covariance matrix, and mixing parameter π for each Gaussian distribution, thereby deriving the highest probability density and the specified number of clusters. K However, latent variables exist in GMM. Z Formula (8) represents the first k Samples under a Gaussian distributionx n If maximum likelihood estimation cannot be used for sampling, the EM algorithm needs to be used iteratively to solve for the probability, and the expression is: (8) The EM algorithm can expect the posterior distribution of latent variables and then maximize the parameters, thus avoiding complex likelihood functions. θ The set of model parameters to be estimated is expressed as: (9) (10) To facilitate the derivation, log-likelihood is introduced into the EM algorithm, expressed as: (11) in, , indicating the first k One sample; The probability density function expression for GMM under the EM algorithm is: (12) The probability density function of GMMs is usually quite complex, requiring the introduction of Bayesian methods for simplification. Set as prior distribution, mixture parameters The Dirichlet distribution is chosen as the prior, and the uniform vector distribution is used. Choose a multivariate normal distribution, covariance matrix Choosing the Wishart distribution transforms the probability density function of the original GMM into a conditional probability, at which point the latent variables are... Z By writing the probability density function, we can derive the joint distribution of the Bayesian-GMM, expressed as: (13) The posterior distribution result is then obtained, expressed as: (14) In implementing the Bayesian-GMM model, the improved model parameters are derived by determining the values of the hyperparameters, thus reducing the number of Gaussian mixture components. K (equivalent to the specified number of clusters mentioned earlier) K The value is set to 10, which can capture the local features of the model without overfitting; the Dirichlet distribution prior is set to 1, which means that a uniform and unbiased prior is used for the Gaussian component weights at each stage; the maximum number of iterations of the EM algorithm is set to 300, which can ensure early convergence when the calculation is stable and prevent it from falling into an infinite loop.
[0021] Figure 5a andFigure 5b The graph shows the linear relationship between the actual and predicted shear strength parameters. The horizontal axis represents the true value and the vertical axis represents the predicted value. If the actual value is very close to the predicted value, the scatter points will fall precisely on the dashed line with a slope of 1. The closer the scatter points are to the dashed line, the closer the predicted value is to the true value, indicating that the Bayesian-GMM model has good prediction results on the test set. c of R 2 , MSE , RMSE , MAE and MAPE The percentages are 0.9371, 0.1238, 0.3519, 0.2328, and 6.71%, respectively. φ of R 2 , MSE , RMSE , MAE and MAPE The percentages are 0.8227, 0.4311, 0.6566, 0.3874, and 1.02%, respectively. Regarding the evaluation indicators, R 2 A value closer to 1 indicates better model performance. Therefore, for the Bayesian-GMM model, comparing the two shear strength parameters... c The predicted results are closer to the actual values.
[0022] Figure 6a and Figure 6b It is about cohesion c and internal friction angle φ Comparing the actual and predicted results, the overall trend of the predicted curve in the training interval is almost consistent with that of the real data, with a high degree of overlap in fluctuation patterns and peak / valley positions. While the fluctuation capability in the test interval is slightly lower than that in the training set, the overall trend remains consistent, with no significant differences. Therefore, the Bayesian-GMM model can explain the parameter distribution of effective soil characterization and make relatively reliable predictions of trends.
[0023] 2) Bayesian-Bi-LSTM model: The Bi-LSTM network used in this invention is based on the LSTM network, with two independent LSTM layers forming a bidirectional propagation structure. This allows information to be passed from front to back of the sequence. The forward LSTM processes the input data sequentially in chronological order, while the backward LSTM traverses the input data in reverse. By concatenating the hidden states of both layers in time, Bi-LSTM can simultaneously extract past and future information from the input sequence, enabling the modeling of global relationships, further improving the model's prediction accuracy, and reducing the risk of overfitting.
[0024] Let the input sequence be The forward LSTM calculates the hidden states sequentially in chronological order, and the expression is: (15) in, For the input vector, In hidden state, This is the hidden state from the previous moment. For memory units, The expression for calculating the internal information of a single neuron in an LSTM is as follows: Forgotten Gate: (16) in, For the Gate of Oblivion This indicates that the LSTM is at time step The forget gate vector, and Both are weight matrices. For bias terms, This is the sigmoid function, with a value range of (0,1). Input Gate: (17) in, This indicates that the LSTM is at time step The input gate vector, and For input gate and current input and the cell state at the previous time step The weight matrix between them For input gate bias terms; Output gate: (18) in, This indicates that the LSTM is at time step The output gate vector, and For input gate and current input and the cell state at the previous time step The weight matrix between them For input gate bias terms; Candidate memories: (19) in, This represents the candidate cell state vector generated by LSTM at each time step. and Input for the current cell and the current time. and the cell state at the previous time step The weight matrix between them For the input gate bias term, It is the hyperbolic tangent function; Cell status update: (20) in, The cell state vector representing the time step. Input gate vector, symbol " " indicates that matrices are multiplied element by element; Hidden state: (twenty one) The expression for the backward LSTM is derived using the same method, forming a complete bidirectional long short-term memory network (Bi-LSTM). However, to better quantify the uncertainty of the Bi-LSTM model's prediction results, Bayesian inference is introduced into the model. Additionally, the Monte Carlo Dropout method is used to preserve a random deactivation mechanism during the forward LSTM process, allowing each prediction to derive a set of weights from the parameter distribution, thus leading to the prediction result. The model parameters... W Treating it as a random variable, we derive its prior distribution. f ( W and posterior distribution ,in D Given the observed data, the conditional probability distribution is: Therefore, the expression for the Bayesian-Bi-LSTM model of Bi-LSTM under the Bayesian method is: (twenty two) Due to the posterior distribution The explanation is difficult to calculate, so the Monte Carlo Dropout method is introduced to obtain approximate sampling. By introducing parameter randomness into the training and prediction of Bi-LSTM, Dropout randomly loses some neurons during each forward propagation, causing changes in the effective parameters, thereby achieving approximate sampling in time. t The first place to proceed k The expression for the second sampling prediction is: (twenty three) in, Represents the stochastic nonlinear mapping of the model. Indicates the first k The parameter subset after the randomization. ; Finally, the prediction results under the Bayesian-Bi-LSTM model are obtained, which can be approximated as follows: (twenty four) in, It is the implicit parameter distribution induced by Dropout.
[0025] This invention employs an adaptive learning rate adjustment method to make the Bayesian-Bi-LSTM model converge more stably and efficiently, thereby improving the overall performance of the model. By determining the magnitude of hyperparameters, the shear strength parameters of the model are improved. The hidden layer dimension of the LSTM is set to 48, resulting in 96 dimensions after concatenation of the bidirectional LSTM. The time series window length is set to 12 time steps, the learning rate to 2e-4, the number of training epochs (EPOCHS) to 600, and the early stopping mechanism (PATIENCE) to 80, all to prevent overfitting and accelerate training.
[0026] Figure 7a , Figure 7b This reflects the linear relationship between actual shear strength and predicted shear strength under the Bayesian-Bi-LSTM model. c of R 2 , MSE , RMSE , MAE and MAPE They are 0.8262, 0.4962, 0.7044, 0.4945, and 1.21%, respectively. φ of R 2 , MSE , RMSE , MAE and MAPE The values are 0.9354, 0.6139, 0.7168, 0.5108, and 0.13%, respectively. Based on the evaluation indicators, it is clear that... c The predictions are closer to the actual values. Figure 8a , Figure 8b The results reflect the predicted cohesion and internal friction angle, respectively. The training set shows that the actual curves are almost identical to the predicted curves, indicating that the Bayesian-Bi-LSTM model fully learns the dynamic patterns of soil parameters. While some errors exist in the test set phase, and the results are affected by sequence noise, they still closely match the actual values and are generally reliable. Therefore, the Bayesian-Bi-LSTM model outperforms traditional computational models in predictive performance.
[0027] 3) Bayesian-Light-GBM model.
[0028] The Gradient Boosting Framework GBDT includes two widely used boosting tree models: XGBoost and Light-GBM. Although they belong to the same family, they differ significantly in feature processing methods, tree growth strategies, and engineering optimization designs. Light-GBM not only incorporates the advantages of XGBoost but also integrates some new features, further improving computational efficiency. Based on the Gradient Boosting Framework GBDT, Light-GBM iteratively builds decision trees to approximate the objective function for a given supervised training set. The overall improvement model can be represented as an additive form of a tree model, expressed as: (25) in, For the first t The output values of the first tree are used to learn the new tree. , No. t The objective function for round optimization is expressed as: (26) in, It is the first t The objective function value of the next iteration. For the structure regularization term of the model, Light-GBM performs a second Taylor expansion of the loss function for ease of calculation, and the expression is: (27) in, These are the first-order gradient and the second-order gradient, respectively. Given a tree structure, the first l The optimal output value of each leaf node is represented as: (28) Will Substituting into the objective function, we obtain the gain before and after the split. G The expression is: (29) in, , The sum of the gradients of the left node and the sum of the second-order gradients. , Let be the gradient of the right node and the sum of its second-order gradient; To balance nonlinear fitting capability and uncertainty quantification capability, the Bayesian method is introduced into the Light-GBM model as a priori expression of the predicted mean. By inferring its residual distribution, a Bayesian-Light-GBM model with uncertainty quantification capability is constructed to achieve more accurate prediction.
[0029] Given a supervised training set In this process, a deterministic prediction function is obtained. The output at the sample points is represented as Assuming the output of the observation point satisfies the Gaussian noise model, the expression is: (30) in The expression is equivalent to The residual is written as ; the noise variance Defined as inverse gamma a priori Combining the Gaussian likelihood, we obtain the posterior distribution form, which is expressed as: (31) in, ; For new input samples Its output The posterior distribution expression is: (32) in, degrees of freedom The Student-t distribution is as follows: .
[0030] In constructing the Bayesian-Light-GBM model, hyperparameters were optimized using a relatively small learning rate (Learning rate=0.01). During gradient descent, to gradually approach the optimal solution with a more stable stride, the number of weak learners was set to 8000, ensuring sufficient epochs to capture the nonlinear relationship between the input and target variables. In terms of the tree structure, the number of leaf nodes was set to leaves=300, and the maximum depth was set to depth=12, ensuring effective control of overfitting while making predictions. The minimum allowed sample size for leaf nodes was set to 20 to control the minimum sample size and prevent the model from generating overly complex split structures. Both the feature sampling rate and the sample sampling rate were set to 1.0 to improve the sensitivity of variables.
[0031] The Bayesian-Light-GBM model exhibits strong expressive power and good generalization performance during training, ensuring that the model can accurately predict shear strength-related parameters and achieve stable and reliable prediction results. c of R 2 , MSE , RMSE , MAE and MAPE They are 0.9858, 0.3835, 0.2914, 0.3666, and 1.86% respectively; φ of R 2 , MSE , RMSE ,MAE and MAPE The percentages are 0.9739, 0.4148, 0.3216, 0.2915, and 0.24%, respectively. It can be seen that the two... R 2 The model exhibits extremely strong fitting ability, indicating that the Bayesian-Light-GBM model can effectively capture the main changing characteristics of shear strength indices; and MSE and RMSE This demonstrates that the model exhibits strong stability and reliability in terms of error. Overall, the Bayesian-Light-GBM model demonstrates high accuracy and stability in predicting shear strength parameters, possesses good generalization ability, and can provide reliable support for the predicted parameters.
[0032] Figure 9a The samples are distributed along the line, which can accurately capture the nonlinear variation trend of cohesion within the corresponding range. Neither of them showed systematic deviation, indicating that the model can maintain high accuracy in prediction in different intervals. Figure 9b The values are mainly clustered between 35° and 40°, indicating that the model maintains high prediction accuracy in the main range. This demonstrates the model's high stability and nonlinear mapping capability in handling soil parameters. Therefore, Figure 9a and Figure 9b It can not only accurately depict the main laws of shear strength parameter variation, but also reflect the consistency between the training set and the test set, indicating that the Bayesian-Light-GBM model has good generalization ability. Figure 10a and Figure 10b The two line graphs verify the stability and reliability of the Bayes-Light-GBM model in predicting shear strength parameters, revealing the model's trend and peak-valley response capability in local changes. This shows that the model can not only predict the overall level, but also accurately characterize the detailed changes in parameters. The prediction results demonstrate that the Bayes-Light-GBM model can fully learn the relationship between input features and shear strength parameters.
[0033] 4) Bayesian-RF model.
[0034] Random Forest (RF) is an ensemble learning approach based on the Bagging framework. Its core principle is to construct several training subsets through multiple samplings with replacement, and then independently train the decision model on each subset. Let the training dataset be... Random Forest (RF) model, through... D conduct M Bootstrap sampling to generate M training subset Each sample in the subset The probability expression is: (33) That is, approximately 63.2% of the unique samples for each tree originate from the original training set; Train a decision tree model independently on each subset. , of which m The expression for node partitioning of a tree is: (34) in, A subset of features randomly selected from all features , This refers to the changes obtained from feature segmentation; The prediction formulas for the Random Forest (RF) model are divided into two parts: regression and classification. For the regression problem, the model averages the outputs of each tree, and the expression is: (35) The classification formula employs a majority voting strategy, expressed as follows: (36) In traditional random forest models, all decision tree predictions are typically ensembled using an equal-weighted average. However, in practical applications, different trees have varying fitting abilities and require different amounts of data, and an equal-weighted average can result in some high-performing trees not being fully utilized. Therefore, this invention introduces a Bayesian method to treat different decision trees in the random forest model as multiple candidate models, and assigns different weight coefficients to each decision tree based on the posterior distribution, thereby obtaining a more accurate and reasonable ensemble result. The training dataset mentioned above is processed using RF. M Bootstrap sampling was performed to obtain Then the first m The expression for the likelihood function of a tree is: (37) The first random forest m Decision Tree If we consider it as a candidate model, then the posterior distribution expression is: (38) in, It is the prior probability of the tree structure. For the model on the training dataset D The likelihood function is used; the final prediction is no longer an equal-weighted average, but a weighted average based on the posterior distribution, expressed as: (39) In constructing the Bayesian-RF model with weighted optimization, this invention does not directly rely on the default model. Instead, it specifically adjusts and optimizes the hyperparameters in three aspects: tree model size control, feature sampling method, and Bayesian posterior distribution. First, if a single tree structure is too deep, local feature overfitting is highly likely. Therefore, a relatively moderate upper limit (10-20 layers) is used for tree depth to ensure the model can express nonlinear structures without excessively following local outliers. In the node splitting strategy, the minimum number of samples for leaf nodes is set to 1-2, and a limit of 2-3 is imposed on the minimum number of split samples for internal nodes. This ensures that each tree maintains necessary constraints during growth, thus avoiding the generation of highly unstable splitting paths under small sample conditions. This splitting strategy, which includes mild regularization, ensures that the tree model maintains certain constraints on the number of samples during splitting, avoiding the generation of leaf node structures with insufficient data, and helps improve the stability and robustness of the tree model in small sample scenarios. To further enhance the diversity within the model, this invention compares various feature sampling methods, including selecting features according to the square root ratio. sqrt The model selects features based on logarithmic scale (log2) and does not limit the number of features. Based on the training error and generalization performance, it chooses the feature sampling strategy most suitable for the current data structure, ensuring sufficient randomness and diversity among different subtrees. Finally, regarding model size, the number of decision trees is limited to 200-400. Increasing the number of subtrees improves the overall model's stability and prediction accuracy, allowing for a more complete expression of the nonlinear mapping relationship between input variables and lithological parameters.
[0035] The Bayesian-RF model of this invention can simultaneously quantify model uncertainty and structural differences during training, thereby constructing an integrated prediction structure through posterior distribution. This not only enhances the model's stability in high-noise data but also significantly improves the predictive reliability of shear strength-related parameters. For cohesion... c Coefficient of determination R 2 With a value of 0.9534, it can explain more than 95% of the variance variation of the target variable; MSE and RMSE The values of 0.0917 and 0.3027 respectively indicate that the overall prediction error is small and the predicted value maintains a high degree of consistency with the actual value. MAE and MAPE The values are 0.2482% and 7.03% respectively, further demonstrating that the model has good accuracy and reliability in predicting shear strength parameters. For φ Its prediction accuracy also performs excellently. R 2 , MSE and RMSEThey are 0.9276, 0.1760, and 0.4196 respectively. MAPE With an error rate of only 0.87%, significantly lower than the relative error level of cohesion, this indicates that the Bayesian-RF model not only has high accuracy in predicting the internal friction angle but also exhibits superior relative stability of the error. Overall, the Bayesian-RF model performs well on both key geotechnical parameters, demonstrating high accuracy and strong relative stability in predicting internal friction angles. φ The predictions are more stable, for c The predictions showed a stronger fitting ability.
[0036] Figure 11a and Figure 11b As can be seen, the predicted values for both cohesion and internal friction angle exhibit a highly consistent linear relationship with the actual values, indicating that the Bayesian-RF model can utilize the multivariate coupling effect in geological parameters for prediction. The small difference in the distribution of data points between the training and test sets suggests that the model has consistent prediction accuracy and good generalization ability across different data subsets. Furthermore, the predicted points are closely distributed near the diagonal, indicating that the model has good error control across different samples and possesses high stability and generalization ability. Figure 12a and Figure 12b It is evident that the Bayesian-RF model effectively captures the overall trends of cohesion and internal friction angle when predicting them. Whether the trend is slow increase, rapid fluctuation, or local extrema, the predicted sequence remains consistent with the true sequence. Particularly within the training interval, the curves exhibit high overlap and minimal error distribution. In the test interval, despite increased parameter fluctuations, the Bayesian-RF model still tracks parameter trends promptly, with the predicted curve changing synchronously with the true curve, demonstrating strong trend-following ability and stability.
[0037] The improved model analysis is as follows: 1) Comparison of Model Results: Table 2 shows a comparison of the prediction results of the four improved models mentioned above, summarizing the prediction of shear strength parameters using the Bayesian method improvements GMM, Bi-LSTM, Light-GMB, and RF. c and φ ), and analyze and compare the statistical evaluation indicators of each model, and through Figure 13a and Figure 13bA comparison of the actual and predicted scatter plots of each model reveals that all four improved models exhibit a relatively clear linear and uniform distribution, indicating that each model has a certain fitting ability in predicting cohesion and internal friction angle. The Bayesian-GMM model shows some systematic bias in the low-value range; the Bayesian-Bi-LSTM model exhibits prediction underestimation in some ranges; the Bayesian-Light-GMB model shows a good overall trend, but still has slight dispersion in the high-value range; the Bayesian-RF model's predicted points are most concentrated near the diagonal, demonstrating strong linear consistency and stability. Overall, the Bayesian-RF model not only has the highest prediction accuracy but also responds most quickly to changes in actual values, more accurately capturing the nonlinear characteristics of shear strength parameters. Therefore, as shown in Table 2 and... Figure 13a and Figure 13b The Bayesian-RF model was selected as the improved model for the shear strength parameters in this invention.
[0038] Table 2. Comparison of Results of the Four Improved Models
[0039] 2) Parameter Sensitivity Analysis of the Bayesian-RF Model: To further evaluate the impact of different input parameter combinations on the model's predictive performance, different random forest (RF) models were constructed based on 15 sets of input parameter variables, as shown in Table 3. These combinations are derived from Pearson correlation coefficient plots. Figure 3 Five input variables can produce 31 combinations. Fifteen combinations are randomly selected to analyze the model. R 2 and RMSE The indicators are used to generate sensitivity parameter analysis charts for easy comparison. Figure 14a When using single variables in M1-M5, the Random Forest (RF) model struggles to capture the characteristics of rock mass viscosity and microstructure from single variables, leading to... R 2 Low RMSE The values are slightly higher; however, the performance of the bivariate index input model is significantly improved in M6-M11, including natural compressive strength. R The combination of [specific parameter] is generally superior to other combinations, indicating that this parameter is one of the key variables affecting cohesion; while in the multivariate combinations M12 to M15, the training set and test set curves tend to be consistent, and in M12 and M14, the natural density, porosity, and natural compressive strength are [specific parameters]. R The influence on cohesion is the greatest; in summary, it is difficult to describe the variation law of cohesion by relying on a single parameter, but when multiple parameters are input, the optimal predictive performance of the model can be captured, indicating that the formation of cohesion has the coupling characteristics of multiple factors. Figure 14bWhen using a single variable in models M1 to M5, M1 and M3 are relatively better than M4, but the ability of single-variable models to predict the internal friction angle is limited, and the model performance shows a clear low-value range; in M6 to M11, the bivariate combination is significantly better than the single variable, while the natural compressive strength... R The introduction of this factor can significantly enhance the model's ability to extract shear failure. Under the multivariate combination M12 to M15, the training set and test set curves almost overlap, indicating that the Bayesian-RF model has good generalization performance and stability. In summary, the internal friction angle is more sensitive to natural density, water absorption rate and natural compressive strength. The multivariate combination can comprehensively reflect the formation mechanism of the internal friction angle, thereby obtaining higher and more stable prediction performance.
[0040] Table 3. Combinations of input variables for the Bayesian-RF model
[0041] The improvement to the metaheuristic algorithm is explained below: 1) Optimization of the Bayesian-RF Model using Metaheuristic Algorithms: The comparison above shows that the Bayesian-RF model is the most accurate among the four models. Errors can arise due to factors such as large data fluctuations, model overfitting (or underfitting), high training set noise, and improper use of hyperparameters. Therefore, when using metaheuristic algorithms, the selection of hyperparameters is crucial. The six metaheuristic algorithms used are the Kingfisher Optimization Algorithm (PKO), the Beluga Whale Optimization Algorithm (BWO), the Sand Cat Swarm Optimization Algorithm (SCSO), the Slime Mold Optimization Algorithm (SMA), the Starfish Optimization Algorithm (SFOA), and the Bat Algorithm (BA). These six algorithms are used to optimize the hyperparameters of the Bayesian-RF model, making the hybrid prediction results more accurate. The specific implementation process of the hybrid improved model is as follows... Figure 15 As shown.
[0042] 2) Comparison of six RF hybrid models corresponding to Examples 1 to 6 respectively: Examples 1 to 6 are respectively based on Figure 15 In the implementation process, the Bayesian-RF model was constructed into six RF hybrid models using different methods, namely PKO-RF, BWO-RF, SCSO-RF, SMA-RF, SFOA-RF, and BA-RF. All embodiments used the MAE-MSE hybrid index as the optimization objective of the hybrid model. This fitness function simultaneously considers the robustness of MAE and the squared sensitivity of MSE, enabling the optimization process to capture global trends while suppressing large local biases. The hybrid index is defined as follows: (40) θ This represents the hyperparameters of the random forest to be optimized. α is the weighting coefficient, with a value range of [0,1], and a preferred value of 0.7.
[0043] To ensure that the metaheuristic algorithm has sufficient search space and to improve the computational efficiency of the data, the key hyperparameters of the above six RF hybrid models are defined as follows: the search range of the number of trees is 100 to 500, the depth of a single tree is set to 5 to 12, the minimum number of samples for a leaf node is set to 2 to 10, and the number of feature selections for a node is set to {1, 2, 3, 4, 5}. This is to retain the possibilities of five input variables.
[0044] Figure 16a The iterative process of six hybrid RF models composed of metaheuristic algorithms and Bayesian-RF models in hyperparameter optimization is shown. Overall, all models can converge quickly and obtain the optimal solution. (1) For cohesion, all six curves show a significant decrease in the early stage of iteration, indicating that the six hybrid RF models can quickly identify the superior and inferior solutions in the global search stage and achieve effective search advancement. The SMA-RF and BA-RF curves have the largest decrease and enter the stable range quickly. The SCSO-RF and SFOA-RF curves are stable first and then decrease slowly, indicating that the search mode is locally refined. Although the decrease of PKO-RF and BWO-RF is limited, they still show a monotonically decreasing trend. Overall, SMA-RF is better than other algorithms in terms of cohesion parameters. (2) From Figure 16b The fitness of the internal friction angle is generally higher than that of cohesion, indicating a greater difficulty in prediction. However, the curves still show a monotonically decreasing trend, suggesting that the prediction is still effective. BA-RF performs better in optimizing the internal friction angle, with the fastest decrease in fitness value and the lowest convergence value, indicating that it is more adaptable to the parameter space. PKO-RF, BWO-RF, and SCSO-RF show limited decreases throughout the search process, and their performance is relatively similar. In comparison, SMA-RF and SFOA-RF, although capable of continuous optimization, have slower convergence speeds, and their fitness is slightly higher than that of BA-RF. In summary, the two convergence curves fully reflect the differences in hyperparameter optimization capabilities of different metaheuristic algorithms. SMA-RF is more suitable for cohesion parameters, while BA-RF has the best performance in internal friction angle. Although the convergence behavior of the other algorithms has its own characteristics, none of them are superior to these two hybrid model algorithms. Considering the iterative process of the two prediction parameters, the SMA-RF hybrid algorithm is initially selected as the optimal RF hybrid model.
[0045] Table 4 shows the performance comparison of the RF hybrid models obtained in the six embodiments. Each algorithm improved the prediction performance of the RF hybrid model to varying degrees, but there were significant differences in the overall accuracy. (1) In terms of cohesion, except for PKO-RF, the other five algorithms... R 2All values exceeded 0.94, indicating that the metaheuristic algorithm can effectively uncover the complex nonlinear relationship between drilling parameters and cohesion. Among them, SMA-RF... R 2 The best performance was achieved at 0.9752; while PKO-RF's... R 2 With a score of only 0.8998, this indicates that the algorithm has limitations in hyperparameter search for the current dataset; looking at the other four metrics, SMA-RF performs well... MSE , RMSE , MAE and MAPE All four indicators reached their minimum values, among which MAPE With an error of only 2.09%, the deviation between the predicted and measured values is minimal; the overall error of SCSO-RF is also low. RMSE It is 0.3059. MAPE The accuracy was 4.32%, which is better than BWO-RF and SFOA-RF. BA-RF has a certain optimization ability, but its overall accuracy is slightly lower than SMA-RF and SCSO-RF. (2) When predicting the internal friction angle, the overall prediction accuracy of the six RF hybrid models is generally higher than that of cohesion, but there are still differences between different optimization algorithms. Among them, from R 2 As you can see, all models exceed 0.81, indicating that the prediction performance is further improved after metaheuristic optimization. Among them, SMA-RF and BA-RF perform the best, with BA-RF showing the highest performance. R 2 It reached 0.97931, the highest among all models. Looking at other metrics, SMA-RF once again... MSE , MAE , MAPE Achieving optimal values in terms of indicators, especially RMSE Only 0.3661, MAE With a value of only 0.2696, the prediction results are stable and have minimal bias. SFOA-RF and BWO-RF exhibit moderate overall performance, while PKO-RF and SCSO-RF perform relatively weakly. In summary, all six metaheuristic algorithms can improve the prediction performance of random forests to varying degrees, with SMA-RF demonstrating the best performance and thus being identified as the optimal model recommended in this invention.
[0046] Table 4. Performance comparison of the respective RF hybrid models in Examples 1-6
[0047] Conclusion: The optimized six-class RF mixture model exhibits response curves that more closely resemble the true trends across the vast majority of variables, with significantly narrowed confidence intervals. This indicates that the optimization process effectively improves the model's robustness to input disturbances and the stability of its fit. More importantly, the optimized response curves not only improve the average level of the model's predictions but also enhance its ability to identify key variables. For example, in the relationship between natural compressive strength and shear strength, the optimized trend line is significantly stronger than the unoptimized model and closer to theoretical expectations. The model's uncertainty range is also significantly compressed, demonstrating that the metaheuristic algorithm plays a crucial role in adjusting the model's parameter structure and improving prediction stability. Overall, the optimized RF mixture model performs better across all input variable intervals, further illustrating that the metaheuristic algorithm can significantly enhance the model's physical consistency and interpretability.
Claims
1. A method for predicting rock shear strength based on Bayesian method-metaheuristic optimization, characterized in that, Follow these steps: Step 1: Preprocess the raw data; Step 2: Perform Bayesian optimization on the four models to output four improved models, and select the optimal improved model from them; Step 3: Adjust the hyperparameters of the optimal improved model using six metaheuristic algorithms; Step 4: Use the output model from Step 3 to predict the training and test sets, calculate the evaluation index, and select the SMA-RF model with the best overall performance from the six RF hybrid models. Step 5: Use the SMA-RF model determined in Step 4 to predict the cohesion of all test samples. c With internal friction angle φ The predicted value.
2. The method for predicting rock shear strength based on Bayesian method-metaheuristic optimization according to claim 1, characterized in that, In step 1, the specific process is as follows: Preprocessing includes normalization, noise removal, and missing data completion; The preprocessed dataset was divided into a training set and a test set, with the training set accounting for 80% of the data and the test set accounting for 20%. Silty mudstone, sandpaper mudstone, siltstone, muddy siltstone, medium-grained sandstone, and fine-grained sandstone were selected as reference benchmarks. Natural density, water content, water absorption, porosity, and natural compressive strength were used as input parameters to predict the shear strength of the rocks.
3. The method for predicting rock shear strength based on Bayesian method-metaheuristic optimization according to claim 1, characterized in that, Step 2, the specific process is as follows: The four models are Gaussian Mixture Model (GMM), Bi-Short Memory Network (Bi-LSTM), Lightweight Gradient Boosting Machine (Light-GBM), and Random Forest (RF). Before using these four models, Bayesian methods are used to optimize them, including denoising, stabilization and normalization, dimensionality reduction, completion, and smoothing, to help improve the accuracy of each model. After comparison, the optimal improved model is selected.
4. The method for predicting rock shear strength based on Bayesian method-metaheuristic optimization according to claim 3, characterized in that, The Gaussian Mixture Model (GMM) is improved to obtain the Bayesian-GMM model. The specific process is as follows: Gaussian Mixture Model (GMM) is composed of a K It is a linear combination of Gaussian distributions, let... That is: (6) In the formula, Let be the probability density function. K This represents the dimension of the Gaussian distribution. X for K A set of vectors in 3D space. is the mixture parameter of the Gaussian distribution, with a value range of [0,1]. For the first K A uniform vector with a Gaussian distribution. For the first K The covariance matrix of the Gaussian distribution. It is the first K The probability density function of the Gaussian distribution is expressed as: (7) In the formula, d It is a set of vectors X Dimensions It is the determinant of the covariance matrix. It is the inverse of the covariance matrix; Assume the posterior distribution of the nonlinear parameter is as follows The EM algorithm is used to calculate the uniform vector, covariance matrix, and mixing parameter π for each Gaussian distribution, thereby deriving the highest probability density and the specified number of clusters. K However, latent variables exist in GMM. Z Formula (8) represents the first k Samples under a Gaussian distribution x n If maximum likelihood estimation cannot be used for sampling, the EM algorithm needs to be used iteratively to solve for the probability, and the expression is: (8) The EM algorithm maximizes the parameters. θ The set of model parameters to be estimated is expressed as: (9) (10) The log-likelihood is introduced into the EM algorithm, and its expression is: (11) in, , indicating the first k One sample; The probability density function expression for GMM under the EM algorithm is: (12) Introducing a Bayesian method for simplification, the GMM... Set as prior distribution, mixture parameters The Dirichlet distribution is chosen as the prior, and the uniform vector distribution is used. Choose a multivariate normal distribution, covariance matrix Choosing the Wishart distribution transforms the probability density function of the original GMM into a conditional probability, at which point the latent variables are... Z By writing the probability density function, we can derive the joint distribution of the Bayesian-GMM, expressed as: (13) The posterior distribution result is then obtained, expressed as: 。 5. The method for predicting rock shear strength based on Bayesian method-metaheuristic optimization according to claim 3, characterized in that, The bidirectional long short-term memory network Bi-LSTM is improved to obtain the Bayesian-Bi-LSTM model. The specific process is as follows: Let the input sequence be The forward LSTM calculates the hidden states sequentially in chronological order, and the expression is: (15) in, For the input vector, In hidden state, This is the hidden state from the previous moment. For memory units, The expression for calculating the internal information of a single neuron in an LSTM is as follows: Forgotten Gate: (16) in, For the Gate of Oblivion This indicates that the LSTM is at time step The forget gate vector, and Both are weight matrices. For bias terms, This is the sigmoid function, with a value range of (0,1). Input Gate: (17) in, This indicates that the LSTM is at time step The input gate vector, and For input gate and current input and the cell state at the previous time step The weight matrix between them For input gate bias terms; Output gate: (18) in, This indicates that the LSTM is at time step The output gate vector, and For input gate and current input and the cell state at the previous time step The weight matrix between them For input gate bias terms; Candidate memories: (19) in, This represents the candidate cell state vector generated by LSTM at each time step. and Input for the current cell and the current time. and the cell state at the previous time step The weight matrix between them For the input gate bias term, It is the hyperbolic tangent function; Cell status update: (20) in, The cell state vector representing the time step. Input gate vector, symbol " " indicates that matrices are multiplied element by element; Hidden state: (twenty one) The expression for the backward LSTM is also derived using the same method. While incorporating Bayesian inference, the Monte Carlo Dropout method is also used to adjust the model parameters. W Treating it as a random variable, we derive its prior distribution. f ( W and posterior distribution ,in D Given the observed data, the conditional probability distribution is: Therefore, the expression for the new Bayesian-Bi-LSTM model is: (22) Monte Carlo Dropout is introduced to obtain approximate sampling. By introducing parameter randomness into the training and prediction of Bi-LSTM, Dropout randomly loses some neurons during each forward propagation, causing changes in the effective parameters over time. t The first place to proceed k The expression for the subsampled prediction is: (23) in, Represents the stochastic nonlinear mapping of the model. Indicates the first k The parameter subset after the randomization. ; The prediction results obtained under the Bayesian-Bi-LSTM model can be approximated as follows: (24) in, It is the implicit parameter distribution induced by Dropout.
6. The method for predicting rock shear strength based on Bayesian method-metaheuristic optimization according to claim 3, characterized in that, The lightweight gradient booster (Light-GBM) model is improved to obtain the Bayesian-Light-GBM model. The specific process is as follows: Given a supervised training set In this process, a deterministic prediction function is obtained. The output at the sample points is represented as Assuming the output of the observation point satisfies the Gaussian noise model, the expression is: (30) in The expression is equivalent to The residual is written as ; the noise variance Defined as inverse gamma a priori Combining the Gaussian likelihood, we obtain the posterior distribution form, which is expressed as: (31) in, ; For new input samples Its output The posterior distribution expression is: (32) in, degrees of freedom The Student-t distribution is .
7. The method for predicting rock shear strength based on Bayesian method-metaheuristic optimization according to claim 3, characterized in that, The random forest (RF) model is improved to obtain the Bayesian RF model. The specific process is as follows: Let the training dataset be... Random Forest (RF) model, through... D conduct M Bootstrap sampling to generate M training subset Each sample in the subset The probability expression is: (33) That is, approximately 63.2% of the unique samples for each tree originate from the original training set; Train a decision tree model independently on each subset. , of which m The node partitioning expression for a tree is: (34) in, A subset of features randomly selected from all features , This refers to the changes obtained from feature segmentation; The prediction formulas for the Random Forest (RF) model are divided into two parts: regression and classification. For the regression problem, the model averages the outputs of each tree, and the expression is: (35) The classification formula employs a majority voting strategy, expressed as follows: (36) In the training dataset mentioned above, RF was used. M Bootstrap sampling was performed to obtain Then the first m The expression for the likelihood function of a tree is: (37) The first random forest m Decision Tree If we consider it as a candidate model, then the posterior distribution expression is: (38) in, It is the prior probability of the tree structure. For the model on the training dataset D The likelihood function is used; the final prediction is no longer an equal-weighted average, but a weighted average based on the posterior distribution, expressed as: .
8. The method for predicting rock shear strength based on Bayesian method-metaheuristic optimization according to claim 1, characterized in that, Step 3, the specific process is as follows: Using the Bayesian-RF algorithm with the best performance in step 2 as the base model and its posterior prediction error as the fitness function, six metaheuristic algorithms were used to perform global hyperparameter search. The six metaheuristic algorithms are Kingfisher Optimization Algorithm (PKO), Beluga Whale Optimization Algorithm (BWO), Sand Cat Group Optimization Algorithm (SCSO), Slime Mold Optimization Algorithm (SMA), Starfish Optimization Algorithm (SFOA), and Bat Algorithm (BA). The hyperparameters of the optimal improved model were adjusted to improve the shear strength of the model. Six RF hybrid models are output, namely PKO-RF, BWO-RF, SCSO-RF, SMA-RF, SFOA-RF, and BA-RF.
9. The method for predicting rock shear strength based on Bayesian method-metaheuristic optimization according to claim 1, characterized in that, In step 4, the evaluation indicators include the coefficient of determination. R 2 Mean square error MSE Root mean square error RMSE Mean absolute error MAE Mean absolute percentage error MAPE ,in, R 2 A larger numerical value indicates a stronger explanatory power of the model. MSE , RMSE and MAE The smaller the value, the better the model.