Soil layer identification method based on random forest and synthetic minority class oversampling technology

By improving the random forest algorithm and synthesis of minority oversampling technology, and optimizing hyperparameters with the Gray Wolf algorithm, the problems of inefficiency and sample category imbalance in traditional soil layer classification methods when dealing with high-dimensional and nonlinear data are solved, and higher soil layer classification accuracy and efficiency are achieved.

CN119622412AActive Publication Date: 2025-03-14CCCC FOURTH HARBOR ENG INST CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202411704945.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-14
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

Traditional soil layer classification methods are inefficient when dealing with high-dimensional and nonlinear data, and the problem of sample classification imbalance leads to insufficient identification of minority classes by classifiers.

Method used

The improved random forest algorithm and synthesis of a few categories of oversampling technology are adopted to optimize the hyperparameters of the random forest algorithm through the gray wolf algorithm to improve the accuracy and efficiency of soil layer classification.

Benefits of technology

It effectively solves the problem of data imbalance, improves the model's ability to identify a few soil layers, and enhances the generalization ability and classification efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622412A_ABST
    Figure CN119622412A_ABST
Patent Text Reader

Abstract

The invention provides a soil layer identification method based on a random forest and a synthetic minority class oversampling technology, and is suitable for the field of soil layer identification. Comprising the steps of collecting data based on the underwater deep cement mixing pile, processing the data, obtaining a balanced sample data set, preparing the data, obtaining optimal random forest algorithm parameters, constructing a classification model, testing and optimizing the classification model, and applying the model. The soil layer identification method based on the random forest and the synthetic minority class oversampling technology has high classification precision and wide applicability, and can be widely applied to the field of soil layer identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a soil layer identification method based on random forest and synthetic minority class oversampling technology, and is applicable to the field of soil layer identification. Background Art

[0002] In civil engineering and geological engineering, soil layer classification is a key link in foundation engineering design and construction. Accurate soil layer classification helps to optimize foundation treatment solutions, select appropriate construction methods, and improve engineering safety and stability. However, due to the complexity and diversity of soil layers, traditional soil layer classification methods have significant limitations when dealing with high-dimensional and nonlinear data. Traditional soil layer classification methods mainly rely on manual experience and conventional geotechnical tests. These methods are inefficient when dealing with complex and changeable soil layer data, and the accuracy and consistency of the results are difficult to guarantee. In addition, the problem of sample class imbalance in soil layer classification is also a major challenge. The minority class soil layer samples account for a very low proportion in the data set, resulting in insufficient recognition of the minority class by the classifier.

[0003] In order to solve these problems, machine learning technology has been introduced into soil layer classification in recent years. Among them, the random forest algorithm is widely used in soil layer classification tasks due to its powerful nonlinear modeling ability and high robustness. Random forest can effectively improve the classification accuracy by integrating multiple decision trees for voting decisions. However, the RF algorithm still has certain limitations when dealing with the problem of imbalanced sample categories. The synthetic minority class oversampling technology balances the category distribution of the data set by generating new minority class samples, thereby improving the classifier's recognition ability for minority classes. Combining SMOTE with RF can significantly improve the performance of soil layer classification. However, the classification accuracy and accuracy of the traditional random forest algorithm depend on the selection of parameters such as tree depth. Using grid search or random search algorithms will result in high computational complexity and low classification efficiency. In addition, when synthesizing samples, the SMOTE technology may introduce noise data that affects the performance of the classifier.

[0004] In this context, this patent proposes a soil layer classification method based on improved random forest and synthetic minority class oversampling technology, using the gray wolf algorithm to improve the hyperparameters of random forest, improve classification performance, reduce noise introduction and improve the classification efficiency of the classifier. By improving the random forest and synthetic minority class oversampling technology, it is expected to make up for the shortcomings of existing methods and bring innovative solutions to the soil layer identification problem. Summary of the invention

[0005] The purpose of the present invention is to solve some problems encountered when the current machine learning technology is introduced into soil layer classification. A soil layer identification method based on random forest and synthetic minority class oversampling technology is proposed.

[0006] The purpose of the present invention can be achieved by adopting the following technical solutions:

[0007] The steps of soil layer identification method based on random forest and synthetic minority class oversampling technology are as follows:

[0008] S101 collects data based on underwater deep cement mixing piles;

[0009] The data collection based on underwater deep cement mixing piles includes collecting N groups of construction parameters in the area to be identified for the soil layer, and the underwater deep mixing pile number X collects N groups of construction parameters during the construction process. The time for obtaining each group of construction parameters is the same. The construction parameters include energy consumption W in the down-penetration stage, water content Q in the down-penetration stage, average down-penetration speed V, average down-penetration current A and construction elevation H;

[0010] The data collection based on the underwater deep cement mixing pile includes conducting geological drilling detection near the underwater deep mixing pile number X, and using the expert judgment method to obtain the soil layer category determination result based on the elevation;

[0011] S102 data processing;

[0012] The data processing includes adding labels to the N groups of construction parameters according to the construction elevation H in the N groups of construction parameters combined with the elevation-based soil layer classification determination result obtained by the expert judgment method, wherein the labels represent the soil layer classification determination result, and finally obtaining N groups of construction parameter data containing the labels;

[0013] S103 obtains a balanced sample data set;

[0014] The obtaining of the balanced sample data set includes adjusting the N sets of construction parameter data containing labels into a balanced sample construction parameter data set containing labels by using a synthetic minority oversampling technique;

[0015] S104 Data preparation;

[0016] The data preparation includes randomly dividing the labeled balanced sample construction parameter data set into a training set and a test set according to a certain ratio;

[0017] S105 obtains optimal random forest algorithm parameters;

[0018] The obtaining of the optimal random forest algorithm parameters comprises obtaining the optimal random forest algorithm parameters using a gray wolf algorithm;

[0019] S106 builds a classification model;

[0020] The constructing of the classification model comprises constructing the classification model according to the optimal random forest algorithm parameters;

[0021] S107 classification model testing and optimization;

[0022] The classification model testing and improvement includes inputting the test set data into the classification model to obtain the model classification result, comparing the model classification result with the test set data label to obtain the test set test result, and optimizing according to the test set test result to finally obtain the optimized model;

[0023] S108 model application;

[0024] The model application includes using the optimized model to classify soil layers.

[0025] Furthermore, in the above step S102, each group of construction parameter data containing labels in the N groups of construction parameter data containing labels is a vector with a dimension of 1×6, corresponding to one output variable and five input variables, the one output variable is the label, and the five input variables are the energy consumption W in the down penetration stage, the water content Q in the down penetration stage, the average down penetration speed V, the average down penetration current A and the construction elevation H.

[0026] Furthermore, in the above step S103, the step of using the synthetic minority oversampling technology to adjust the N groups of construction parameter data containing labels into a balanced sample construction parameter data set containing labels is:

[0027] a) For the N groups of construction parameter data containing labels, the number of construction parameter data of each label is counted, and a construction parameter data group of a minority class label is obtained according to the statistical result. The minority class label is determined by formula (2):

[0028]

[0029] Where N i is the number of construction parameter data sets with minority class label i, N is the total number of construction parameter data sets, m is the total number of label categories, and η is the adjustment coefficient, which ranges from 0.5 to 0.8;

[0030] b) randomly select a measurement set labeled as D from the construction parameter data set with minority class labels, calculate the Euclidean distance between the selected measurement set D and all other measurement sets with the same label, and select the first Y measurement sets with the smallest Euclidean distance as the Y nearest neighbors of the measurement set D;

[0031] c) Randomly select a measurement set E from the Y nearest neighbors of the test set D,

[0032] d) Generate a random variable μ between 0 and 1, and generate a new synthetic data set F through equation (3) based on the linear interpolation method.

[0033] F=D+μ(DE) (3)

[0034] e) Add the new data set F to the corresponding N sets of construction parameter data containing labels according to its labels to expand the data, repeat steps a) to d), and finally obtain a balanced sample construction parameter data set containing labels.

[0035] Furthermore, in the above step S105, the step of using the grey wolf algorithm to obtain the optimal random forest algorithm parameters is:

[0036] a) Initialize the gray wolf punch, each gray wolf contains a hyperparameter combination of the random forest model;

[0037] b) Calculate the fitness value of each gray wolf through the fitness function, wherein the fitness function adopts formula (4):

[0038]

[0039] Where N1 is the number of correct classifications of the training set using the random forest model constructed using the hyperparameter combination included in the gray wolf;

[0040] c) Determine the current optimal solution, optimal solution and suboptimal solution according to the fitness value calculation results;

[0041] d) updating the positions of the remaining gray wolves, and repeating the process of calculating fitness and updating positions until a predetermined number of iterations is reached or the fitness converges;

[0042] e) After the iteration, the position of the gray wolf with the highest fitness is selected as the optimal random forest algorithm parameter.

[0043] The present invention has the following beneficial effects: by using synthetic minority oversampling technology (SMOTE) to balance the construction parameter data, the data imbalance problem can be effectively solved, and the model's recognition ability for minority soil layers can be improved, thereby improving the overall classification accuracy; by optimizing the parameters of the random forest algorithm through the gray wolf algorithm, the characteristics of the soil layer can be more effectively learned from the data, and the generalization ability of the model can be enhanced, so that it can make accurate classifications on unseen soil layer data. This method does not rely on the assumption of a specific soil layer structure or autocorrelation function, has good universality, and can be widely used in different soil layer identification scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 The present invention is a flow chart of a soil layer identification method based on random forest and synthetic minority class oversampling technology. DETAILED DESCRIPTION

[0045] 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.

[0046] The following is a specific embodiment of the soil layer identification method based on random forest and synthetic minority class oversampling technology.

[0047] The steps of soil layer identification method based on random forest and synthetic minority class oversampling technology are as follows:

[0048] S101 collects data based on underwater deep cement mixing piles;

[0049] The data collection based on underwater deep cement mixing piles includes collecting N groups of construction parameters in the area to be identified for the soil layer, and the underwater deep mixing pile number X collects N groups of construction parameters during the construction process. The time for obtaining each group of construction parameters is the same. The construction parameters include energy consumption W in the down-penetration stage, water content Q in the down-penetration stage, average down-penetration speed V, average down-penetration current A and construction elevation H;

[0050] The data collection based on the underwater deep cement mixing pile includes conducting geological drilling detection near the underwater deep mixing pile number X, and using the expert judgment method to obtain the soil layer category determination result based on the elevation;

[0051] S102 data processing;

[0052] The data processing includes adding labels to the N groups of construction parameters according to the construction elevation H in the N groups of construction parameters combined with the elevation-based soil layer classification determination result obtained by the expert judgment method, wherein the labels represent the soil layer classification determination result, and finally obtaining N groups of construction parameter data containing the labels;

[0053] Furthermore, in the above step S102, each group of construction parameter data containing labels in the N groups of construction parameter data containing labels is a vector with a dimension of 1×6, corresponding to one output variable and five input variables, the one output variable is the label, and the five input variables are the energy consumption W in the down penetration stage, the water content Q in the down penetration stage, the average down penetration speed V, the average down penetration current A and the construction elevation H.

[0054] S103 obtains a balanced sample data set;

[0055] The obtaining of the balanced sample data set includes adjusting the N sets of construction parameter data containing labels into a balanced sample construction parameter data set containing labels by using a synthetic minority oversampling technique;

[0056] Furthermore, in the above step S103, the step of using the synthetic minority oversampling technology to adjust the N groups of construction parameter data containing labels into a balanced sample construction parameter data set containing labels is:

[0057] a) For the N groups of construction parameter data containing labels, the number of construction parameter data of each label is counted, and a construction parameter data group of a minority class label is obtained according to the statistical result. The minority class label is determined by formula (2):

[0058]

[0059] Where N i is the number of construction parameter data sets with minority class label i, N is the total number of construction parameter data sets, m is the total number of label categories, and η is the adjustment coefficient, which ranges from 0.5 to 0.8;

[0060] b) randomly select a measurement set labeled as D from the construction parameter data set with minority class labels, calculate the Euclidean distance between the selected measurement set D and all other measurement sets with the same label, and select the first Y measurement sets with the smallest Euclidean distance as the Y nearest neighbors of the measurement set D;

[0061] c) Randomly select a measurement set E from the Y nearest neighbors of the test set D,

[0062] d) Generate a random variable μ between 0 and 1, and generate a new synthetic data set F through equation (3) based on the linear interpolation method.

[0063] F=D+μ(DE) (3)

[0064] e) Add the new data set F to the corresponding N sets of construction parameter data containing labels according to its labels to expand the data, repeat steps a) to d), and finally obtain a balanced sample construction parameter data set containing labels.

[0065] S104 Data preparation;

[0066] The data preparation includes randomly dividing the labeled balanced sample construction parameter data set into a training set and a test set according to a certain ratio;

[0067] S105 obtains optimal random forest algorithm parameters;

[0068] The obtaining of the optimal random forest algorithm parameters includes obtaining the optimal random forest algorithm parameters by using the gray wolf algorithm; further, in the above step S105, the step of obtaining the optimal random forest algorithm parameters by using the gray wolf algorithm is:

[0069] a) Initialize the gray wolf punch, each gray wolf contains a hyperparameter combination of the random forest model;

[0070] b) Calculate the fitness value of each gray wolf through the fitness function, wherein the fitness function adopts formula (4):

[0071]

[0072] Where N1 is the number of correct classifications of the training set using the random forest model constructed using the hyperparameter combination included in the gray wolf;

[0073] c) Determine the current optimal solution, optimal solution and suboptimal solution according to the fitness value calculation results;

[0074] d) updating the positions of the remaining gray wolves, and repeating the process of calculating fitness and updating positions until a predetermined number of iterations is reached or the fitness converges;

[0075] e) After the iteration, the position of the gray wolf with the highest fitness is selected as the optimal random forest algorithm parameter.

[0076] S106 builds a classification model;

[0077] The constructing of the classification model comprises constructing the classification model according to the optimal random forest algorithm parameters;

[0078] S107 classification model testing and optimization;

[0079] The classification model testing and improvement includes inputting the test set data into the classification model to obtain the model classification result, comparing the model classification result with the test set data label to obtain the test set test result, and optimizing according to the test set test result to finally obtain the optimized model;

[0080] S108 model application;

[0081] The model application includes using the optimized model to classify soil layers.

[0082] In the above embodiments, the present invention discloses a soil layer identification method based on random forest and synthetic minority class oversampling technology, including data collection based on underwater deep cement mixing piles, data processing, obtaining a balanced sample data set, data preparation, obtaining optimal random forest algorithm parameters, building a classification model, classification model testing and optimization, and model application; this method proposes a soil layer identification method based on random forest and synthetic minority class oversampling technology, which has high classification accuracy and wide applicability, and can be widely used in the field of soil layer identification.

[0083] The above description is a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A soil layer identification method based on random forest and synthetic minority class oversampling technology, characterized in that: The following steps are involved: S101 collects data based on underwater deep cement mixing piles; The data collection based on underwater deep cement mixing piles includes collecting N groups of construction parameters in the area to be identified for the soil layer, and the underwater deep mixing pile number X collects N groups of construction parameters during the construction process. The time for obtaining each group of construction parameters is the same. The construction parameters include energy consumption W in the down-penetration stage, water content Q in the down-penetration stage, average down-penetration speed V, average down-penetration current A and construction elevation H; The data collection based on the underwater deep cement mixing pile includes conducting geological drilling detection near the underwater deep mixing pile number X, and using the expert judgment method to obtain the soil layer category determination result based on the elevation; S102 data processing; The data processing includes adding labels to the N groups of construction parameters according to the construction elevation H in the N groups of construction parameters combined with the elevation-based soil layer classification determination result obtained by the expert judgment method, wherein the labels represent the soil layer classification determination result, and finally obtaining N groups of construction parameter data containing the labels; S103 obtains a balanced sample data set; The obtaining of the balanced sample data set includes adjusting the N sets of construction parameter data containing labels into a balanced sample construction parameter data set containing labels by using a synthetic minority oversampling technique; S104 Data preparation; The data preparation includes randomly dividing the labeled balanced sample construction parameter data set into a training set and a test set according to a certain ratio; S105 obtains optimal random forest algorithm parameters; The obtaining of the optimal random forest algorithm parameters comprises obtaining the optimal random forest algorithm parameters using a gray wolf algorithm; S106 builds a classification model; The constructing of the classification model comprises constructing the classification model according to the optimal random forest algorithm parameters; S107 classification model testing and optimization; The classification model testing and improvement includes inputting the test set data into the classification model to obtain the model classification result, comparing the model classification result with the test set data label to obtain the test set test result, and optimizing according to the test set test result to finally obtain the optimized model; S108 model application; The model application includes using the optimized model to classify soil layers.

2. The soil layer identification method based on random forest and synthetic minority class oversampling technology according to claim 1 is characterized in that: In step S102, each group of construction parameter data containing labels in the N groups of construction parameter data containing labels is a vector with a dimension of 1×6, corresponding to one output variable and five input variables, the one output variable is the label, and the five input variables are the energy consumption W in the down penetration stage, the water content Q in the down penetration stage, the average down penetration speed V, the average down penetration current A and the construction elevation H.

3. The soil layer identification method based on random forest and synthetic minority class oversampling technology according to claim 1 is characterized in that: In step S103, the step of using the synthetic minority oversampling technique to adjust the N sets of construction parameter data containing labels into a balanced sample construction parameter data set containing labels is: a) For the N groups of construction parameter data containing labels, the number of construction parameter data of each label is counted, and a construction parameter data group of a minority class label is obtained according to the statistical result. The minority class label is determined by formula (2): Where N i is the number of construction parameter data sets with minority class label i, N is the total number of construction parameter data sets, m is the total number of label categories, and η is the adjustment coefficient, which ranges from 0.5 to 0.8; b) randomly select a measurement set labeled as D from the construction parameter data set with minority class labels, calculate the Euclidean distance between the selected measurement set D and all other measurement sets with the same label, and select the first Y measurement sets with the smallest Euclidean distance as the Y nearest neighbors of the measurement set D; c) Randomly select a measurement set E from the Y nearest neighbors of the test set D, d) Generate a random variable μ between 0 and 1, and generate a new synthetic data set F through equation (3) based on the linear interpolation method. F=D+μ(DE) (3) e) Add the new data set F to the corresponding N sets of construction parameter data containing labels according to its labels to expand the data, repeat steps a) to d), and finally obtain a balanced sample construction parameter data set containing labels.

4. The soil layer identification method based on random forest and synthetic minority class oversampling technology according to claim 1 is characterized in that: In step S105, the step of using the grey wolf algorithm to obtain the optimal random forest algorithm parameters is: a) Initialize the gray wolf punch, each gray wolf contains a hyperparameter combination of the random forest model; b) Calculate the fitness value of each gray wolf through the fitness function, wherein the fitness function adopts formula (4): Where N1 is the number of correct classifications of the training set using the random forest model constructed using the hyperparameter combination included in the gray wolf; c) Determine the current optimal solution, optimal solution and suboptimal solution according to the fitness value calculation results; d) updating the positions of the remaining gray wolves, and repeating the process of calculating fitness and updating positions until a predetermined number of iterations is reached or the fitness converges; e) After the iteration, the position of the gray wolf with the highest fitness is selected as the optimal random forest algorithm parameter.

Citation Information

Patent Citations

  • Method for classifying unbalanced data sets

    CN110991653A

  • Stratum recognition method based on trenchless while-drilling parameter machine learning

    CN112381938A

  • Stratum lithology identification while-drilling method based on machine learning

    CN113378998A

  • Network intrusion detection method based on random forest

    CN113852612A

  • Network fault diagnosis method and system under high-dimensional unbalanced data condition

    CN116405368A