Soil layer classification method based on PSO-RF

Through the PSO-RF-based soil layer classification method, the random forest model and particle swarm algorithm optimization are used, combined with DCM pile data, the subjectivity and high cost problems of traditional soil layer identification methods are solved, and the rapid and convenient soil layer classification and Efficient model prediction.

CN119128698APending Publication Date: 2024-12-13CCCC FOURTH HARBOR ENG INST CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411153845.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Traditional soil layer recognition methods are highly subjective and inefficient, standard test methods take a long time and are cost-effective, statistical analysis methods are poorly adaptable, and existing machine learning methods are complex in field data collection and low prediction efficiency.

Method used

The soil layer classification method based on PSO-RF is adopted, and through data acquisition and preprocessing, parameter dimensionality reduction, particle swarm algorithm optimization and model testing, the soil layer classification is used using a random forest model, and combined with DCM pile data for training and prediction.

Benefits of technology

It realizes fast and convenient data acquisition, efficient and accurate classification model, and is suitable for soil layer classification under different projects and soil layer conditions, reducing costs and data collection complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128698A_ABST
    Figure CN119128698A_ABST
Patent Text Reader

Abstract

The invention provides a soil layer classification method based on PSO-RF, and is suitable for the field of geotechnical engineering in-situ testing. The method comprises the steps of data acquisition and preprocessing, parameter dimension reduction, particle swarm optimization and model test and use, training and prediction are carried out based on data collected by a DCM pile, in the soil layer classification process, field data acquisition is faster and more convenient, and through random forest diversified decision-making tree construction, the classification efficiency is improved. Good classification performance can be kept under different project and different soil layer conditions, in addition, the particle swarm optimization algorithm is used for efficiently searching for an optimal parameter combination by simulating group behaviors, the accuracy of a classification model is improved, and the method has the advantages of being convenient to collect field data, high in generalization ability and accurate in classification result and has good application prospects. The device can be widely applied to the field of geotechnical engineering in-situ testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of geotechnical engineering in-situ testing, and in particular to a soil layer classification method based on PSO-RF. Background Art

[0002] Soil layer classification is the basis of engineering design and construction. Different types of soil layers show different physical and mechanical properties when conducting foundation treatment, foundation design, tunnel construction and slope stability analysis. In addition, due to differences in soil properties, the porosity, soil structure, water content and other differences of different soil samples lead to large differences in soil shear strength. Therefore, accurate soil layer classification helps to select appropriate construction methods and materials to ensure the safety and stability of the project.

[0003] Traditional soil layer identification methods include traditional empirical methods, which are based on geotechnical test results and engineers' relevant experience, and are classified by observing and describing the physical characteristics of soil samples (such as color, particles, size, etc.). This will lead to classification results that are too subjective and inefficient. In addition, the standard test method classifies soil samples by using standard geotechnical tests (such as particle size analysis, liquid limit test, permeability test, etc.). However, comprehensive standard tests require a lot of manpower and material resources, and the test cost is high. There is also a statistical analysis method, which establishes soil layer classification standards and discrimination rules by statistically analyzing a large amount of geotechnical test data. However, this method is highly dependent on data and cannot be dynamically adjusted and optimized according to new data and information.

[0004] In order to overcome the limitations of existing methods, machine learning, as an existing popular method, provides an effective solution for soil layer classification. Existing studies consider using algorithms such as support vector machine regression to classify soil layers. However, these methods require a large amount of data for training, and need to re-collect data for soil layers in different regions. After training, the model needs to classify soil layers based on data collected on site. The data collection process is relatively complicated, so it is not convenient for actual project application.

[0005] Therefore, it is necessary to propose a soil layer classification method with low cost, easy data collection and high model classification efficiency. Summary of the invention

[0006] The purpose of the present invention is to solve the problems that traditional soil layer identification methods are highly subjective and inefficient, standard test methods are time-consuming and costly, statistical analysis methods have poor adaptability, and existing machine learning methods have complex field data collection and low prediction efficiency. A soil layer classification method based on PSO-RF based on automatic continuous monitoring is proposed. By improving the random forest method, the shortcomings of the existing methods are compensated, and an innovative solution is brought to the soil layer identification problem, which can be widely used in the field of in-situ testing of geotechnical engineering.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] S1, data collection and preprocessing;

[0009] The data collection and preprocessing include collecting relevant parameters in the construction process of previous DCM pile projects, the relevant parameters include energy consumption in the penetration stage, water content in the penetration stage, average penetration speed, average penetration current, construction elevation and soil layer type, the soil layer type is divided into three types: "sand", "clay" and "silt", the three types are numerically converted to correspond to 0, 1, and 2 respectively, the relevant parameters are sorted as a basic data set, the parameters other than the soil layer type use a local anomaly factor algorithm to identify abnormal values, and use an interpolation method to replace abnormal values ​​and missing values, remove the entire data sample with abnormal or missing soil layer type, and finally obtain the number of valid samples of the basic data set as n, and then normalize the data of each parameter, and the processed basic data set is randomly divided into a training set and a test set at a ratio of 8:2;

[0010] S2, parameter dimension reduction;

[0011] The parameter dimension reduction includes using the principal component analysis method to reduce the dimension of the relevant parameters except the soil layer type, first using data analysis software to calculate the correlation coefficients between the relevant parameters to obtain a correlation coefficient matrix, then solving the eigenvalues ​​of the correlation coefficient matrix, and then solving the corresponding explained variance ratio as the contribution rate according to any of the eigenvalues, arranging the relevant parameters, the eigenvalues, and the contribution rates in a descending order according to the contribution rates, and calculating the cumulative contribution rate. When the cumulative contribution rate reaches T and tends to be stable, k parameters before the cumulative contribution rate reaches T are taken as principal components, and the principal components are input into the prediction model;

[0012] S3, particle swarm algorithm optimization;

[0013] The particle swarm algorithm optimization includes using the basic data set data after being processed in steps S1 and S2 to construct a random forest model, and using the particle swarm algorithm to optimize the hyperparameters of the model. The optimization process includes:

[0014] 1) Initialize the model hyperparameters, set the boundary values ​​of the hyperparameters of the random forest model, and randomly generate m initial particles within the boundary value range, including the particle position X i and speed V i ,

[0015]

[0016]

[0017] Where i is the i-th particle in the particle swarm, the position of the particle represents a set of values ​​of the hyperparameters, and the speed of the particle represents the changing trend of the values ​​of the hyperparameters;

[0018] 2) Design a fitness function and construct a fitness function f for evaluating the local optimal position and the global optimal position of particles;

[0019]

[0020] Where i is the i-th training set sample, y i - Actual value of soil layer type, - Prediction of soil type;

[0021] 3) Evaluate the random forest optimization model, establish a random forest prediction model based on the hyperparameter value represented by each particle in the initial particle group, use the random forest prediction model to predict the soil layer type based on the training set data, and use the fitness function value of the initial particle as the local optimal value F of each particle 0 i =(f 0 i1 ,f 0 i2 ,…,f 0 ik ), the particle position corresponding to the local optimal value is taken as the local optimal position P 0 i =(p 0 i1 ,p 0 i2 ,…,p 0 ik ) T , the minimum local optimal value of each initial particle in the particle swarm is the global optimal value F 0 g =(f 0 g1 ,f 0 g2 ,…,f 0 gk ), the particle position corresponding to the global optimal value is taken as the global optimal position P 0 g =(p 0 g1 ,p 0 g2 ,…,p 0 gk ) T , and then iterate the speed and position of each particle in the particle swarm according to the following formula:

[0022]

[0023]

[0024] Where ω is the inertia weight, t is the number of iterations; c1 and c2 are constants; r1 and r2 are random numbers distributed in the range [0,1]. The current local optimal value, global optimal value, local optimal position and global optimal position after iteration are updated. The fitness function value of the particle after iteration is less than the current local optimal value F 0 i , then the fitness function value of the particle after iteration is taken as the current local optimal value F 0 i , the position of the particle after iteration is taken as the local optimal position P 0 i After particle iteration, the fitness function value of the local optimal value of each particle in the particle swarm is smaller than the current global optimal value F 0 g , then the minimum value of the local optimal value of each particle in the particle swarm after the particle iteration is taken as the current global optimal value F 0 g , the position of the particle after the minimum value corresponds to the iteration as the global optimal position P 0 g , repeat the iteration and update process until the stop condition is met or the maximum number of iterations is reached, and output the global optimal position after the last iteration update;

[0025] S4, model testing and use;

[0026] The model testing and use includes using test set data to verify the random forest prediction model optimized by the genetic algorithm, using accuracy and precision to evaluate the optimized random forest prediction model, and using the random forest prediction model to predict the soil layer classification of the actual project after meeting the evaluation requirements.

[0027] As a preferred technical solution of the present invention, in step S1, the basic data set is randomly divided into 5 equal parts using a 5-fold cross-validation method, and one basic data set is selected as a test set without repetition, and the remaining 4 basic data sets are selected as training sets. Then, 5 different combinations of test sets and training sets are used to perform particle swarm algorithm optimization and random forest prediction model testing. During actual project use, the optimal random forest prediction model is selected for soil layer classification prediction.

[0028] As a preferred technical solution of the present invention, in step S3, the cumulative contribution rate T≥0.85.

[0029] As a preferred technical solution of the present invention, in step S3, the hyperparameters include the number of trees, the maximum depth of the tree, the minimum number of samples required for node splitting, and the minimum number of samples required on the leaf node.

[0030] The beneficial effects of the present invention are as follows: relying on DCM piles to collect data for training and prediction, in the process of soil layer classification, on-site data collection is faster and more convenient, and through the construction of diversified decision trees of Random Forest (RF), good classification performance can be maintained under different projects and different soil layer conditions. In addition, the Particle Swarm Optimization (PSO) algorithm is used to efficiently search for the optimal parameter combination by simulating group behavior, thereby improving the accuracy of the classification model. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flow chart of the soil layer classification method based on PSO-RF of the present invention. DETAILED DESCRIPTION

[0032] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments given here are only used to illustrate and explain the present invention and cannot be used to limit the present invention. It should be noted that many specific details are set forth in the following description to facilitate a full understanding of the present invention, but the present invention may also have other embodiments and variations thereof, and therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.

[0033] The specific implementation steps of Example 1 are as follows:

[0034] S1, data collection and preprocessing;

[0035] The relevant parameters of the previous DCM pile project construction process were collected, including energy consumption in the penetration stage, water content in the penetration stage, average penetration speed, average penetration current, construction elevation and soil type. The soil types are divided into three types: "sand", "clay" and "silt". The three types are converted into numerical values ​​corresponding to 0, 1 and 2 respectively. The relevant parameters were sorted out as the basic data set. The local anomaly factor algorithm was used to identify outliers for parameters other than soil type, and the interpolation method was used to replace outliers and missing values. The entire data samples with abnormal or missing soil types were removed. Finally, the number of valid samples of the basic data set was 280. Then the data of each parameter was normalized, and the processed basic data set was randomly divided into a training set and a test set in a ratio of 8:2.

[0036] S2, parameter dimension reduction;

[0037] The principal component analysis method is used to reduce the dimension of the relevant parameters except the soil layer type. The correlation coefficients between the relevant parameters are first calculated using data analysis software to obtain a correlation coefficient matrix, and then the eigenvalues ​​of the correlation coefficient matrix are solved. Then, the corresponding explained variance ratio is solved according to any of the eigenvalues ​​as the contribution rate, and the relevant parameters, the eigenvalues, and the contribution rates are arranged in descending order according to the contribution rates, and the cumulative contribution rate is calculated. When the cumulative contribution rate reaches 87.28%, it tends to be stable. The three parameters before the cumulative contribution rate reaches 87.28% are taken as the principal components, namely, the average current of the penetration, the energy consumption of the penetration stage, and the average speed of the penetration, and the principal components are input into the prediction model;

[0038] Table 1 Summary of the contribution of various parameters in principal component analysis

[0039]

[0040] S3, particle swarm algorithm optimization;

[0041] After the basic data set is processed in steps S1 and S2, it is used to construct a random forest model, and the particle swarm algorithm is used to optimize the hyperparameters of the model. The hyperparameters optimized in this embodiment include the number of trees, the maximum depth of the tree, the minimum number of samples required for node splitting, and the minimum number of samples required on the leaf node. The optimization process includes:

[0042] 1) Initialize the model hyperparameters, set the boundary values ​​of the hyperparameters of the random forest model, and randomly generate 20 initial particles within the boundary value range, including the particle position X i and speed V i ,

[0043]

[0044]

[0045] Where i is the i-th particle in the particle swarm, the position of the particle represents a set of values ​​of the hyperparameters, and the speed of the particle represents the changing trend of the values ​​of the hyperparameters;

[0046] 2) Design a fitness function and construct a fitness function f for evaluating the local optimal position and the global optimal position of particles;

[0047]

[0048] Where i is the i-th training set sample, y i - Actual value of soil layer type, - Prediction of soil type;

[0049] 3) Evaluate the random forest optimization model, establish a random forest prediction model based on the hyperparameter value represented by each particle in the initial particle group, use the random forest prediction model to predict the soil layer type based on the training set data, and use the fitness function value of the initial particle as the local optimal value F of each particle 0 i =(f 0 i1 ,f 0 i2 ,…,f 0 ik ), the particle position corresponding to the local optimal value is taken as the local optimal position P 0 i =(p 0 i1 ,p 0 i2 ,…,p 0 ik ) T , the minimum local optimal value of each initial particle in the particle swarm is the global optimal value F 0 g =(f 0 g1 ,f 0 g2 ,…,f 0 gk ), the particle position corresponding to the global optimal value is taken as the global optimal position P 0 g =(p 0 g1 ,p 0 g2 ,…,p 0 gk ) T , and then iterate the speed and position of each particle in the particle swarm according to the following formula:

[0050]

[0051]

[0052] Where ω is the inertia weight, t is the number of iterations; c1 and c2 are constants; r1 and r2 are random numbers distributed in the range [0,1]. The current local optimal value, global optimal value, local optimal position and global optimal position after iteration are updated. The fitness function value of the particle after iteration is less than the current local optimal value F 0 i , then the fitness function value of the particle after iteration is taken as the current local optimal value F 0 i , the position of the particle after iteration is taken as the local optimal position P 0i After particle iteration, the fitness function value of the local optimal value of each particle in the particle swarm is smaller than the current global optimal value F 0 g , then the minimum value of the local optimal value of each particle in the particle swarm after the particle iteration is taken as the current global optimal value F 0 g , the position of the particle after the minimum value corresponds to the iteration as the global optimal position P 0 g , repeat the iteration and update process until the stop condition is met or the maximum number of iterations is reached, and output the global optimal position after the last iteration update;

[0053] S4, model testing and use;

[0054] The test set data was used to verify the random forest prediction model optimized by the genetic algorithm, and the accuracy and precision were used to evaluate the optimized random forest prediction model. In this embodiment, the accuracy, sand prediction precision, clay prediction precision and silt prediction precision were 94.64%, 93.33%, 96.15% and 93.33%, respectively. The random forest prediction model can be used to predict the soil layer classification of subsequent projects.

[0055] Example 2 Based on Example 1, the 5-fold cross-validation method is used to randomly divide the data into 5 equal parts, and one basic data set is selected as the test set without repetition, and the remaining 4 basic data sets are used as training sets. Then, 5 different combinations of test sets and training sets are used to perform particle swarm algorithm optimization and random forest prediction model testing. The accuracy of the random forest prediction model under the 5 combinations, the sand prediction accuracy, the clay prediction accuracy, and the silt prediction accuracy are obtained as shown in Table 2.

[0056] Table 2. Summary of predictions of cross-validated random forest prediction model

[0057]

[0058] By comparison, it is found that combinations 2, 3 and 5 have higher prediction accuracy. In actual project use, one of these three random forest prediction models is given priority for soil layer classification prediction.

[0059] In summary, the soil layer classification method based on PSO-RF in the present invention has the characteristics of convenient field data collection, strong generalization ability and accurate classification results in the field of in-situ testing of geotechnical engineering.

[0060] It should be understood that the above-mentioned embodiments are one or more embodiments of the present invention, and there are many other embodiments and variations thereof based on the present invention; the variations and modifications made by ordinary technicians in this industry through the present invention without making pioneering innovations all fall within the scope of protection of the present invention.

Claims

1. A soil layer classification method based on PSO-RF, characterized in that The specific steps include: S1, data collection and preprocessing; The data collection and preprocessing include collecting relevant parameters in the construction process of previous DCM pile projects, the relevant parameters include energy consumption in the penetration stage, water content in the penetration stage, average penetration speed, average penetration current, construction elevation and soil layer type, the soil layer type is divided into three types: "sand", "clay" and "silt", the three types are numerically converted to correspond to 0, 1, and 2 respectively, the relevant parameters are sorted out as a basic data set, the parameters other than the soil layer type use a local anomaly factor algorithm to identify abnormal values, and use an interpolation method to replace abnormal values ​​and missing values, remove the entire data sample with abnormal or missing soil layer type, and finally obtain the number of valid samples of the basic data set as n, and then normalize the data of each parameter, and the processed basic data set is randomly divided into a training set and a test set at a ratio of 8:2; S2, parameter dimension reduction; The parameter dimension reduction includes using the principal component analysis method to reduce the dimension of the relevant parameters except the soil layer type, first using data analysis software to calculate the correlation coefficients between the relevant parameters to obtain a correlation coefficient matrix, then solving the eigenvalues ​​of the correlation coefficient matrix, and then solving the corresponding explained variance ratio as the contribution rate according to any of the eigenvalues, arranging the relevant parameters, the eigenvalues, and the contribution rates in a descending order according to the contribution rates, and calculating the cumulative contribution rate. When the cumulative contribution rate reaches T and tends to be stable, k parameters before the cumulative contribution rate reaches T are taken as principal components, and the principal components are input into the prediction model; S3, particle swarm algorithm optimization; The particle swarm algorithm optimization includes using the basic data set data after being processed in steps S1 and S2 to construct a random forest model, and using the particle swarm algorithm to optimize the hyperparameters of the model. The optimization process includes: 1) Initialize the model hyperparameters, set the boundary values ​​of the hyperparameters of the random forest model, and randomly generate m initial particles within the boundary value range, including the particle position X i and speed V i , Where i is the i-th particle in the particle swarm, the position of the particle represents a set of values ​​of the hyperparameters, and the speed of the particle represents the changing trend of the values ​​of the hyperparameters; 2) Design a fitness function and construct a fitness function f for evaluating the local optimal position and the global optimal position of particles; Where i is the i-th training set sample, y i - Actual value of soil layer type, - Prediction of soil type; 3) Evaluate the random forest optimization model, establish a random forest prediction model based on the hyperparameter value represented by each particle in the initial particle group, use the random forest prediction model to predict the soil layer type based on the training set data, and use the fitness function value of the initial particle as the local optimal value F of each particle 0 i =(f 0 i1 ,f 0 i2 ,…,f 0 ik ), the particle position corresponding to the local optimal value is taken as the local optimal position P 0 i =(p 0 i1 ,p 0 i2 ,…,p 0 ik ) T , the minimum local optimal value of each initial particle in the particle swarm is the global optimal value F 0 g =(f 0 g1 ,f 0 g2 ,…,f 0 gk ), the particle position corresponding to the global optimal value is taken as the global optimal position P 0 g =(p 0 g1 ,p 0 g2 ,…,p 0 gk ) T , and then iterate the speed and position of each particle in the particle swarm according to the following formula: Where ω is the inertia weight, t is the number of iterations; c1 and c2 are constants; r1 and r2 are random numbers distributed in the range [0,1]. The current local optimal value, global optimal value, local optimal position and global optimal position after iteration are updated. The fitness function value of the particle after iteration is less than the current local optimal value F 0 i , then the fitness function value of the particle after iteration is taken as the current local optimal value F 0 i , the position of the particle after iteration is taken as the local optimal position P 0 i After particle iteration, the fitness function value of the local optimal value of each particle in the particle swarm is smaller than the current global optimal value F 0 g , then the minimum value of the local optimal value of each particle in the particle swarm after the particle iteration is taken as the current global optimal value F 0 g , the position of the particle after the minimum value corresponds to the iteration as the global optimal position P 0 g , repeat the iteration and update process until the stop condition is met or the maximum number of iterations is reached, and output the global optimal position after the last iteration update; S4, model testing and use; The model testing and use includes using test set data to verify the random forest prediction model optimized by the genetic algorithm, using accuracy and precision to evaluate the optimized random forest prediction model, and using the random forest prediction model to predict the soil layer classification of the actual project after meeting the evaluation requirements.

2. The soil layer classification method based on PSO-RF according to claim 1 is characterized in that: In step S1, the basic data set is randomly divided into five equal parts using a 5-fold cross-validation method. One basic data set is selected as a test set without duplication, and the remaining four basic data sets are selected as training sets. Then, five different combinations of test sets and training sets are used to perform particle swarm algorithm optimization and random forest prediction model testing. During actual project use, the optimal random forest prediction model is selected for soil layer classification prediction.

3. The soil layer classification method based on PSO-RF according to claim 1 is characterized in that: In step S3, the cumulative contribution rate T≥0.

85.

4. The soil layer classification method based on PSO-RF according to claim 1 is characterized in that: In step S3, the hyperparameters include the number of trees, the maximum depth of the tree, the minimum number of samples required for node splitting, and the minimum number of samples required on a leaf node.

Citation Information

Cited By

  • CPTU soil body layering method based on machine learning and uncertainty analysis

    CN120217173A

  • Nondestructive testing method and system for modulus of asphalt road structure layer

    CN121145316A