An interpretable machine learning method for predicting rock shear strength parameters
By combining random forest and golden jackal optimization algorithms, the prediction of rock shear strength parameters is optimized, solving the problems of high cost and high time consumption in existing technologies, and realizing efficient and accurate rock performance detection.
Patent Information
- Application Number
- CN202411994672.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing technologies for testing rock shear strength parameters are costly and time-consuming, making it difficult to meet the needs of rock-related research and testing.
A machine learning approach combining random forest and golden jackal optimization algorithms is adopted to improve prediction accuracy by predicting cohesion and friction angle, optimizing the number of decision trees and features.
This reduces the cost and time required for testing rock shear strength parameters, improves the accuracy of predictions, and meets the needs for obtaining rock properties.
Smart Images

Figure CN119808579B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of mechanical property testing, in particular to an interpretable machine learning method for predicting rock shear strength parameters. BACKGROUND
[0002] Machine learning models are powerful tools in the field of artificial intelligence. They analyze and learn from large data sets to discover hidden patterns, trends, and correlations, enabling accurate predictions and decisions. These models are not just simple algorithmic expressions, but complex mathematical and statistical models that can simulate and extend human cognitive abilities. In recent years, machine learning models have gained widespread recognition in computer vision, financial risk assessment, natural language processing, medical diagnosis, and other fields, greatly promoting the development of these fields. Similarly, machine learning models have been widely applied in geotechnical and geological engineering, such as predicting rock compressive strength, rock fragmentation, mortar compressive strength, rock deformation, slope stability, rock mass classification, and tunnel boring machine performance. Cohesion and friction angle are widely used parameters to describe rock material shear strength, where cohesion is related to the bonding between rock crystals or particles, and friction angle is related to the internal friction of the rock shear plane. Cohesion and friction angle play a crucial role in the design and construction of rock slopes, tunnels, and foundations. Therefore, obtaining these shear strength parameters is of great significance for rock and rock mass evaluation.
[0003] In the prior art, the detection of rock shear strength parameters, cohesion and friction angle, is mostly obtained through rock tests. The commonly used prior art solution is rock triaxial test. The triaxial test with detection instruments has the defect of strict test conditions, requiring expensive equipment and taking a long time, making it difficult to meet the current research and detection on rock-related aspects. SUMMARY
[0004] The present application aims to solve the problem of high cost and long time in detecting rock shear strength in the prior art, and proposes a machine learning method for predicting rock shear strength parameters.
[0005] In one aspect, the present application proposes an interpretable machine learning method for predicting rock shear strength parameters, characterized by the following steps:
[0006] S1, preliminary prediction of cohesion and friction angle in rock shear strength parameters by random forest algorithm;
[0007] S2, setting the size of the search boundary of the golden cat optimization algorithm, and iteratively optimizing the parameters that need to be optimized in the random forest algorithm, i.e., the number of decision trees and the number of randomly selected features when building each decision tree.
[0008] S3, bringing the number of the optimized decision trees and the number of randomly sampled features when constructing each decision tree into the random forest algorithm, and predicting the cohesion and the friction angle again,
[0009] to obtain the final prediction result.
[0010] Preferably, the specific steps of the random forest algorithm in step S1 are as follows:
[0011] S11, taking the cohesion and the friction angle in the rock sample as a data set to form a training set required by the random forest algorithm;
[0012] S12, resampling the training set of rock parameters by using the Bootstrap method, and randomly generating a plurality of training subsets and regression trees according to the sampling result;
[0013] S13, randomly sampling input parameters as a split subset of the current node when each node of the regression tree is split and grown;
[0014] S14, the regression tree is recursively branched and grown from top to bottom, and stops growing after meeting the segmentation termination condition of the preliminary rock shear strength parameter prediction, and the completed regression tree is collected to constitute a random forest, to obtain a prediction set and to obtain the final result by averaging.
[0015] Preferably, the setting of the search boundary size in step S2 is determined by the number of rock sample groups, and the upper limit of the search boundary is specifically the number of sample groups, and the lower limit of the search boundary is the smallest positive integer.
[0016] Further preferably, the number of randomly sampled features when constructing each decision tree in step S2 is determined by the number of input variables, and the specific input variables include P wave, uniaxial compressive strength, tensile strength and rock density.
[0017] Preferably, the number of decision trees in the random forest algorithm and the number of randomly sampled features when constructing each decision tree are taken as the initial population of the golden eagle optimization algorithm for parameter optimization.
[0018] Preferably, the specific steps of the golden eagle optimization algorithm in step S2 are as follows:
[0019] S21, defining a target function f(X), setting a population size N, a maximum iteration number Max i ter, leadership rate α, exploration rate β and randomly generating the initial population X1, X2, …, X N ;
[0020] S22, calculate the fitness f(X of each solution in the initial population i );
[0021] S23, evaluate each solution X in the initial population i , if randn() < a, perform leadership behavior, otherwise perform exploration behavior, process the search boundary, ensure that the new solution is within the search space;
[0022] S24, evaluate the new solution, calculate and update the calculation result, if is better than f(X i ),
[0023] then replace X i with .
[0024] Further preferably, the leadership behavior and the exploration behavior in step S23 are as follows:
[0025] Leadership behavior:
[0026] wherein: X i is a solution in the initial population, X j is another solution in the initial population different from X i , and a is the leadership rate, a is in the range of 0 to 1;
[0027] Exploration behavior:
[0028] wherein: X i new is a new solution, and b is the exploration rate, randn() is a random number from a standard normal distribution.
[0029] Compared with the prior art, the present application has the following beneficial effects:
[0030] The present application provides an interpretable machine learning method for predicting rock shear strength parameters, which realizes the prediction of rock shear strength parameters by establishing a random forest algorithm optimized by the Jinchai algorithm. Compared with the prior art, the present application selects the optimal prediction effect based on the three algorithm models, and then performs parameter optimization on the model parameters by means of the Jinchai algorithm, thereby improving the accuracy of rock shear strength prediction and solving the problems of instrument detection technology, high cost, long time consumption and inability to meet the demand of some projects for obtaining rock performance in the prior art. The detailed beneficial effects can be seen from the experimental results in the embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1is a flow chart of an interpretable machine learning method for predicting rock shear strength in embodiments of the present application.
[0032] Figure 2 is a model algorithm diagram of a random forest algorithm in embodiments of the present application.
[0033] Figure 3 is a flow chart of a golden jackal optimization algorithm in embodiments of the present application.
[0034] Figure 4 is a random forest model prediction value and actual value comparison result diagram in embodiments of the present application.
[0035] Figure 5 is a result diagram of the final prediction set in embodiments of the present application. DETAILED DESCRIPTION
[0036] The present application will be further described in conjunction with test examples and specific embodiments. However, this should not be understood as limiting the scope of the above-mentioned subject matter of the present application to the following examples, and any technology implemented based on the content of the present application falls within the scope of the present application.
[0037] Example 1
[0038] The present application aims to overcome the high cost and high time consumption problems of instrument detection in detecting rock shear strength, and provides an interpretable machine learning method for predicting rock shear strength parameters.
[0039] The present application is mainly based on a random forest algorithm, and adopts a golden jackal optimization algorithm to obtain a random forest algorithm with higher accuracy prediction, and uses the random forest algorithm to predict rock shear strength parameters.
[0040] The present application specifically provides an interpretable machine learning method for predicting rock shear strength parameters, and a flow chart is shown in Figure 1 characterized in that it comprises the following steps:
[0041] S1, the cohesion and friction angle in the rock shear strength parameters are preliminarily predicted by the random forest algorithm, and a preliminary prediction result is obtained;
[0042] S2, the search boundary of the golden jackal optimization algorithm is set, and the number of decision trees in the random forest algorithm and the number of features randomly sampled and selected when each decision tree is constructed are iteratively optimized;
[0043] S3, according to the number of decision trees in the optimized random forest algorithm and the number of features randomly sampled and selected when each decision tree is constructed, the cohesion and the friction angle are predicted by using the optimized random forest algorithm, and a final prediction result is obtained.
[0044] The step S1 mainly uses a random forest algorithm (RF) to perform a preliminary prediction on the sample data set, and obtains parameters to be optimized according to the prediction result. A flowchart of the random forest algorithm is as shown in Figure 2
[0045] The step S1 specifically includes the following steps. First, the cohesion and the friction angle of the 199 rock sample groups collected are taken as a data set to form a training set required by the random forest algorithm. Second, a Bootstrap method is used to resample the training set of the rock parameters, and a plurality of training subsets and regression trees are randomly generated according to the sampling result. When each node of the regression tree is split and grown, an input parameter is randomly extracted as a split subset of the current node. The regression tree is recursively branched and grown from top to bottom, and stops growing after meeting a segmentation termination condition of preliminary rock shear strength parameter prediction. The completed regression tree is collected to form a random forest, a prediction set is obtained, an average value is calculated to obtain a preliminary prediction result, and parameters to be optimized in the rock shear strength parameter prediction are obtained according to the preliminary prediction result.
[0046] The setting of the search boundary size in the step S2 is specifically determined by the number of the rock sample groups. The upper limit of the boundary is specifically the number of the sample groups, and the lower limit is a minimum positive integer. In this embodiment, the number of the sample groups is specifically 199 groups, and the number of the sample groups is taken as the upper limit value of the search boundary.
[0047] The number of features randomly sampled and selected when constructing each decision tree in the step S2 is determined by the number of input variables, and the input variables are specifically P wave, uniaxial compressive strength, tensile strength and rock density. Therefore, the number of features randomly sampled and selected when constructing each decision tree is set to 1-4.
[0048] The golden jackal optimization algorithm (GJO) used in this embodiment is a meta-heuristic algorithm based on population. A flowchart of the golden jackal algorithm is specifically as shown in Figure 3 The core principle of the algorithm is mainly based on two main behavior patterns of the golden jackal: (1) leadership behavior: simulating the behavior of leaders in the group guiding the behavior of other members; (2) exploration behavior: simulating the behavior of individuals independently exploring new areas;
[0049] Leadership behavior:
[0050] In the formula, X i is a solution in the initial population, X j is another solution different from X i in the initial population, and a is a leadership rate, and the value range of a is 0 to 1.
[0051] Exploration behavior:
[0052] where: is the new solution, β is the exploration rate, and randn() is a random number from a standard normal distribution.
[0053] The number of decision trees in the random forest algorithm and the number of features randomly sampled when building each decision tree are used as the initial population of the golden jackal optimization algorithm for parameter optimization.
[0054] The specific steps of the golden jackal optimization algorithm in step S2 are as follows:
[0055] S21, define the objective function f(X), set the population size N, and the maximum number of iterations Max i ter, leadership rate α, exploration rate β, and randomly generate the initial population X1, X2, …, X N ;
[0056] S22, calculate the fitness f(X i ) of each solution in the initial population;
[0057] S23, for each solution X i in the initial population, if randn()<α, perform leadership behavior, otherwise perform exploration behavior, process the search boundary to ensure that the new solution is within the search space;
[0058] S24, evaluate the new solution, calculate and update the calculation results, if is better than f(X i ),
[0059] then replace X with i .
[0060] The step S3 needs to update the parameters optimized in S2 to a new random forest algorithm to obtain a golden jackal optimization-random forest (GJO-RF) and use the optimized random forest algorithm to further expand the prediction of rock shear strength parameters;
[0061] The step S3 is specifically, taking the cohesion and the friction angle of the 199 rock samples collected as a data set, forming a training set required by the random forest algorithm, the number of decision trees in the random forest algorithm is determined by the step S2 of the golden jackal algorithm, specifically 199; Bootstrap method is used to resample the training set of rock parameters, a plurality of training subsets and regression trees are randomly generated according to the sampling result, the number of features randomly selected when constructing each decision tree is optimized by the golden jackal algorithm, and is set to 1-4; when each node of the regression tree is split and grown, the input parameters are randomly selected as the split subset of the current node; the regression tree is recursively branched and grown from top to bottom, and stops growing after meeting the segmentation termination condition of the preliminary rock shear strength parameter prediction, the regression trees after completion of growth are collected to form a random forest, a prediction set is obtained, and the average value is obtained to obtain the final prediction result, the comparison image of the prediction result and the actual result of the cohesion and the friction angle is as shown in Figure 4 The prediction set result of the optimized random forest algorithm for predicting the cohesion and the friction angle is as shown in Figure 5
Claims
1. An interpretable machine learning method for predicting rock shear strength parameters, characterized in that, The method comprises the following steps: S1, preliminarily predicting cohesion and friction angle in rock shear strength parameters by a random forest algorithm; S11, taking the cohesion and the friction angle in the rock sample as a data set to form a training set required by the random forest algorithm; S12, resampling the training set of the rock parameters by a Bootstrap method, and randomly generating a plurality of training subsets and regression trees according to the sampling result; S13, randomly sampling input parameters as a splitting subset of a current node when each node of the regression tree is split and grown; S14, the regression tree is recursively branched and grown from top to bottom, and stops growing after meeting a splitting termination condition of preliminary rock shear strength parameter prediction, and the completed growth regression tree is collected to form a random forest, a prediction set is obtained, and an average value is obtained to obtain a final result; S2, setting the size of the search boundary of the golden cat optimization algorithm, and iteratively optimizing the parameters that need to be optimized in the random forest algorithm, i.e. the number of decision trees and the number of features randomly sampled when constructing each decision tree; The specific steps of the golden cat optimization algorithm are as follows: S21, define the objective function , set the population size N, the maximum number of iterations , leadership , exploration rate and randomly generate the initial population ; S22, calculating the fitness of each solution in the initial population ; S23. for each solution in the initial population if perform a leader behavior, otherwise perform an explorer behavior, process the search boundary, ensuring that the new solution is within the search space; S24, evaluate the new solution, compute and update the result of the computation if is better than then replace with ; The leadership behavior and the exploration behavior are as follows: Leadership behavior: wherein: is a solution in the initial population, is another solution in the initial population different from , is a leadership, the value of the range is from 0 to 1; Exploratory behavior: where: is the new solution, is the exploration rate, is a random number from a standard normal distribution; S3, taking the optimized number of decision trees and the number of features randomly sampled when constructing each decision tree into the random forest algorithm, and predicting the cohesion and the friction angle again to obtain the final prediction result.
2. The explainable machine learning method for predicting rock shear strength parameters according to claim 1, wherein, The size of the search boundary in step S2 is determined by the number of rock sample groups, the upper limit of the search boundary is the number of sample groups, and the lower limit of the search boundary is the smallest positive integer.
3. The explainable machine learning method for predicting rock shear strength parameters according to claim 1, wherein, The number of features randomly sampled when constructing each decision tree in step S2 is determined by the number of input variables, and the specific input variables include P wave, uniaxial compressive strength, tensile strength, and rock density.
4. The explainable machine learning method for predicting rock shear strength parameters according to claim 1, wherein, The number of decision trees in the random forest algorithm and the number of features randomly sampled when constructing each decision tree are used as initial populations of the golden cat optimization algorithm for parameter optimization.
5. An interpretable machine learning method for predicting rock shear strength parameters, characterized in that, The method comprises at least one processor, and a memory connected in communication with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the interpretable machine learning method for predicting rock shear strength parameters according to any one of claims 1 to 4.
Citation Information
Patent Citations
Turnout fault diagnosis method based on random forest
CN111046931A
Determination method and system of fault diagnosis model, program product and storage medium
CN115952456A