A method for predicting the pre-consolidation pressure of rock and soil by combining an XGBoost algorithm with e-lgP curve characteristics

By combining the XGBoost algorithm with e-lgP curve characteristics, the problems of large errors, high complexity, and unclear physical meaning in the prediction of preconsolidation pressure of soil and rock were solved, and fast and accurate prediction of preconsolidation pressure of soil and rock was achieved.

CN122133498APending Publication Date: 2026-06-02NINGXIA UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGXIA UNIVERSITY
Filing Date
2026-03-04
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing methods for predicting the early consolidation pressure of soil and rock masses suffer from problems such as large human error, time and labor costs, high mathematical model complexity and difficulty in solving, and unclear physical meaning of input parameters in machine learning models.

Method used

By employing the XGBoost algorithm combined with e-lgP curve features, and collecting preconsolidation pressure data of soil and rock materials, the XGBoost model is constructed using the LOF algorithm for data preprocessing. Furthermore, the hyperparameters are optimized using Bayesian optimization and K-fold cross-validation to achieve the prediction of preconsolidation pressure of soil and rock.

Benefits of technology

It enables rapid, accurate, and low-complexity prediction of preconsolidation pressure in soil and rock, with clear physical meaning, reducing computational complexity and improving prediction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122133498A_ABST
    Figure CN122133498A_ABST
Patent Text Reader

Abstract

The application discloses a kind of XGBoost algorithm combination e-lgP curve feature's rock-soil early consolidation pressure prediction method, it is related to rock-soil engineering prediction field, this method includes: collecting rock-soil material early consolidation pressure data, and the feature load in early consolidation pressure data and its corresponding pore ratio constitute two-dimensional data point set;Using LOF algorithm, two-dimensional data point set is preprocessed, and the data after pre-processing is proportionally divided into training set and test set;Construct machine learning model XGBoost model based on Boosting;XGBoost model is trained using training set and test set;Using the XGBoost model after training, predict the early consolidation pressure in rock-soil mass compression test data.The application combines machine learning algorithm and early consolidation pressure prediction, with the powerful data processing capacity and nonlinear mapping capacity of machine learning algorithm, quickly and efficiently predict the early consolidation pressure of rock-soil, reduce the complexity of calculation, save material and manpower, and the prediction result has more explicit physical meaning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geotechnical engineering prediction, and in particular to a method for predicting the early consolidation pressure of geotechnical engineering by combining the XGBoost algorithm with the characteristics of the e-lgP curve. Background Technology

[0002] Currently, the Casagrande method is commonly used to obtain the preconsolidation pressure of soil and rock masses. This method is a plotting approach that uses a semi-logarithmic coordinate system to plot the void ratio (e) and the applied vertical pressure (P) of the soil in an e-lgP curve. The point of maximum curvature on the curve is found, and a horizontal line and a tangent are drawn through this point. The angle bisector of the angle formed by these two lines is then drawn, and the x-coordinate corresponding to the intersection of this angle with the extended segment of the curve is the commonly used logarithmic value of the preconsolidation pressure. Based on the Casagrande method, other methods have been proposed, such as the ln(1+e)-lgP bilinear method, the lg(1+e)-lgP double logarithmic coordinate method, and Boone's compressibility index method. However, these plotting methods rely on manual drawing, which can lead to significant human error in practical applications, resulting in inaccurate results and being time-consuming and labor-intensive.

[0003] To address this issue, some scholars, building upon Casagrande's method, proposed using a mathematical model to fit the e-lgP curve, differentiating the mathematical model to find the point of maximum curvature, and then solving for the preconsolidation pressure through simultaneous equations. For unsaturated soils, a void ratio and pressure model for soil under isotropic conditions was established, combined with the Logistic function to enter the Ali model, to solve for the preconsolidation pressure. For normally consolidated and overconsolidated soils, a unified compression curve expression was established, and a formula for calculating the preconsolidation pressure was developed. A nonlinear mathematical formula was derived based on the compression coefficient and compression exponent for fitting and solving the preconsolidation pressure. The e-lgP curve was fitted using a modified Fredlund and Xing model to solve for the preconsolidation pressure. However, fitting the preconsolidation pressure using a mathematical model places strict requirements on the model, leading to increased complexity and difficulty in solving, thus limiting its widespread application.

[0004] In recent years, with the rapid development of computer technology, machine learning models have demonstrated significant advantages in predicting geotechnical engineering parameters due to their powerful data processing and nonlinear mapping capabilities. For example, they have achieved excellent results in predicting settlement changes in high embankment subgrades, predicting the resilient modulus of clay subgrades, slope stability prediction, and the application of geotechnical disaster early warning systems. Regarding the prediction of preconsolidation pressure, existing research mostly uses the basic physical properties of geotechnical materials as input parameters, but the physical meaning of these properties is not clearly defined. Compared to combining basic geotechnical physical properties with machine learning to predict preconsolidation pressure, the initial and subsequent solutions for preconsolidation pressure in geotechnical masses are primarily based on the e-lgP curve, but existing research rarely combines these two methods to predict preconsolidation pressure.

[0005] In summary, each of the existing prediction methods has its own problems: plotting methods are subject to significant human error in practical applications, resulting in inaccurate results and being time-consuming and labor-intensive; mathematical models that fit the preconsolidation pressure have strict requirements for the mathematical model, leading to increased complexity and difficulty in solving the model; and existing machine learning models mostly use the basic physical properties of soil and rock materials as input parameters for prediction, the physical meaning of which is not clear.

[0006] Therefore, those skilled in the art are dedicated to developing a method for predicting preconsolidation pressure in soil and rock by combining the XGBoost algorithm with the characteristics of the e-lgP curve. Summary of the Invention

[0007] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is to provide a prediction method with clear physical meaning, relatively simple solution model, and accurate prediction results.

[0008] To achieve the above objectives, this invention provides a method for predicting the preconsolidation pressure of soil and rock using the XGBoost algorithm combined with e-lgP curve characteristics. The prediction method includes the following steps:

[0009] S101: Collect the preconsolidation pressure data of soil and rock materials, and construct a two-dimensional data point set by the characteristic loads and their corresponding void ratios in the preconsolidation pressure data.

[0010] S103: Use the LOF algorithm to preprocess the two-dimensional data point set, and divide the preprocessed data into training set and test set according to the ratio;

[0011] S105: Construct the XGBoost model, a machine learning model based on Boosting;

[0012] S107: Train the XGBoost model using the training set and the test set;

[0013] S109: Using the trained XGBoost model, predict the preconsolidation pressure in the soil compression test data.

[0014] Further, in step S101, the pre-consolidation pressure data includes historical data and experimental data, wherein,

[0015] The historical data was extracted from literature using Origin software to obtain the characteristic loads and their corresponding porosity ratios;

[0016] The experimental data were obtained by using the Casagrande method to obtain the preconsolidation pressure from the e-lgP curve through lateral confinement compression tests, thus obtaining the characteristic load and its corresponding void ratio.

[0017] Further, in step S103, the LOF algorithm calculates the local density of each data point and compares it with the local density of adjacent data points. Based on the comparison result, it determines whether the data point is abnormal data. If it is abnormal data, the data point is deleted.

[0018] Furthermore, the LOF algorithm includes the following steps:

[0019] S1031: Determine the neighborhood range of the data point;

[0020] S1032: Calculate the reachable distance of the data points:

[0021]

[0022] S1033: Calculate the locally reachable density:

[0023]

[0024] S1034: Calculate the local outlier factor, and delete discrete data based on the local outlier factor:

[0025]

[0026] in, For data points The reachable distance between them For data points The The nearest neighbor distance, For data points The distance between them Locally reachable density, represented as a "density estimate" of the local region where point p is located, calculated with parameter k, is used to quantify the density around p. The "local outlier score" calculated for data point p is used to quantify whether the point is significantly sparse in its local neighborhood. Represented as data points The A nearest neighbor set The number of elements in the set. Used as a data point identifier.

[0027] Furthermore, in step S105, in conjunction with the application scenario of pre-consolidation pressure measurement of geotechnical materials, the range of hyperparameter space of the XGBoost model is limited. The hyperparameter space includes: compressing the search space to avoid overfitting, limiting the maximum depth of the model structure tree to balance complexity and interpretability, using a logarithmic uniform distribution to control the learning rate, embedding geotechnical material domain knowledge to reduce minimum loss, and setting the minimum sample weight of leaf nodes with reference to the characteristic noise level of geotechnical materials.

[0028] Furthermore, in step S107, the StandardScaler feature scaling algorithm is used to independently fit the features in the training set, Bayesian optimization is used to optimize the hyperparameters of the XGBoost model, and K-fold cross-validation is used.

[0029] Furthermore, the K-fold cross-validation employs a dual application: embedding the hyperparameter optimization process and verifying the stability of the optimized XGBoost model, wherein...

[0030] The embedded hyperparameter optimization process provides an unbiased performance evaluation for each set of candidate parameters;

[0031] The stability verification of the optimized XGBoost model quantifies the stability of the final XGBoost model on the training data distribution.

[0032] Further, step S107 includes the following sub-steps:

[0033] S1071: Define the range of values ​​for the parameter search space;

[0034] S1072: Configure the Bayesian optimizer, and configure the base estimator as XGBRegressor;

[0035] S1073: Generate multiple sets of parameters according to the acquisition function, train the XGBRegressor using the multiple sets of parameters, perform K-fold cross-validation on each set of parameters, calculate the score of each set and update the model;

[0036] S1074: Iteratively execute steps S1071 to S1073 until the iteration ends;

[0037] S1075: After the iteration, select the parameter with the highest score as the optimal parameter of the XGBoost model.

[0038] Furthermore, the XGBoost model is trained using the training set, and the trained XGBoost model is applied to the test set to make predictions on the test set, and the prediction accuracy of the XGBoost model is evaluated.

[0039] Furthermore, when evaluating the prediction results of the XGBoost model, the following evaluation metric is used: coefficient of determination. RMSE and MAE.

[0040] In a preferred embodiment of the present invention, compared with the prior art, the present invention has the following beneficial technical effects:

[0041] 1. The XGBoost model provided by this invention has powerful data processing and nonlinear mapping capabilities, which can effectively analyze the relationship between characteristic load points of compression tests and preconsolidation pressure data, quickly and efficiently predict preconsolidation pressure, greatly reduce computational complexity, and the solution results have clearer physical meaning.

[0042] 2. This invention establishes a pre-consolidation pressure database and continuously enriches the data volume, thereby achieving faster, more accurate and efficient prediction of pre-consolidation pressure values. The XGBoost machine learning model has achieved excellent prediction performance.

[0043] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the steps of a preferred embodiment of the method for predicting the preconsolidation pressure of soil and rock.

[0045] Figure 2 This is a schematic diagram of a preferred embodiment of the method for predicting the preconsolidation pressure of soil and rock.

[0046] Figure 3 This is a schematic diagram comparing the data distribution before and after LOF processing according to a preferred embodiment of the present invention;

[0047] Figure 4 This is a schematic diagram of the prediction results of the XGBoost model according to a preferred embodiment of the present invention. Detailed Implementation

[0048] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.

[0049] It should be noted that when an element is referred to as being "set on" another element, it can be directly on the other element or there may be an intervening element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or there may be an intervening element. The terms "vertical," "horizontal," "left," "right," "top," "bottom," "end," "top," and similar expressions used herein are for illustrative purposes only and do not represent the only possible implementation.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0051] Please refer to Figures 1 to 4 In one specific embodiment of this application,

[0052] Existing technologies for predicting preconsolidation pressure in soil and rock often rely on basic physical properties of the soil and rock materials as input parameters, which lack clear physical meaning. In contrast, combining basic physical properties of soil and rock with machine learning to predict preconsolidation pressure relies primarily on the e-lgP curve for both the initial and subsequent development of preconsolidation pressure. However, current research rarely combines these two methods to predict preconsolidation pressure. This invention combines the XGBoost model with characteristic load points on the e-lgP curve. Using characteristic load point data from compression tests, multiple characteristic loads and their corresponding void ratios are used as data points for model training. The preconsolidation pressure of soil and rock is calculated using the e-lgP curve and used as the model's output parameter to predict preconsolidation pressure. This rapid, efficient, and accurate method for predicting preconsolidation pressure has significant application value.

[0053] like Figure 1 As shown in the figure, the present invention provides a method for predicting the preconsolidation pressure of soil and rock using the XGBoost algorithm combined with e-lgP curve characteristics, which includes the following steps:

[0054] S101: Collect preconsolidation pressure data of soil and rock materials, and construct a two-dimensional data point set by combining the characteristic loads and their corresponding void ratios in the preconsolidation pressure data.

[0055] In this embodiment, the collected preconsolidation pressure data of soil and rock includes historical data and experimental data, wherein,

[0056] 1) Historical data: Characteristic loads and their corresponding void ratios were extracted from literature using Origin software;

[0057] 2) Experimental data: The preconsolidation pressure was obtained from the e-lgP curve by the Casagrande method through lateral confinement compression test, and the characteristic load and its corresponding void ratio were obtained.

[0058] After obtaining the preconsolidation pressure data of soil and rock, the characteristic loads in the preconsolidation pressure data are... Porosity of soil and rock corresponding to characteristic load Composition of two-dimensional data points The set of two-dimensional data points is used for training and tuning the XGBoost machine learning model.

[0059] S103: Use the LOF algorithm to preprocess the two-dimensional data point set, and divide the preprocessed data into training set and test set according to the ratio.

[0060] LOF (Location-Based Anomaly Detection) is a density-based anomaly detection algorithm. It calculates the local density of each data point and compares it to the local densities of its neighboring data points. Based on the comparison result, it determines whether a data point is an anomaly and deletes it if it is. Specifically, the LOF algorithm compares the local density of a data point with that of its neighboring data points; if the local density of a data point is significantly lower than that of its neighboring data points, it is considered an outlier.

[0061] The LOF algorithm for outlier detection in a dataset includes the following steps:

[0062] S1031: Determine the neighborhood range of the data point;

[0063] S1032: Calculate the reachable distance of data points:

[0064]

[0065] S1033: Calculate the locally reachable density:

[0066]

[0067] S1034: Calculate the local outlier factor and delete discrete data based on the local outlier factor:

[0068]

[0069] in, For data points The reachable distance between them For data points The The nearest neighbor distance, For data points The distance between them Locally reachable density, represented as a "density estimate" of the local region where point p is located, calculated with parameter k, is used to quantify the density around p. The "local outlier score" calculated for data point p is used to quantify whether the point is significantly sparse in its local neighborhood. Represented as data points The A nearest neighbor set The number of elements in the set. Used as a data point identifier.

[0070] S105: Construct the XGBoost model, a machine learning model based on Boosting.

[0071] In this embodiment, considering the application scenario of preconsolidation pressure measurement of geotechnical materials, the hyperparameter space range of the XGBoost model is limited. The limited hyperparameter space includes: compressing the search space to avoid overfitting, limiting the maximum depth of the model's tree structure to balance complexity and interpretability, using a logarithmic uniform distribution to control the learning rate, embedding geotechnical material domain knowledge to reduce minimum loss, and setting the minimum sample weight of the leaf nodes based on the characteristic noise level of geotechnical materials.

[0072] S107: Train the XGBoost model using the training and test sets.

[0073] In this embodiment, the StandardScaler feature scaling algorithm is used to independently fit the features in the training set, Bayesian optimization is used to optimize the hyperparameters of the XGBoost model, and K-fold cross-validation is used.

[0074] K-fold cross-validation employs a dual application: embedding the hyperparameter optimization process and verifying the stability of the optimized XGBoost model.

[0075] 1) Embed the hyperparameter optimization process to provide unbiased performance evaluation for each set of candidate parameters;

[0076] 2) Stability verification of the optimized XGBoost model: quantify the stability of the final XGBoost model on the training data distribution.

[0077] In this embodiment, the hyperparameter optimization and verification of the XGBoost model includes the following sub-steps:

[0078] S1071: Define the range of values ​​for the parameter search space;

[0079] S1072: Configure the Bayesian optimizer, and configure the base estimator as XGBRegressor;

[0080] S1073: Generate multiple sets of parameters based on the acquisition function, train XGBRegressor using multiple sets of parameters, perform K-fold cross-validation on each set of parameters, calculate the score for each set and update the model;

[0081] S1074: Iteratively execute steps S1071 to S1073 until the iteration ends;

[0082] S1075: After the iteration, select the parameter with the highest score as the optimal parameter of the XGBoost model.

[0083] After optimizing the hyperparameters of the XGBoost model, the XGBoost model is trained using the training set, and then applied to the test set to make predictions on the test set. Finally, the prediction accuracy of the XGBoost model is evaluated.

[0084] S109: Using the trained XGBoost model, predict the preconsolidation pressure in soil and rock compression test data.

[0085] In this embodiment, the following evaluation metric is used to evaluate the prediction results of the XGBoost model: coefficient of determination. RMSE and MAE.

[0086] The method for predicting preconsolidation pressure in soil and rock based on the XGBoost algorithm combined with e-lgP curve characteristics provided in this invention has the following advantages compared with existing technologies:

[0087] Existing plotting methods are prone to significant human error in practical applications, leading to inaccurate results and time-consuming processes. Methods using mathematical models to fit preconsolidation pressure require rigorous mathematical models, increasing their complexity and difficulty. Existing machine learning models often use basic physical properties of soil and rock materials as input parameters for prediction, the physical meaning of which is unclear. This invention combines characteristic load point data from the e-lgP curve (i.e., characteristic load point data from compression tests) with preconsolidation pressure data using an XGBoost model to predict preconsolidation pressure. This invention leverages the powerful data processing and nonlinear mapping capabilities of the XGBoost model to effectively analyze the relationship between characteristic load points from compression tests and preconsolidation pressure data. Preconsolidation pressure can be predicted using only the characteristic load point data from compression tests of soil and rock materials. By establishing a preconsolidation pressure database and continuously enriching the data, this invention enables faster, more accurate, and more efficient prediction of preconsolidation pressure values ​​for soil and rock. This invention combines machine learning algorithms with early consolidation pressure prediction to quickly and efficiently predict the early consolidation pressure of soil and rock, reducing computational complexity, saving material and human resources, and providing prediction results with clearer physical meaning.

[0088] The present invention will now be described in detail with reference to preferred embodiments.

[0089] like Figure 2 As shown in the embodiment of the present invention, the method for predicting the preconsolidation pressure of soil and rock using the XGBoost algorithm combined with e-lgP curve characteristics includes the following steps:

[0090] 1. Collect data and import it into the database;

[0091] 2. The LOF algorithm is used to preprocess the data;

[0092] 3. Distribute the preprocessed data to the training and testing sets in an 8:2 ratio;

[0093] 4. After standardizing the training set data, import it into the XGBoost model;

[0094] 5. Bayesian optimization was used to optimize the hyperparameters of the XGBoost model;

[0095] 6. Train the optimized model;

[0096] 7. The trained XGBoost model makes predictions on the training set;

[0097] 8. The trained XGBoost model is applied to the test set;

[0098] 9. The XGBoost model makes predictions on the test set;

[0099] 10. Evaluate the prediction results using evaluation indicators;

[0100] 11. Build a complete prediction model from the trained model;

[0101] 12. Import the compression test data into the prediction model;

[0102] 13. Enable the prediction of the pre-consolidation pressure corresponding to the imported compression test data.

[0103] The main steps in this embodiment will be described in detail below.

[0104] Step 1: Constructing an early consolidation pressure database

[0105] The database data includes the following: 1 kPa, 12.5 kPa, 25 kPa, 50 kPa, 100 kPa, 200 kPa, 400 kPa, 800 kPa, 1600 kPa, and 3200 kPa. These 10 characteristic loads and their corresponding void ratios constitute two-dimensional data points. , , …… The input parameters are used for model training. The output parameters are the coordinates of the preconsolidation pressure obtained on the e-lgP curve using the Casagrande method. x-coordinate value .

[0106] The data comes from two sources:

[0107] (1) Extract data from other people's literature, use Origin software to extract the coordinates of each point, and obtain relevant data;

[0108] (2) Conduct experiments to obtain data. Use lateral compression test to obtain various data points, and use Casagrande method to obtain the pre-consolidation pressure and obtain relevant data.

[0109] Step 2: Database data preprocessing

[0110] The dataset may contain a large number of discrete data points, some of which deviate significantly. This could represent a low-probability, extreme manifestation of the consolidated yield stress in soil and rock materials. Directly deleting discrete data is subjective and cannot accurately determine whether the deleted data is anomalous. Therefore, this invention employs the LOF algorithm to detect and remove anomalous data.

[0111] LOF (Local Outlier Factor) is a density-based anomaly detection algorithm that calculates the local density of each data point and compares it to the local densities of its neighbors. It determines the relationship between the local densities of a given data point and its neighbors; if the local density of a given data point is significantly lower than that of its neighbors, it is considered an outlier. The LOF algorithm for outlier detection in a dataset consists of four steps: determining the neighborhood; calculating the reachability distance; calculating the Local Reachability Density (LRD); and calculating the Local Outlier Factor (LOF).

[0112] The LOF algorithm calculation formula is as follows:

[0113] (1)

[0114] (2)

[0115] (3)

[0116] In the formula, Data points The The nearest neighbor distance, Data points and Distance between Representing data points The A nearest neighbor set Locally reachable density, represented as a "density estimate" of the local region where point p is located, calculated with parameter k, is used to quantify the density around p. The "local outlier score" calculated for data point p is used to quantify whether the point is significantly sparse in its local neighborhood. It is the number of elements in the set. The closer the value is to 1, the more similar the density of the point is to its neighborhood, making it less likely to be outlier data. A value much greater than 1 indicates that the density of that point is much lower than that of its neighbors, and it is more likely to be outlier data.

[0117] When applying the LOF algorithm to detect outliers in the consolidated yield stress database established in this invention, the neighborhood setting significantly impacts outlier detection. If the neighborhood is set too small, the algorithm becomes overly sensitive to local density changes, leading to many normal points being misclassified as outliers and reducing the accuracy of anomaly detection. Given the characteristics of the current small-scale dataset, setting the neighborhood too large would cause genuine outliers to be "averaged" over a larger neighborhood, masking their local density features and making them difficult to identify effectively. Therefore, a neighborhood of 30 is set, and to ensure a sufficient data base, outliers comprise 5% of the dataset.

[0118] Step 3: Building the XGBoost Machine Learning Model

[0119] XGBoost is a gradient boosting framework based on the Boosting ensemble concept. It innovatively introduces a regularization term into the loss function to control model complexity. The algorithm approximates the loss function through a second-order Taylor expansion and uses a greedy strategy to iteratively generate a decision tree. Each iteration focuses on fitting the negative gradient between the current model's predicted value and the true value. The input and output layers have been introduced in the database construction section of Part 1, and the default loss function used is mean squared error.

[0120] 1) Standardized Data Preprocessing Procedures

[0121] The StandardScaler is used to independently fit the features of the training set, and the use of test set or new data in the calculation of standardized parameters is strictly prohibited to ensure no data leakage. When predicting new data, the scaler parameters saved during the training phase are reused for transformation. This is a key implementation detail of the invention, avoiding prediction bias caused by inconsistent standardization.

[0122] 2) Definition range of hyperparameter space

[0123] The non-general parameter range is optimized based on the characteristics of small sample data in this field, specifically including:

[0124] The search space n_estimators is specifically compressed and limited to [1,200], which effectively avoids overfitting;

[0125] The max_depth is limited to the range [3,10], balancing complexity and interpretability;

[0126] The learning_rate uses a log-uniform distribution prior='log-uniform', focusing on the efficient convergence interval of 0.01 to 0.3;

[0127] Domain knowledge embedding reduces gamma minimum loss by setting the min_child_weight range to reference the feature noise level in materials science, thus suppressing invalid splits.

[0128] 3) Bayesian optimization replaces traditional parameter tuning

[0129] By replacing grid search and random search with BayesSearchCV, optimization can be completed in just 25 iterations, compared to hundreds of iterations required by traditional grid search. The model is built based on Gaussian process and intelligently selects high-potential parameter combinations, improving computational efficiency by more than 60%.

[0130] Cross-validation strategy: 50% CV (cv=5) + R² score, balancing evaluation stability and computational cost.

[0131] Step 4: Optimize the original XGBoost model by adding Bayesian algorithm and K-fold cross-validation.

[0132] Based on the original model, a Bayesian optimization model for hyperparameters and a K-fold cross-validation evaluation model were added. The Bayesian optimization algorithm dynamically models the objective function by constructing a Gaussian process surrogate model and automatically selects the parameter space by combining it with the acquisition function. In each iteration, the posterior distribution is updated based on the existing evaluation results, and the optimal hyperparameter combination is selected for validation first, gradually approaching the global optimum with fewer iterations.

[0133] K-fold cross-validation is a model validation method that employs a resampling strategy. Its principle is to divide the dataset into K mutually exclusive subsets of equal size. In each round, K-1 subsets are selected as the training set for training, and the remaining subset is used as the test set to evaluate model performance. A stable and reliable evaluation of generalization ability is obtained through the statistical analysis of the K prediction results.

[0134] 1) Hyperparameter optimization implementation steps

[0135] a) Definition of parameter search space range:

[0136] n_estimators: Integer range from 1 to 200, with a step size of 1. Preliminary experiments have verified that when the number of trees exceeds 200, the improvement in R² on the validation set is less than 0.005 and the training time increases significantly. An upper limit is set based on the sample size.

[0137] max_depth: Integer range from 3 to 10. Depths less than 3 are prone to underfitting, while depths greater than 10 increase the validation set error on this dataset.

[0138] learning_rate: Real number range 0.01 to 0.3. A logarithmic uniform distribution is used to make the sampling points more dense in the 0.01–0.1 range, which conforms to the parameter tuning rule that a small learning rate of gradient boosting model requires more trees.

[0139] subsample: Real number range 0.5 to 1.0, controls the sampling ratio of each tree during training.

[0140] colsample_bytree: A real number ranging from 0.5 to 1.0, controlling the feature sampling ratio during training of each tree.

[0141] gamma: Integer range 0 to 10, sets the minimum loss reduction threshold to suppress noisy feature splitting.

[0142] min_child_weight: Integer range 1 to 10, sets the minimum sample weight of child nodes to prevent overfitting.

[0143] b) Bayesian optimizer configuration

[0144] The base estimator is configured as XGBRegressor; n_jobs=-1 indicates that all CPU cores are used for acceleration during a single model training iteration; the search space is the range set param_space consisting of the above 7 parameters; the number of iterations is set to n_iter=25. After 5 repeated pre-experiments, the mean R² of 5-fold cross-validation fluctuated within ±0.003 in the 20th–25th iterations, indicating convergence; cross-validation is set to cv=5, and the training set is divided into 5 mutually exclusive subsets for each parameter evaluation; the scoring criterion is scoring='r2', using the mean R² of 5-fold validation as the parameter set evaluation score; parallelism is set to n_jobs=1 to avoid the nondeterminism introduced by multi-process scheduling.

[0145] c) Optimization process

[0146] (1) Input the standardized training set (x_train, y_train) into BayesSearchCV;

[0147] (2) The optimizer initializes the Gaussian process model;

[0148] (3) Iterate 25 times: Each time, generate a set of parameters according to the acquisition function; perform 5-fold cross-validation on the set: divide x_train into 5 parts according to KFold; loop 5 times: take 4 parts to train XGBRegressor, and calculate R² for the remaining 1 part; calculate the average of R² in 5 rounds as the score of the set; save the results to the history and update the model;

[0149] (4) After the iteration is completed, select the parameter group with the highest R² mean in the historical records as best_params_;

[0150] (5) Retrain XGBRegressor using best_params_ and all x_train and y_train to generate the final model best_estimator_.

[0151] 2) Dual application of K-fold cross-validation

[0152] First stage: Embedded hyperparameter optimization process

[0153] Its purpose is to provide unbiased performance evaluation for each set of candidate parameters. The implementation process is as follows: BayesSearchCV automatically calls the 5-fold split during each parameter evaluation; the 5-fold R² mean is used as the sole evaluation criterion for that parameter set to avoid evaluation bias caused by a single split; the 5-fold split uses only the training set (accounting for 80% of the original data), and the test set is completely isolated throughout.

[0154] Second step: Stability verification of the optimized model

[0155] Its purpose is to quantify the stability of the final model on the training data distribution. The implementation process is as follows: Create an independent cross-validator: K-Fold; call the `cross_validate` function, taking the final model `xgb_reg`, training sets `x_train` and `y_train`, and the aforementioned K-Fold object as input; simultaneously specify three scoring criteria: 'R'... 2 ', 'RMSE', 'MAE';

[0156] Step 5: XGBoost Model Training

[0157] The XGBoost model is trained using the prepared training and test sets.

[0158] Step 6: Make predictions using the trained XGBoost model.

[0159] 1) Evaluation metrics for XGBoost models

[0160] Using the trained XGBoost model, we predict the preconsolidation pressure in soil and rock compression test data.

[0161] In this embodiment, to evaluate the predictive ability of the machine learning algorithm, the coefficient of determination (R²) is used as the evaluation metric for the XGBoost model. 2 The predictive accuracy of the model was evaluated using mean squared error (RMSE) and mean absolute error (MAE), and the evaluation metrics are shown in Table 1.

[0162] Table 1 Model Performance Evaluation Indicators

[0163]

[0164] Note: For the true value, For predicted values, This is the average of the true values.

[0165] 2) Examples of XGBoost Model Applications

[0166] A database of 134 sets of data has been established. After preprocessing using the LOF algorithm, 8 sets of outlier data were filtered out from the original 134 sets of data, resulting in a database of 126 sets of data. Figure 3 As shown, where, Figure 3 (a) is the original data distribution map, and (b) is the data distribution map after LOF preprocessing.

[0167] The Bayesian optimization results of the constructed XGBoost model are shown in Table 2.

[0168] Table 2. XGBoost Model Parameter Tuning Results

[0169]

[0170] Using an established database, and training and testing the model at an 8:2 ratio, the XGBoost algorithm was used to implement the training set. , and test set , Excellent predictive performance.

[0171] 3) Application in actual production

[0172] By inputting the lateral compression test from actual production into the pre-trained XGBoost model, the pre-consolidation pressure can be predicted. The prediction results are as follows: Figure 4 As shown.

[0173] The method for predicting preconsolidation pressure in soil and rock based on the XGBoost algorithm combined with e-lgP curve characteristics provided in this invention has the following features:

[0174] 1. This invention combines machine learning algorithms with preconsolidation pressure prediction, leveraging the powerful data processing and nonlinear mapping capabilities of machine learning algorithms to achieve rapid and efficient prediction of preconsolidation pressure. Compared to traditional plotting methods and methods combining mathematical model fitting, it has the advantages of saving material and manpower and greatly reducing computational complexity; compared to combining machine learning models with some physical property parameters of geotechnical materials to solve for preconsolidation pressure, it has the advantage of more explicit physical meaning.

[0175] 2. This invention adopts As a performance evaluation metric for machine learning models, the XGBoost machine learning model achieved excellent predictive performance in the case of predicting the preconsolidation pressure of geotechnical materials.

[0176] 3. In practical production applications, the pre-consolidation pressure can be predicted quickly, accurately, and efficiently using the characteristic load point data from compression tests.

[0177] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for predicting preconsolidation pressure in soil and rock using the XGBoost algorithm combined with e-lgP curve characteristics, characterized in that, The prediction method includes the following steps: S101: Collect the preconsolidation pressure data of soil and rock materials, and construct a two-dimensional data point set by the characteristic loads and their corresponding void ratios in the preconsolidation pressure data. S103: Use the LOF algorithm to preprocess the two-dimensional data point set, and divide the preprocessed data into training set and test set according to the ratio; S105: Construct the XGBoost model, a machine learning model based on Boosting; S107: Train the XGBoost model using the training set and the test set; S109: Using the trained XGBoost model, predict the preconsolidation pressure in the soil compression test data.

2. The prediction method as described in claim 1, characterized in that, In step S101, the pre-consolidation pressure data includes historical data and experimental data, wherein, The historical data was extracted from literature using Origin software to obtain the characteristic loads and their corresponding porosity ratios; The experimental data were obtained by using the Casagrande method to obtain the preconsolidation pressure from the e-lgP curve through lateral confinement compression tests, thus obtaining the characteristic load and its corresponding void ratio.

3. The prediction method as described in claim 2, characterized in that, In step S103, the LOF algorithm calculates the local density of each data point and compares it with the local density of adjacent data points. Based on the comparison result, it determines whether the data point is abnormal data. If it is abnormal data, the data point is deleted.

4. The prediction method as described in claim 3, characterized in that, The LOF algorithm includes the following steps: S1031: Determine the neighborhood range of the data point; S1032: Calculate the reachable distance of the data points: S1033: Calculate the locally reachable density: S1034: Calculate the local outlier factor, and delete discrete data based on the local outlier factor: in, For data points The reachable distance between them For data points The The nearest neighbor distance, For data points The distance between them Locally reachable density, represented as a "density estimate" of the local region where point p is located, calculated with parameter k, is used to quantify the density around p. The "local outlier score" calculated for data point p is used to quantify whether the point is significantly sparse in its local neighborhood. Represented as data points The A nearest neighbor set The number of elements in the set. Used as a data point identifier.

5. The prediction method as described in claim 4, characterized in that, In step S105, the hyperparameter space range of the XGBoost model is limited in conjunction with the application scenario of preconsolidation pressure measurement of geotechnical materials. The hyperparameter space includes: compressing the search space to avoid overfitting, limiting the maximum depth of the model structure tree to balance complexity and interpretability, using a logarithmic uniform distribution to control the learning rate, embedding geotechnical material domain knowledge to reduce minimum loss, and setting the minimum sample weight of the leaf nodes based on the characteristic noise level of geotechnical materials.

6. The prediction method as described in claim 5, characterized in that, In step S107, the StandardScaler feature scaling algorithm is used to independently fit the features in the training set, Bayesian optimization is used to optimize the hyperparameters of the XGBoost model, and K-fold cross-validation is used.

7. The prediction method as described in claim 6, characterized in that, The K-fold cross-validation employs a dual application: embedding the hyperparameter optimization process and verifying the stability of the optimized XGBoost model. The embedded hyperparameter optimization process provides an unbiased performance evaluation for each set of candidate parameters; The stability verification of the optimized XGBoost model quantifies the stability of the final XGBoost model on the training data distribution.

8. The prediction method as described in claim 7, characterized in that, Step S107 includes the following sub-steps: S1071: Define the range of values ​​for the parameter search space; S1072: Configure the Bayesian optimizer, and configure the base estimator as XGBRegressor; S1073: Generate multiple sets of parameters according to the acquisition function, train the XGBRegressor using the multiple sets of parameters, perform K-fold cross-validation on each set of parameters, calculate the score of each set and update the model; S1074: Iteratively execute steps S1071 to S1073 until the iteration ends; S1075: After the iteration, select the parameter with the highest score as the optimal parameter of the XGBoost model.

9. The prediction method as described in claim 8, characterized in that, The XGBoost model is trained using the training set, and the trained XGBoost model is applied to the test set to make predictions on the test set. The prediction accuracy of the XGBoost model is then evaluated.

10. The prediction method as described in claim 9, characterized in that, When evaluating the prediction results of the XGBoost model, the following evaluation metric is used: coefficient of determination. RMSE and MAE.