Data balance, data enhancement and synchronous optimization method for landslide prediction in underground engineering scene
By using feature selection, improved SMOTE and CGAN, and data filtering methods in the landslide prediction model, a high-quality balanced data set is constructed, which solves the problem of data imbalance and missingness in the existing technology and significantly improves the accuracy of the landslide prediction model. and reliability.
Patent Information
- Application Number
- CN202411430020.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-24
AI Technical Summary
Existing data balance and augmentation methods may introduce newly generated data of low quality into the dataset, resulting in poor stability and accuracy of landslide prediction models.
It proposes a data balance and data enhancement optimization method for the prediction of skid slopes for underground engineering scenarios. Through the processing of feature selection, data balance and data enhancement, and data filtering, a high -quality balanced data set is constructed. Specific methods include the feature selection of linear and non-linear weighted weights, improved SMOTE (SK-SMOTE), and conditional confrontation network (CGAN) for data balance and enhancement, as well as category data filtering in class.
It significantly improves the accuracy and reliability of the landslide prediction model, effectively solves the problem of data imbalance and data missing, improves the quality of new data, and makes the landslide predictive model perform well in terms of stability and accuracy.
Smart Images

Figure CN119357773A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of landslide prediction in underground engineering scenarios, and in particular relates to a data balance and data enhancement and synchronous optimization method for landslide prediction. Background Art
[0002] Underground engineering projects such as subways, tunnels, underground commercial facilities, underground reservoirs, and deep mines have not only effectively alleviated the tense situation of the surface space, but also provided new impetus for the sustainable development of cities. However, various geological disaster risks are inevitable in the process of underground engineering construction, and landslides are one of the most common and destructive disasters. Landslides refer to the overall or partial sliding of surface or near-surface rock and soil along a certain sliding surface under the action of gravity. Landslides not only cause direct losses such as damage to underground engineering structures, road blockages, and river blockages, but may also cause secondary disasters such as mudslides and collapses, posing a huge threat to human life and property safety. According to statistics, the economic losses and casualties caused by landslides are huge every year around the world. Therefore, landslide prediction methods are the research focus and hotspot in the field of engineering geology and geological disaster prevention.
[0003] Landslide prediction research is an important part of landslide prevention and control work. Its purpose is to accurately predict the time, location, and scale of landslides and take preventive measures in advance, such as monitoring and early warning, engineering reinforcement, and evacuation, so as to effectively reduce the threat of landslides to human life and property. At the same time, landslide prediction research provides a scientific decision-making basis for the government and engineering management departments, helping them to formulate reasonable landslide prevention and control strategies and emergency plans, and improve the scientificity and effectiveness of landslide disaster prevention and control. More importantly, landslide prediction research is of great significance to the safety assessment of underground engineering construction. Through landslide risk assessment and prediction, it can guide engineering design and construction and avoid or reduce engineering accidents caused by landslides.
[0004] Traditional landslide prediction methods mainly include geological survey and field monitoring, empirical statistics, physical model method and multi-source data comprehensive analysis method. Geological survey and field monitoring are the basis of landslide prediction. Through detailed investigation and monitoring of the geological structure, geomorphological characteristics, rainfall, groundwater level, etc. of the landslide area, the causes and development laws of landslides can be mastered. This method is intuitive and reliable, but it has problems such as long time consumption, high cost, and poor real-time performance, and it is difficult to meet the needs of modern landslide prevention and control work. The empirical statistical method extracts the laws and characteristics of landslide occurrence through statistical analysis of historical landslide data, and makes predictions based on this. This method relies on large-scale historical data and is suitable for areas where landslides occur frequently. In addition, the prediction accuracy of the empirical statistical method is limited by the representativeness and completeness of historical data, and it is difficult to cope with the complex and changeable causes and inducing factors of landslides. The physical model method is based on the mechanical principle of landslide occurrence. By establishing a mechanical model of the landslide body, numerical simulation or laboratory experiments are carried out to predict the occurrence and development of landslides. The physical model method can accurately reflect the mechanical process of landslides, but the establishment of the model and the selection of parameters are complex, the computing resources required are large, and it is difficult to adapt to the prediction of landslides in different regions and of different types. The multi-source data comprehensive analysis method integrates multi-source data such as geology, geomorphology, meteorology, and remote sensing to conduct a comprehensive analysis and assess the danger of landslides. This method can comprehensively consider the causes and inducing factors of landslides and improve the accuracy and comprehensiveness of landslide prediction. However, the multi-source data comprehensive analysis method needs to process a large amount of heterogeneous data, and the maturity of data fusion technology directly affects the prediction effect. At present, no mature technology has been applied.
[0005] With the development of big data and artificial intelligence technology, landslide prediction methods based on machine learning have gradually become a research hotspot. Machine learning predicts by analyzing and learning the rules in data. It has the advantages of automatic modeling, processing complex data and improving prediction accuracy. Common machine learning models include support vector machine (SVM), random forest, neural network, etc. Many scholars have carried out related research. For example, Chen et al. combined spatiotemporal knowledge graphs and machine learning models to establish a framework to effectively organize multi-source remote sensing data and generate a unified prediction workflow. The most adaptable machine learning model was selected to predict landslides in sample-scarce areas. Wang et al. used double exponential smoothing and five machine learning models to predict trend displacement and periodic displacement in typical areas, respectively, and proved that PSO-KELM and PSO-LSSVM have superior mean prediction accuracy and prediction stability. Ma et al. analyzed the importance of the characteristics affecting landslide deformation and used machine learning models to establish prediction models for similar types of landslide deformation, mixed types of landslide deformation and single landslide deformation. Xiao et al. systematically compared the performance of three types of data-driven landslide prediction methods and proposed a new machine learning model, which is characterized by probabilistic landslide modeling, for spatiotemporal landslide prediction. Fang et al. applied general support vector machine and its popular variants (i.e., multiple kernel learning, infinite ensemble support vector machine, and semi-supervised support vector machine) to predict landslide susceptibility and compared their prediction performance.
[0006] Although the landslide prediction method based on machine learning has performed well in improving prediction accuracy and real-time performance, it still faces some challenges in practical applications, among which data imbalance and data scarcity are particularly prominent. The frequency of landslides is relatively low, resulting in a significant imbalance between landslide data and non-landslide data. This data imbalance will affect the training effect of the machine learning model, making the model more inclined to predict non-landslide events, reducing the accuracy of landslide prediction. The data imbalance problem is particularly common in actual landslide prediction, because the occurrence of landslide events is random and sudden, while the amount of data for non-landslide events is usually large, and the data characteristics are significantly different. Landslide prediction requires a large amount of historical data and field monitoring data, but in some areas where landslides are frequent but monitoring methods are insufficient, it is difficult to obtain and accumulate data. The lack of data not only affects the training effect of the model, but may also lead to uncertainty in the prediction results. The problem of missing data is an important problem in landslide prediction, because the complexity and diversity of landslide events make data collection and annotation very difficult, resulting in less landslide data available for training. Therefore, it is of great significance to carry out research on data balance and data enhancement.
[0007] Data balancing methods mainly include oversampling, undersampling and synthetic minority samples (Synthetic Minority Oversampling Technique, SMOTE). Among them, SMOTE is the most classic and widely used data balancing method. It generates new minority data through linear interpolation and increases the number of minority data to balance the distribution of minority data and majority data. SMOTE can effectively alleviate the problem of data imbalance, but the newly generated data may not have practical significance and needs to be optimized in combination with specific application scenarios. Data enhancement (also known as data augmentation) methods transform and expand existing data to generate more new data and improve the training effect and generalization ability of the model. They mainly include data transformation, Generative Adversarial Networks (GAN) and data synthesis. Among them, GAN is the most popular and widely watched data enhancement method. It is essentially a deep learning model. By training a generator and a discriminator, the generator is responsible for generating new data, and the discriminator is responsible for distinguishing between real data and newly generated data. Through the confrontation between the two, the generator can generate new data with a distribution similar to that of real data. GAN can effectively expand the amount of minority class data and improve the model's ability to identify minority class events. In recent years, ensemble learning has become a method to indirectly solve the problems of data imbalance and data scarcity. It integrates multiple machine learning models, fully utilizes the advantages of each model, and improves the overall performance of landslide prediction.
[0008] Some scholars have focused on data balance and data enhancement methods for landslide prediction and have achieved preliminary research results. For example, Zhang et al. proposed an integrated learning model based on dice cross entropy loss function and XGBoost (XGB (DCE)) or optical gradient boosting machine (LGB (DCE)) to improve the class imbalance in the prediction of the susceptibility of specific parts of landslides (SSPL). Hussain et al. introduced a GAN with a multi-layer hybrid model (MLHM) to solve the data imbalance problem of the exclusive landslide database. Al-Najjar et al. developed a new GAN-based method to correct the unbalanced landslide dataset. Sharma et al. developed a probabilistic framework that combines imbalance processing and integrated machine learning for landslide susceptibility mapping. Among them, the combination of one-sided selection and support vector machine synthetic minority supersampling technique (SVM-SMOTE) was used to eliminate class imbalance. Kumar et al. compared various oversampling techniques for landslide datasets, including SMOTE, K-means-SMOTE, boundary SMOTE, and adaptive SMOTE (ADASYN), and demonstrated that the machine learning model trained with K-means-SMOTE achieved the best classification performance.
[0009] Although existing studies have made significant progress in data balancing and data enhancement, there are still some unresolved issues. The first is that feature selection is not performed before data balancing or data enhancement. Most studies directly apply data balancing and data enhancement methods without performing feature selection on the data, which may lead to the impact of redundant features on model performance. Secondly, data balancing and data enhancement are not considered simultaneously. Most studies only use a single data balancing or data enhancement method without combining the advantages of both for comprehensive application. Finally, the screening process of balanced or expanded data is not considered. Most studies directly apply data balancing or data enhancement after data balancing or data enhancement without evaluating and filtering the newly generated data, which may introduce low-quality newly generated data into the data set, affecting the training effect of the model, and thus resulting in poor stability and accuracy of the landslide prediction model. Summary of the invention
[0010] The present invention aims to solve the problem that the existing data balancing and expansion methods may introduce newly generated data of low quality into the data set, thereby resulting in poor stability and accuracy of the landslide prediction model.
[0011] A data balancing method for underground engineering scene landslide prediction, which performs data balancing based on a primary data set determined according to an original data set for underground engineering scene landslide prediction;
[0012] The original data set for underground engineering scene landslide prediction is a data set constructed by taking parameters used for underground engineering scene landslide prediction as features and taking underground engineering scene landslide types as target variables; the primary data set is a data set obtained by performing feature selection on parameters used for underground engineering scene landslide prediction based on the original data set;
[0013] The process of performing data balancing includes the following steps:
[0014] S201, using a classification model to classify the initial data set, counting the minority class data that are misclassified, and constructing an misclassified data set; traversing each data in the misclassified data set, determining whether the data is noise data based on the neighboring data of each data, and deleting the noise data;
[0015] The minority class data refers to a class of data in which the number of data of a certain class in the data set is less than K% of the mean number of data of all classes;
[0016] S202, obtaining a data set where noise data is removed, called a denoised data set, and using K-means clustering to determine the center x of multiple data contained in each minority class in the denoised data set cen_i , i is the serial number of the minority class in the data set;
[0017] S203, calculate the Euclidean distance from multiple data contained in each minority class to the corresponding center j is the serial number of multiple data contained in each minority class; calculate the average Euclidean distance d from the corresponding center of multiple data contained in each minority class mean_i ;
[0018] S204, calculate the Euclidean distance from multiple data contained in each minority class to the corresponding center The average Euclidean distance d mean_i The ratio is
[0019] S205, generate new data using formula (6):
[0020]
[0021] In the formula, For newly generated data, is a data in a minority class, x cen_i for The center of the minority class data, is an improved random number function, representing the random number between 0 and A random number generated between
[0022] S206, repeating step S204 and step S205 until the number of newly generated data is the difference between the mean number of minority class data and the mean number of majority class data in the initial data set, thereby obtaining a data set after data balancing.
[0023] The mean value of the number of majority class data is the average value of the number of majority classes determined according to the number of each class of data in the majority class;
[0024] Furthermore, the process of performing feature selection on parameters for landslide prediction in underground engineering scenarios based on the original data set includes the following steps:
[0025] S101. Based on the features in the original data set, calculate the absolute value of the Pearson correlation coefficient between the features and the target variable, expressed as r i’ , i' represents the serial number of the feature, i' = 1, 2, ..., n, n is the number of features;
[0026] S102, to r i’ Arrange in descending order to get the first round of feature sorting, denoted as F i’ ;
[0027] S103. Calculate the p-value of the feature and the target variable in the original data set, expressed as p i’ ;
[0028] S104, p i’Arrange in ascending order to obtain the second round of feature sorting, denoted as S i’ ;
[0029] S105, the first round of sorting and the second round of sorting of accumulated features, represented by a i’ =F i’ +S i’ ;
[0030] S106, for a i’ Arrange in ascending order to obtain a comprehensive ranking of features, expressed as C i’ ;
[0031] S107, calculate n / 2, expressed as int(n); retain the first int(n) to the first n features respectively, and construct n-int(n)+1 data sets accordingly; use the classifier to perform ten-fold cross validation on each data set respectively, and obtain n-int(n)+1 average classification accuracy; by comparing which data set the classifier has achieved the highest average classification accuracy, it is determined that the data set has the highest quality, and the features it contains are the feature selection results, and the data set with selected features is recorded as the initial data set.
[0032] Furthermore, in the process of comprehensive ranking of features in step S106, when the C i When the same, for F i’ The smaller the feature, the more likely it is that its corresponding C i The smaller, the better.
[0033] Furthermore, in the process of calculating n / 2 in step S107, when n is an odd number, n / 2 is rounded up to an integer and expressed as int(n).
[0034] Furthermore, in the process of determining whether the data is noise data according to the neighboring data of each data in S201, the number of similar data among the five neighboring data of each data is counted. * If K * If it is zero, the data is considered as noise data and deleted.
[0035] Furthermore, in the process of generating new data in S205, a certain data in a certain minority class data is counted. The categories of the five neighboring data, that is, the number of data a in the neighboring data that belongs to the same category as the data; when a ≥ 3, reduce the generation rate of new data; otherwise, increase the generation rate of new data.
[0036] Furthermore, in the process of repeating step S204 and step S205 to generate new data in S206, if the amount of newly generated data is greater than the difference between the mean amount of minority class data and the mean amount of majority class data in the initial data set, the data located at the boundary between the category and other categories is removed from the newly generated data.
[0037] A data enhancement method for predicting landslides in underground engineering scenarios, based on a primary data set determined according to an original data set for predicting landslides in underground engineering scenarios, uses the data balancing method for predicting landslides in underground engineering scenarios to perform data balancing to obtain a first data set, and simultaneously uses a data generation method to generate data for the primary data set to obtain a second data set; and merges the first and second data sets to obtain a data-enhanced data set.
[0038] Furthermore, CGAN is used to generate data in the process of generating data using the data generation method for the initial generation dataset.
[0039] A data synchronization optimization method for underground engineering scene landslide prediction, based on a first-generation data set determined according to an original data set for underground engineering scene landslide prediction, uses the data enhancement method for underground engineering scene landslide prediction to obtain a data-enhanced data set, recorded as a second-generation data set; then synchronous optimization is performed based on the second-generation data set, including the following steps:
[0040] Step 1: Use statistical methods to calculate the same data in the second-generation data set, retain one copy of the same data, remove the redundant data, and record the corresponding data set as the deduplicated data set. The category of each data in the deduplicated data set is called the original category;
[0041] Step 2: Use the classification model to classify the deduplicated data set, count the misclassified data, and construct an misclassified data set; traverse each data in the misclassified data set, count the categories of the five neighboring data of each data, and perform majority voting based on the five categories. The voting category is called the majority category of the data; if the original category of the data is inconsistent with the majority category, the data is considered to be boundary data and deleted;
[0042] Step 3: The deduplicated data set with the boundary data removed is called the transition data set. The number of data in each original category is counted, and the original category with the least amount of data is determined, which is called the reference category. The amount of data it contains is called the reference number, expressed as R_num;
[0043] Step 4: Normalize the transition data set and limit all data to the range of [0,1];
[0044] Step 5: Use K-means clustering to determine the data center x′ of other original categories in the normalized data set except the reference categorycen_i , i is the serial number of the category;
[0045] Step 6: Calculate the Euclidean distance from each data point in each original category except the reference category to the corresponding center j is the serial number of each data in each category of data; according to the Euclidean distance, each data in each category of data is sorted in descending order;
[0046] Step 7: For the data of the original categories other than the reference category in the normalized data set, delete the data with the highest ranking in turn according to the ranking of the multiple data contained in each original category until the number of data in the current category is consistent with R_num;
[0047] Step 8: Output the normalized data set after data filtering, that is, the synchronously optimized data set.
[0048] Beneficial effects:
[0049] The present invention proposes a data balance and data enhancement simultaneous optimization method for landslide prediction in underground engineering scenarios. Through the processing of three stages of feature selection, data balance and data enhancement, and data filtering, a high-quality balanced data set is constructed, which significantly improves the accuracy and reliability of the landslide prediction model. In the feature selection stage, the feature selection method of the newly proposed linear and nonlinear weighted metrics is used to screen the features with strong correlation with the target variable, thereby improving the effectiveness of the data set. In the data balance and data enhancement stage, the newly proposed SK-SMOTE and the CGAN method are used to simultaneously generate high-quality minority class data to construct a balanced data set. In the data filtering stage, the newly proposed normalized distance metric intra-class data filtering method is used to remove duplicate data and boundary data, and the majority class data and the minority class data are balanced again to further optimize the data set quality. Experimental results show that the method proposed in the present invention significantly improves the average classification accuracy of landslide prediction in each stage, and effectively solves the problems of data imbalance and data missing. Compared with the existing data balance and expansion methods, the method of the present invention can effectively improve the quality of the newly generated data, so that the data set performs well in improving the stability and accuracy of the landslide prediction model, and shows a strong application prospect. The research results provide a scientific basis for the safety assessment of future underground projects and the formulation of disaster prevention and control strategies, and promote the further development of landslide prediction technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Schematic diagram of SMOTE principle.
[0051] Figure 2 Schematic diagram of GAN structure.
[0052] Figure 3 This is a processing logic diagram of the present invention.
[0053] Figure 4 Schematic diagram of the CGAN structure.
[0054] Figure 5 It is the average precision, average recall and average F1-score achieved by the machine learning model on the original data set.
[0055] Figure 6 It is the average classification accuracy achieved by the machine learning model on the dataset after feature selection.
[0056] Figure 7 It is the average precision, average recall and average F1-score achieved by the machine learning model on the initial data set.
[0057] Figure 8 is the average classification accuracy achieved by the machine learning model on four datasets.
[0058] Fig. 9 The average precision, average recall, and average F1-score achieved by the machine learning model on the temporary dataset 1.
[0059] Fig.10 The average precision, average recall, and average F1-score achieved by the machine learning model on the temporary dataset 2.
[0060] Fig.11 It is the average precision, average recall and average F1-score achieved by the machine learning model on the second-generation dataset.
[0061] Fig.12 It is the average precision, average recall, and average F1-score achieved by the machine learning model on the transition dataset.
[0062] Fig.13 It is the average precision, average recall and average F1-score achieved by the machine learning model on the final data set. DETAILED DESCRIPTION
[0063] Based on the existing research on landslide prediction using machine learning, and aiming at the deficiencies of the applicable data balancing and data augmentation methods, the present invention proposes a synchronous optimization method for data balancing and data augmentation for landslide prediction in underground engineering scenarios, which specifically includes three stages. The first stage is feature selection. A new feature selection method with linear and non-linear weighted metrics is proposed to screen and retain the features in the original dataset that are strongly correlated with the target variable, remove redundant features, and achieve slimming of the original dataset, laying a foundation for the subsequent stages. The second stage is data balancing and data augmentation, which are carried out synchronously. In terms of data balancing, a new SK-SMOTE method is proposed to identify and remove the noise data in the dataset, adaptively set the generation range of new data, and improve the new data generation formula, so that the number of minority-class data in the dataset is balanced with the number of majority-class data, obtaining a balanced dataset. In terms of data augmentation, a Conditional Generative Adversarial Networks (CGAN) is introduced to solve the problems of overly free modeling process, difficult-to-control training process, and poor quality of generated data in traditional GAM. New high-quality minority-class data is generated, and同样使数据集中少数类数据的数量与多数类数据的数量达到平衡,得到一个平衡数据集。两个平衡数据集融合构建一个新的平衡数据集。第三阶段是数据过滤,新提出一种归一化距离度量的类内数据过滤方法,去除数据集中存在的重复数据和边界数据,重新识别数据集中的少数类数据,并以此为参考过滤其他多数类数据中质量相对较低的数据,依次去除这些数据,直至数据集中少数类数据与其他多数类数据的数量再次平衡。至此得到最终的平衡数据集。 Specific Embodiment 1:
[0065] This embodiment is a synchronous optimization method for data balancing and data augmentation for landslide prediction in underground engineering scenarios. Before specific description, the prior art will be described first.
[0066] SMOTE is a classic oversampling method for dealing with data imbalance problems. It mainly targets the minority-class data in the dataset, uses kNN to calculate the k nearest neighbor data of each minority-class data, and then randomly selects N (N < k) nearest neighbor data of the same class for linear interpolation to obtain N newly generated data. On this basis, it combines the newly generated data with the existing data to construct a new balanced dataset. The principle schematic of SMOTE is as Figure 1 shown, and its algorithm steps are as follows:
[0067] Step 1: Randomly select data x from the minority-class data in the dataset i , and use kNN to calculate k data that are the same class as xi The similar data with close Euclidean distance are called k similar nearest neighbor data.
[0068] Step 2: Randomly select N (N < k) similar nearest neighbor data from the k similar nearest neighbor data, denoted as X j (j = 1, 2, …, N). It should be noted that the value of N is affected by the ratio of the number of minority class data to the number of majority class data.
[0069] Step 3: Use formula (1) to perform linear interpolation between the data x i and the selected similar nearest neighbor data X j to obtain N newly generated data.
[0070]
[0071] In the formula, x i is a certain minority class data, X j is the data randomly selected from the k similar nearest neighbor data, and rand(0, 1) is a random number function.
[0072] Step 4: Randomly select the data x i from the minority class data in the dataset multiple times, and repeat Steps 1 to 3 to obtain multiple newly generated data corresponding to different minority class data. On this basis, merge the newly generated data to construct a new balanced dataset.
[0073] Although SMOTE can handle the data imbalance problem well in most cases, there are still the following disadvantages: First, if there are deviated data or noise data among the randomly selected similar nearest neighbor data, the quality of the newly generated data obtained by linear interpolation therefrom is poor, and new noise data may be introduced, further reducing the quality of the dataset. Second, the newly generated data may be distributed at the edge of the distribution of the existing data in the dataset, resulting in blurred boundaries between different classes of data in the constructed new dataset and increasing the difficulty of data classification. Third, the newly generated data is only obtained by linear interpolation based on two data, and the data generation area range is small, which is prone to overfitting.
[0074] Generative Adversarial Network: GAN is a deep learning model, mainly composed of a generator and a discriminator. Through the adversarial game between the generator and the discriminator, new data similar to the existing data (called real data) is finally generated. Among them, the goal of the generator is to generate data with a distribution similar to the real data. It accepts a randomly generated noise data as input, and generates new data through a series of nonlinear transformations. The training goal of the generator is to make the newly generated data as close to the real data as possible, so as to deceive the discriminator. The goal of the discriminator is to distinguish between real data and newly generated data. It accepts a data as input, and through a series of nonlinear transformations, outputs a probability value, indicating the probability that the data is real data.
[0075] Figure 2 The figure is a schematic diagram of the structure of GAN. Z is randomly generated noise data, which can adopt simple and easy-to-sample distributions such as uniform distribution or multivariate normal distribution. The generator G is a nonlinear mapping function. Z is input into G to generate pseudo data G(Z). In this way, the input of the discriminator D is real data and pseudo data G(Z). If it is judged that both input data are real data, the discriminator outputs 1. If it is judged that there is pseudo data in the two input data, the discriminator outputs 0. In this way, the binary classification judgment of the two input data is achieved. In addition, D will compare whether the labels of the real data and the pseudo data are consistent. If they are inconsistent, the error will be reversely input to G. G generates pseudo data that is closer to the real data by continuously adjusting parameters. As the adversarial game continues, the capabilities of the discriminator and the generator are constantly improved, which brings about an improvement in the quality of the newly generated data.
[0076] Assume that the parameter set of the generator G is θ and the parameter set of the discriminator D is When the discriminator D updates the parameter set, it updates the real For the real data x, the ideal state is that the output of D(x) is 1, that is, we hope The larger the better, E(·) represents the mathematical expectation. z (z), the most ideal state is that the output of D(x) is 0, that is, we hope The larger the better. The objective function that the discriminator D needs to optimize when updating the parameter set is shown in formula (2).
[0077]
[0078] When the generator G updates the parameter set, it is assumed that the probability distribution of the data x generated by the generator G is P g , so that the distribution is P g For data x, the ideal state is that the distribution of data x is infinitely close to the distribution of real data P realThat is, the most ideal state is that D(G(z))=1, P g =P real , The smaller the better. The objective function that the generator G needs to optimize when updating the parameter set is shown in formula (3).
[0079]
[0080] The generator G and the discriminator D are constantly competing against each other, and their capabilities are constantly improved in the process. The overall objective function of GAN is shown in formula (4).
[0081]
[0082] The overall objective function can intuitively show the adversarial game process between the generator G and the discriminator D. When G is fixed to update D, the parameter set of D needs to be updated to maximize the overall objective function. When D is fixed to update G, the parameter set of G needs to be updated to minimize the overall objective function. The adversarial game between the two eventually reaches the Nash equilibrium.
[0083] A large number of practices have proved that GAN can effectively solve the problem of too little data in the data set, but there are problems such as the modeling process is too free, the training process is difficult to control, and the quality of the generated data is poor. In addition, the traditional GAN can only learn one category of data at a time. If the data set contains multiple categories of data, GAN needs to generate each category of data one by one, resulting in a long training time.
[0084] The data balancing and data enhancement simultaneous optimization method for landslide prediction in underground engineering scenarios described in the present invention is as follows: Figure 3 As shown in the figure, it specifically includes four research contents: feature selection, data balance, data enhancement and data filtering, which are sequential processing relationships. Specifically, for the original data set, a new feature selection method of linear and nonlinear weighted measurement is proposed to screen the features that have a significant effect on the classification performance of the classifier, remove redundant features, and construct the first-generation data set. On this basis, on the one hand, an improved SMOTE is proposed to perform data balancing on the first-generation data set to obtain a processed data set, which is called temporary data set 1. On the other hand, a conditional adversarial generative network is used to perform data enhancement on the first-generation data set to obtain a processed data set, which is called temporary data set 2. Temporary data set 1 and temporary data set 2 are merged to obtain the second-generation data set. Finally, a new intra-class data filtering method of normalized distance measurement is proposed to remove duplicate data and boundary data in the second-generation data set, measure the center of the same type of data, and calculate the normalized distance between the single data and the center to remove redundant data until the different types of data are balanced to construct the final data set.
[0085] The specific process is as follows:
[0086] S100, feature selection:
[0087] In machine learning, principal component analysis (PCA), Pearson correlation coefficient and hypothesis testing are often used to carry out feature selection. Among them, PCA maps the high-dimensional feature space corresponding to the original data set to a low-dimensional feature space through linear transformation, while retaining the main information of the original data set as much as possible. In the mapping process of the feature space, PCA finds the principal component direction of the data set by calculating the eigenvalues and eigenvectors of the covariance matrix, thereby constructing a new set of features to replace the original features to re-represent the data set. The Pearson correlation coefficient can evaluate the linear relationship between the features in the original data set, and its value is [-1,1]. The closer the Pearson correlation coefficient of two features is to 0, it means that they have no linear relationship. The closer it is to -1 or 1, that is, the closer the absolute value of the Pearson correlation coefficient is to 1, the stronger their linear relationship is. Usually, we select those features whose absolute value of the Pearson correlation coefficient between each other is close to 1. Hypothesis testing collects sample data from the original data set, calculates statistics, and then uses these sample data to determine to what extent the assumed overall parameters are reliable, and makes a judgment on whether to accept or reject the hypothesis. If the possibility is small, the hypothesis is rejected. If the probability is high, the hypothesis is accepted. Therefore, hypothesis testing can be used to determine whether there is a nonlinear correlation between the feature and the target variable. The p-value is a parameter used to determine the result of the hypothesis test, and its value is [0,1]. The closer the p-value of the feature and the target variable is to 0, the stronger their nonlinear relationship is, and the closer it is to 1, the less nonlinear relationship they have. Usually, we select features whose p-values are close to 0 with the target variable.
[0088] Considering that each feature in the dataset used for landslide prediction in underground engineering scenarios has practical reference significance, they cannot be simply converted into principal components due to the need for feature selection. Therefore, PCA is not suitable for this study. In addition, the Pearson correlation coefficient is usually used to evaluate the linear relationship between features in the original dataset, but features with strong linear relationships often have similarities, and they usually belong to the same domain, such as time domain features. In this way, the features retained by feature selection often have clustering, and the diversity of the original dataset is destroyed. Although the classification performance of the classifier trained on the dataset constructed in this way is improved in the training stage, its generalization performance is greatly damaged. In addition, it is worth noting that few studies currently use the Pearson correlation coefficient to evaluate the linear relationship between features and target variables. Hypothesis testing is usually used to evaluate the linear relationship between features and target variables in the original dataset. Features with strong nonlinear relationships retained by feature selection also have clustering, which will lead to the same problem. More importantly, whether using the Pearson correlation coefficient or hypothesis testing, only linear relationships or nonlinear relationships are evaluated, either one or the other, without considering both linear and nonlinear relationships at the same time, thereby designing a more comprehensive feature selection scheme. In this invention, a new feature selection method of linear and nonlinear weighted measurement is proposed, which uses Pearson correlation coefficient and hypothesis test to evaluate the linear relationship and nonlinear relationship between features and target variables respectively, and designs weighted sorting rules on this basis to give the feature selection results of the original data set. The specific implementation steps are as follows.
[0089] Step 1: Take the parameters used for underground engineering scene landslide prediction as features and the underground engineering scene landslide type as the target variable to construct the original data set; use formula (5) to calculate the absolute value of the Pearson correlation coefficient between the features and the target variable in the original data set, expressed as r i (i=1,2,…,n). Here, i represents the sequence number of the feature.
[0090]
[0091] in, and σX are the characteristics X i The standard score, mean, and standard deviation of and σY are the target variable Y i The standard score, mean, and standard deviation of
[0092] Step 2: i Arrange in descending order to get the first round of feature sorting, denoted as F i (i=1,2,…,n).
[0093] Step 3: Calculate the p-value of the features and target variables in the original data set, expressed as p i (i=1,2,…,n).
[0094] The p-value is used to assess the credibility of the hypothesis test results. The p-value is a decimal between 0 and 1, representing the probability that the given data appears by chance under the hypothesis test. The lower the p-value, the greater the probability of rejecting the null hypothesis.
[0095] Step 4: p i Arrange in ascending order to obtain the second round of feature sorting, denoted as S i (i=1,2,…,n).
[0096] Step 5: The first round and second round of sorting of accumulated features, represented as a i =F i +S i (i=1,2,…,n)
[0097] Step 6: i Arrange in ascending order to obtain a comprehensive ranking of features, expressed as C i (i=1,2,…,n).
[0098] It should be noted that in order to avoid the a i The following provisions are made for situations where the comprehensive ranking is ambiguous. i When the C of multiple features is the same, that is, i When the same, F i The smaller the feature, the higher the corresponding C i The smaller the value, the higher the priority. i =7, S i =3 and F i =4, S i =6a i With C i are the same, but because the latter's F i =4, which is smaller than the former F i =7. Therefore, F i =4, S i =6 is set to a higher priority, its C i Smaller.
[0099] Step 7: Calculate n / 2. When n is an odd number, round n / 2 up to the integer, expressed as int(n). Retain the first int(n) to the first n features, and construct n-int(n)+1 data sets accordingly. Apply a representative classifier to perform ten-fold cross validation on each data set to obtain n-int(n)+1 average classification accuracy. By comparing which data set the classifier has achieved the highest average classification accuracy, it is determined that the data set has the highest quality, and the features it contains are the feature selection results. The data set with the selected features is recorded as the initial data set.
[0100] It should be noted that the experience of feature selection shows that when the number of selected features accounts for more than half of the total number of features, the classifier can achieve a relatively ideal classification accuracy on the data set established by these selected features. Therefore, the first int(n) to the first n features are retained to construct the data set.
[0101] As mentioned above, for the original data set, the initial data set is obtained by using the feature selection method of linear and nonlinear weighted metrics.
[0102] S200, Data Balance:
[0103] At present, many scholars have proposed different improved SMOTEs to solve the problems of traditional SMOTE and have achieved remarkable results in data imbalance processing, such as Cluster-SMOTE, CB-SMOTE, CURE-SMOTE, LR-SMOTE, etc. However, they cannot avoid making the newly generated data distributed in the center of the minority class data in the original data set while generating noise data. Because the closer the data is to the center of the minority class data, the more prominent features of this type of data it has, and the easier it is for the classifier to pay attention to this type of data. In addition, the biggest shortcoming of traditional SMOTE is that when generating new data, the generation range of new data is not clearly defined, and it is only randomly generated between two comparison data. If there is noise data or outlier data in the comparison data, this may cause the newly generated data to be noise data or outlier data as well.
[0104] Therefore, in order to address the above shortcomings, based on the existing research, an improved SMOTE, called SK-SMOTE, is proposed. By limiting the generation range of new data, the quality of the newly generated data is improved, thereby improving the classification performance of the classifier. It first combines SVM and K-means to remove the noise data in the original data set, and then improves the new data generation formula shown in formula (1), extending the traditional SMOTE to generate new data between the selected data and the neighboring data to generate new data on the line connecting the selected data and the neighboring data and its extension line.
[0105] SK-SMOTE mainly includes three parts: denoising, oversampling and filtering. First, SVM is used to classify the primary data set, and the minority class data that is misclassified is counted. Multiple neighboring data of each misclassified minority class data are obtained, and the category of the minority class data is judged according to the category of the neighboring data, thereby judging the noise data in the misclassified minority class data and removing these noise data. It should be noted that in the selection of neighboring data, traditional SMOTE tends to select three neighboring data, but the probability of misclassification in the judgment process is relatively high. In the present invention, five neighboring data are selected, and the category of the minority class data is determined according to their category. After removing the noise data, K-means is used to cluster the minority class data, thereby determining the center of the minority class data. On this basis, the Euclidean distance of each minority class data to the center is calculated, thereby calculating the average Euclidean distance of the minority class data. Finally, the new data is synthesized using the improved new data generation formula. The specific implementation steps are as follows:
[0106] Step 1: Use SVM to classify the initial data set, count the misclassified minority data, and build an misclassified data set. Traverse each data in the misclassified data set and count the number of similar data in the five nearest neighbors of each data K * If K * If it is zero, the data is considered as noise data and deleted.
[0107] Minority class data refers to the number of a certain class of data in the data set that is less than 80% of the average number of all class data, and the class data other than the minority class data in the data set is the majority class data. The minority class data here refers to multiple categories, that is, the number of multiple class data is less than 80% of the average number of all class data.
[0108] Step 2: Get a dataset with noise removed, called a denoised dataset, and use K-means clustering to determine the center x of multiple data contained in each minority class in the denoised dataset. cen_i , i is the serial number of the minority class in the data set, i = 1, 2, ..., m, m is the number of minority classes, m < M, M is the number of all classes.
[0109] Step 3: Calculate the Euclidean distance from multiple data in each minority class to the corresponding center i is the serial number of the minority class, j is the serial number of the multiple data contained in each minority class, j = 1, 2, ..., N, N is the number of data in each minority class. Calculate the average Euclidean distance d of the multiple data contained in each minority class from the corresponding center mean_i .
[0110] Step 4: Calculate the Euclidean distance from multiple data in each minority class to the corresponding center The average Euclidean distance d mean_i The ratio is
[0111] Step 5: Generate new data:
[0112] (1) Count a certain data in a certain minority class The categories of the five neighboring data are the number of data a in the neighboring data that belong to the same category as the data. When a is greater than or equal to 3, it indicates that the minority class data If the data density of the same type is high, the generation rate of new data will be reduced to avoid redundant data. Otherwise, the generation rate of new data will be increased to generate more new data.
[0113] (2) The improved formula for generating new data is shown in formula (6).
[0114]
[0115] In the formula, For newly generated data, is a data in a minority class, x cen_i for The center of the minority class data, is an improved random number function, representing the random number between 0 and A random number generated between .
[0116] Step 6: Repeat steps 4 and 5 until the number of newly generated data is the difference between the mean number of minority class data and the majority class data in the initial data set, where the mean number of majority class data is the average number of majority class data determined based on the number of data in each class in the majority class. If the number of newly generated data is greater than the difference in number, remove the data at the boundary between the class and other classes from the newly generated data until the number of minority class data and the number of majority class data added to the newly generated data is balanced.
[0117] Step 7: Output the data set after data balancing.
[0118] It should be noted that in the process of generating new data, the original random function rand(0,1) is improved to This is because Represents the Euclidean distance from each data point in each minority class to the corresponding center The average Euclidean distance d mean_i In this way, It may be greater than 1 or less than 1. Therefore, the newly generated data may be on the line connecting the selected data and the center, or on the extension of the line, which expands the range of data generation. At the same time, the newly generated data is obtained based on the functional relationship between the selected data and the center, rather than being obtained by random linear interpolation in the minority class data. Therefore, the newly generated data will be closer to the center of the data set rather than the center of the minority class data. In this way, the newly generated data has more characteristics of the minority class data, balancing the classifier's attention to all categories of data.
[0119] As mentioned above, for the first generation dataset, SK-SMOTE is used to obtain temporary dataset 1, which is a balanced dataset.
[0120] S300, data enhancement:
[0121] In order to solve the problems of GAN, CGAN was born. It is a variant of GAN that introduces additional conditional information when generating data. In traditional GAN, the adversarial game between the generator and the discriminator is unconditional, that is, the generator simply generates data from random noise, while the discriminator tries to distinguish between the generated data and the real data. In contrast, CGAN allows users to specify specific conditions for the data to be generated. These conditions can be any form of additional information, such as category labels, text descriptions, images, etc. By inputting conditional information into the generator and the discriminator, CGAN can learn to generate more structured and diverse data under given conditions. CGAN also consists of two parts: the generator and the discriminator. The difference is that the generator receives both random noise and conditional information and generates data that matches the conditions. The discriminator receives both real data and conditional information, or both generated data and conditional information, and then tries to distinguish which data is real and which data is generated.
[0122] Figure 4 The structural diagram of CGAN is given. Both the generator G and the discriminator D add the category label y as input. In the generator G, the random noise p(z) and the conditional information y together form a joint hidden layer representation as input, so that G has the ability to generate multi-class data. The overall objective function of CGAN is shown in formula (7).
[0123]
[0124] As mentioned above, for the first-generation dataset, CGAN is used to obtain temporary dataset 2, which is also a balanced dataset. On this basis, temporary dataset 1 and temporary dataset 2 are merged to construct the second-generation dataset.
[0125] S400, data filtering:
[0126] Whether it is temporary dataset 1 or temporary dataset 2, they are balanced datasets obtained on the basis of the first-generation dataset. That is to say, temporary dataset 1 and temporary dataset 2 have the same data from the first-generation dataset. In other words, there are duplicate data in the second-generation dataset constructed by temporary dataset 1 and temporary dataset 2. These duplicate data will reduce the quality of the dataset and need to be removed. In addition, temporary dataset 1 is a balanced dataset obtained by using SK-SMOTE, and temporary dataset 2 is a balanced dataset obtained by using CGAN, and the methods used are different. This brings about the difference in the distribution of the newly generated minority class data contained in the two balanced datasets. In this way, in the second-generation dataset constructed by temporary dataset 1 and temporary dataset 2, there may be a problem of overlapping distributions of different classes of data due to the expansion of the distribution of the same type of data. That is, there may be data near the boundaries of multiple categories of data in the second-generation dataset, which is called boundary data, and even some data may appear in the range of wrong category data, which will blur the distribution characteristics of the dataset and reduce the quality of the dataset. Therefore, these boundary data also need to be removed. In the initial state, the second-generation dataset constructed by temporary dataset 1 and temporary dataset 2 is a balanced dataset. However, after removing duplicate data and boundary data from the second-generation dataset, there is a difference in the number of different types of data in the dataset, and the second-generation dataset becomes a slightly unbalanced dataset. At this point, if SK-SMOTE or CGAN is used again to generate new data, the quality of these data is difficult to guarantee, because the second-generation dataset itself is a mixed state, not the original single state, and will have a relatively stable and clear data distribution. In this case, it is necessary to use data filtering methods to remove low-quality data from the majority of the data, so that the number of different types of data in the dataset tends to balance again, and obtain a new balanced dataset, that is, the aforementioned final dataset.
[0127] In the present invention, a new method for filtering intra-class data with normalized distance metric is proposed, which mainly includes three parts: deduplication, denoising and rebalancing. First, the repeated data in the statistical data set are counted and removed. On this basis, the data set is classified by SVM, and the wrongly classified data are counted. Multiple neighbor data of each wrongly classified data are obtained. It is judged whether the majority category of the multiple neighbor data is consistent with the category of the wrongly classified data. If the labels are consistent, the data is retained, otherwise the data is removed. The category with the least number of data in the statistical data set is regarded as the reference category, and the number of data contained therein is regarded as the reference number. On this basis, the data set is normalized, and the distribution of each feature is limited to the same range to avoid the excessive distribution of the corresponding data of a certain feature affecting the subsequent distance metric. K-means is used to cluster the data of other categories in the data set respectively to determine the center of the data of each category. On this basis, the Euclidean distance of each data in each category of data to the corresponding center is calculated, and each data is sorted in descending order. Finally, for the other categories in the data set except the reference category, the data with the highest ranking are removed in sequence according to the sorting until the number of data in each category is consistent with the reference number, thereby obtaining a balanced final data set. The specific implementation steps are as follows:
[0128] Step 1: Use statistical methods to calculate the same data in the second-generation data set, retain one copy of the same data, remove the redundant data, and record the corresponding data set as the deduplicated data set. The category of each data in the deduplicated data set is called the original category.
[0129] Step 2: Use SVM to classify the deduplicated data set, count the misclassified data, and construct an misclassified data set. Traverse each data in the misclassified data set, count the categories of the five neighboring data of each data, and perform majority voting based on the five categories. The voting category is called the majority category of the data; if the original category of the data is inconsistent with the majority category, the data is considered to be boundary data and deleted.
[0130] Step 3: Obtain a deduplicated data set with boundary data removed, called a transition data set, count the number of data in each original category, and determine the original category with the least amount of data, called the reference category. The amount of data it contains is called the reference number, denoted as R_num.
[0131] Step 4: Perform min-max normalization on the transition data set, scale the data corresponding to each feature proportionally, and limit all of them to the range of [0,1] to obtain a normalized data set.
[0132] Step 5: Use K-means clustering to determine the data center x′ corresponding to other original categories in the normalized data set except the reference category cen_i, i is the serial number of the category.
[0133] Step 6: Calculate the Euclidean distance from each data point in each original category except the reference category to the corresponding center j is the serial number of each data in each category of data; according to the Euclidean distance, each data in each category of data is sorted in descending order.
[0134] Step 7: For the data of other original categories except the reference category in the normalized data set, delete the data with the highest ranking in turn according to the ranking of multiple data contained in each original category until the number of data in the current category is consistent with R_num.
[0135] Step 8: Output the normalized data set after data filtering, which is called the final data set.
[0136] As mentioned above, for the second-generation dataset, the intra-class data filtering method using the normalized distance metric is used to obtain the final dataset, which is a balanced dataset.
[0137] Example
[0138] Taking the landslide monitoring data actually collected in underground engineering as an example, an unbalanced data set is constructed, and the data balancing and data enhancement synchronous optimization method proposed in the present invention is used to process it, and the processing effects obtained in each stage are statistically analyzed, and finally a balanced data set is constructed to fully verify the feasibility and practicality of the method proposed in the present invention. In addition, the method proposed in the present invention is compared with the existing data balancing and data enhancement methods to fully verify its superiority.
[0139] 1 Dataset
[0140] In the early stage, a set of parameter acquisition terminals were developed and placed on slopes at different locations in underground projects to collect relevant parameters of the slopes, including: inclination angle, surface displacement, horizontal displacement, vertical displacement, water pressure, soil deformation, soil stress, soil moisture, soil temperature, shear strength and conductivity, a total of 11 related parameters, called 11 features. In this way, during the operation of the parameter acquisition terminal, each acquisition will obtain the values of 11 related parameters and form a piece of data. Multiple acquisitions will eventually obtain multiple pieces of data. According to the actual needs of landslide prediction in underground engineering scenarios, these data are divided into four categories, including: normal, small soil erosion, soil erosion and landslide, quantified into four labels of "0", "1", "2" and "3", and corresponding labels are added to these data. Taking an underground project in a province in southern China as an example, a large amount of data was collected using the parameter acquisition terminal from April to October 2023, and the above labels were added to the data according to the actual situation, and an original data set was constructed, which is actually an unbalanced data set. Its detailed description is shown in Table 1.
[0141] Table 1 Detailed description of the original dataset
[0142]
[0143] As can be seen from the table, the original data set contains a total of 6486 data, among which the data labeled "0" is the largest, and the data labeled "3" is the least, and the number of the former is almost three times that of the latter. In addition, the number of data labeled "1" and "2" is only about half of the number of data labeled "0", but significantly more than the data labeled "3". This shows that the original data set has serious data imbalance and data missing problems, and is suitable for verifying the method proposed in the present invention.
[0144] Generally, machine learning models are divided into two types: those based on mathematical theory and those based on tree structure. In addition, as an important branch of machine learning, deep learning models are also an important part of machine learning models and are regarded as the third type. In the present invention, three representative machine learning models are selected respectively, including: SVM, random forest and one-dimensional convolutional neural network (1D-CNN). Considering that the original data set contains four labels, the radial basis function (RBF) is introduced for the support vector machine, thereby constructing the RBF-SVM. RBF-SVM, random forest and 1D-CNN were respectively applied to carry out ten-fold cross validation on the original data set, and their average classification accuracy was calculated respectively, which was 72.06%, 71.75% and 65.29%. At the same time, the average precision, average recall and average F1-score obtained by the three machine learning models on the data of each label in the original data set were calculated respectively, as shown in FIG. Figure 5 shown.
[0145] As can be seen from the figure, the three machine learning models all achieved the largest average precision, average recall and average F1-score on the data labeled "0", and all achieved the smallest average precision, average recall and average F1-score on the data labeled "3", and the differences were large. As we all know, the average classification accuracy is the classification effect achieved by the machine learning model on all the data in the data set. It is an overall level and does not show the details inside the data set. The average precision, average recall and average F1-score are the classification effects achieved by the machine learning model on the data of each label in the data set. They are closely related to the quantity and quality of the data of each label and can reflect the details inside the data set. Therefore, the average precision, average recall and average F1-score are the basis of the average classification accuracy. The larger and more balanced the average precision, average recall and average F1-score achieved by the machine learning model on the data of each label in the data set, the higher and more stable the average classification accuracy they achieve. This fully demonstrates the necessity of conducting this study.
[0146] 2 Feature Selection
[0147] The first stage is feature selection. The original data set is processed using linear and nonlinear weighted feature selection methods, and the Pearson correlation coefficients and p-values of the 11 features and the target variable (i.e., label) are calculated. Their first round ranking, second round ranking, and comprehensive ranking are statistically analyzed, as shown in Table 2.
[0148] Table 2 Feature selection process of the original data set
[0149]
[0150] As can be seen from the table, the cumulative rankings of "tilt angle" and "soil moisture" are the same, and the cumulative rankings of "water pressure", "shear strength" and "conductivity" are the same. Referring to the provisions made in step 6 of feature selection, their undisputed comprehensive rankings are given with reference to the first ranking. At the same time, referring to step 7 of feature selection, the first 6 to the first 11 features are retained respectively, 6 data sets are constructed respectively, and three machine learning models are applied to the data sets for ten-fold cross validation respectively, and their average classification accuracy is calculated respectively, as shown in the figure below: Figure 6 shown.
[0151] As can be seen from the figure, RBF-SVM and random forest both achieved the highest average classification accuracy on the dataset with 9 features retained, and the advantages were obvious. 1D-CNN achieved the highest average classification accuracy on the dataset with 10 features retained, but it was close to the average classification accuracy achieved on the dataset with 9 features retained, with a difference of only 0.01%. Therefore, after comprehensive consideration, it was determined that the dataset with 9 features retained had the highest quality, and the first 9 features retained were the first 9 features in the comprehensive ranking shown in Table 2, which is the feature selection result. Thus, the first generation dataset was constructed.
[0152] In summary, RBF-SVM, random forest and 1D-CNN were used to carry out ten-fold cross validation on the initial data set, and their average classification accuracy was calculated to be 72.22%, 72.25% and 65.35%, respectively. It can be seen that compared with the average classification accuracy of 72.06%, 71.75% and 65.29% achieved by the three machine learning models on the original data set, they have increased by 0.16%, 0.50% and 0.06%, respectively, which is a significant improvement. This effectively illustrates the necessity of carrying out feature selection, which can preliminarily remove redundant features in the data set, slim down the data set, and lay a good foundation for subsequent data balancing and data enhancement. At the same time, the average precision, average recall and average F1-score of the three machine learning models on the data of each label in the initial data set are calculated, as shown below: Figure 7 shown.
[0153] As can be seen from the figure, the three machine learning models still achieve the highest average precision, average recall and average F1-score on the data labeled "0", and the lowest average precision, average recall and average F1-score on the data labeled "3", but the difference has decreased to a certain extent. This shows that feature selection not only improves the classification effect of machine learning models on the data set, but also improves their classification effect on the data of each label in the data set. At the same time, compared with Figure 5 The average precision, average recall and average F1-score of the three machine learning models on the data with four labels have all increased, and none of them have decreased. In particular, the average precision, average recall and average F1-score on the data with label "3" have increased significantly. This effectively illustrates the feasibility and practicality of feature selection.
[0154] 3. Data Balance and Data Enhancement
[0155] The second stage is data balancing and data enhancement. On the basis of the first-generation dataset, on the one hand, SK-SMOTE is used for processing to balance the three minority class data and the majority class data, that is, the newly generated data with labels "1", "2" and "3", so that their number is consistent with the number of data with label "0". On the other hand, CGAN is used for processing to generate data with four labels until their number is 2600. Thus, temporary dataset 1 and temporary dataset 2 are obtained respectively. Among them, temporary dataset 1 contains 10120 data, and the number of data for each label is 2530. Temporary dataset 2 contains 10400 data, and the number of data for each label is 2600. On this basis, the second-generation dataset is constructed, which contains 20520 data, and the number of data for each label is 5130. RBF-SVM, random forest and 1D-CNN are used to carry out ten-fold cross validation on temporary dataset 1, temporary dataset 2 and the second-generation dataset respectively, and their average classification accuracy is calculated respectively, and compared with their average classification accuracy obtained on the first-generation dataset, as shown in the figure. Figure 8 shown.
[0156] As can be seen from the figure, the average classification accuracy achieved by the three machine learning models on the first-generation data set, temporary data set 1, temporary data set 2 and second-generation data set is comparable, and the difference is not large. Specifically, the average classification accuracy achieved by the three machine learning models on temporary data set 1, temporary data set 2 and second-generation data set is only slightly higher than the average classification accuracy achieved on the first-generation data set, which illustrates the feasibility and practicality of data balancing and data enhancement. It is worth noting that the average classification accuracy achieved by the three machine learning models on temporary data set 1 is higher than the average classification accuracy achieved on temporary data set 2, which shows that the quality of the data generated by SK-SMOTE is better than CGAN, which effectively illustrates the feasibility and superiority of SK-SMOTE proposed in the present invention. In fact, this illustrates the great potential for conducting data balancing or data enhancement research from a mathematical perspective. In addition, the average classification accuracy achieved by the three machine learning models on the second-generation data set is higher than the average classification accuracy achieved on temporary data set 2, but lower than the average classification accuracy achieved on temporary data set 1. This shows that there is a large proportion of duplicate data in the second-generation data set, so that the combination of temporary data set 1 and temporary data set 2 fails to produce the effect of one plus one greater than two, but instead achieves the effect of one plus one less than one, which shows the necessity of carrying out the third stage of data filtering proposed by the present invention. At the same time, the average precision, average recall and average F1-score of the three machine learning models on the data of each label in temporary data set 1, temporary data set 2 and the second-generation data set are calculated respectively, as shown in FIG. Figures 9 to 11 shown.
[0157] It can be seen from the figure that compared with Figure 5 and Figure 7 , whether on temporary dataset 1, temporary dataset 2 or the second-generation dataset, the differences in average precision, average recall and average F1-scores of the three machine learning models on the data of the four labels are significantly reduced. This shows that after data balancing and data enhancement, the data imbalance and data missing problems in the first-generation dataset, including the original dataset, are effectively alleviated. Figure 8 The average classification accuracy of the three machine learning models on temporary dataset 1, temporary dataset 2, and the second-generation dataset is not significantly higher than that on the first-generation dataset, but their average precision, average recall, and average F1-score on the four labels all have obvious advantages. In particular, their average precision, average recall, and average F1-score on the data labeled "2" and "3" have improved significantly, and are closer to the average precision, average recall, and average F1-score on the data labeled "0" and "1". Therefore, we have reason to believe that the average classification accuracy of the three machine learning models on temporary dataset 1, temporary dataset 2, and the second-generation dataset is not only superior in magnitude, but also more stable because their foundations are more balanced. This effectively illustrates the feasibility and practicality of conducting data balancing and data enhancement.
[0158] 4. Data Filtering
[0159] The third stage is data filtering. Based on the second-generation data set, the repeated data in the data set are counted and removed. On this basis, the number of data with each label in the data set is re-counted. Specifically, the number of data with label "0" is 2600, the number of data with label "1" is 3317, the number of data with label "2" is 3902, and the number of data with label "3" is 4215. Referring to the original data set, that is, Table 1, the number of data with label "0" is 2530, the number of data with label "1" is 1813, the number of data with label "2" is 1228, and the number of data with label "3" is 915. It can be found that the number of minority class data in the original data set has been greatly increased, but the increase in the number of majority class data is limited. This seems to cause the problem of data imbalance again, but this is not entirely correct. Because the current majority class data is generated on the basis of the original minority class data, the quality of the newly generated large amount of data is not high, and there may be boundary data and impurity data. On the contrary, the current minority class data is generated based on the original majority class data. The newly generated small amount of data is of higher quality, and most of it is valid data. In summary, one has a quantitative advantage, the other has a quality advantage, and neither has an absolute advantage.
[0160] The dataset from which duplicate data is removed is called the transition dataset. In fact, the transition dataset is also a dataset obtained by using data balancing and data enhancement at the same time in a narrow sense. RBF-SVM, random forest and 1D-CNN were applied to the transition dataset for ten-fold cross validation, and their average classification accuracies were calculated to be 72.46%, 72.53% and 65.56% respectively. Compared with the average classification accuracies of the three machine learning models on temporary dataset 1, temporary dataset 2 and the second-generation dataset, the highest average classification accuracies of 72.34%, 72.39% and 65.54% on temporary dataset 1 were achieved, which were increased by 0.12%, 0.14% and 0.02% respectively, with a significant increase. Temporary dataset 1 was constructed by carrying out data balancing alone, temporary dataset 2 was constructed by carrying out data enhancement alone, the second-generation dataset was constructed by carrying out data balancing and data enhancement at the same time in a broad sense, and the transition dataset was constructed by carrying out data balancing and data enhancement at the same time in a narrow sense. The three machine learning models all achieved the highest average classification accuracy on the transition dataset, which effectively illustrates the feasibility and necessity of the simultaneous data balancing and data enhancement proposed by the present invention. At the same time, the average precision, average recall and average F1-score of the three machine learning models on the data of each label in the transition dataset are calculated respectively, as shown in Figure 2. Fig.12 shown.
[0161] It can be seen from the figure that compared with Figures 9 to 11 The average precision, average recall and average F1-score of the three machine learning models on the data of the four labels of the temporary data set 1, temporary data set 2 and the second-generation data set, and the average precision, average recall and average F1-score of the three machine learning models on the data of the four labels of the transition data set are further reduced. This shows that the data imbalance and data missing problems in the transition data set are further alleviated. This effectively illustrates the superiority of the simultaneous data balancing and data enhancement proposed by the present invention.
[0162] Furthermore, SVM is used to classify the transition data set and count the misclassified data. On this basis, the majority categories of the five neighboring data of each misclassified data are counted to determine whether the label of the misclassified data is consistent with the majority category, thereby identifying the boundary data in the transition data set and removing these boundary data. The number of data of each label in the data set is recounted. Specifically, the number of data with label "0" is 2578, the number of data with label "1" is 3235, the number of data with label "2" is 3766, and the number of data with label "3" is 3943. In this way, the label "0" is identified as the reference category, and the number of data with label "0" is identified as the reference number. Referring to steps 3 to 7 in Section 3.4, the data with labels "1", "2" and "3" are filtered, and the number of data with the four labels output is 2578, thereby constructing the final data set. RBF-SVM, random forest and 1D-CNN were used to conduct ten-fold cross validation on the final dataset, and their average classification accuracy was calculated to be 72.73%, 73.04% and 65.67% respectively. Table 3 lists the average classification accuracy of the three machine learning models on the original dataset, the first-generation dataset, the second-generation dataset and the final dataset.
[0163] Table 3 Average classification accuracy of machine learning models on different data sets
[0164]
[0165] As can be seen from the table, the average classification accuracy of the three machine learning models on the original data set, the first-generation data set, the second-generation data set and the final data set has gradually improved, and the improvement is obvious, which means that the method proposed in the present invention has achieved the expected processing effect at each stage. After calculation, compared with the average classification accuracy of the three machine learning models on the original data set, their average classification accuracy on the final data set has increased by 0.67%, 1.29% and 0.38% respectively, and the improvement is significant, which effectively illustrates the feasibility and practicality of the method proposed in the present invention. At the same time, the average precision, average recall and average F1-score of the three machine learning models on the data of each label in the final data set are calculated respectively, as shown in Figure 2. Fig.13 shown.
[0166] It can be seen from the figure that compared with Figure 5 , Figure 7 and Fig.11The average precision, average recall and average F1-score of the three machine learning models on the data of the four labels of the original dataset, the first-generation dataset and the second-generation dataset are balanced, and there is almost no difference between the average precision, average recall and average F1-score of the three machine learning models on the data of the four labels of the final dataset. This shows that the data imbalance and data missing problems in the original dataset are effectively solved. On the one hand, the number of data of the four labels in the final dataset is balanced, and on the other hand, the average precision, average recall and average F1-score of the three machine learning models on the data of the four labels of the final dataset are balanced. This effectively illustrates the necessity and superiority of the proposed method.
[0167] 5. Comparative Analysis
[0168] The original data set is processed by the existing data balancing and data enhancement methods, thereby constructing multiple data sets, and RBF-SVM, random forest and 1D-CNN are respectively applied to these data sets to carry out ten-fold cross validation, and the average classification accuracy they obtain is counted, and their processing effects on the original data set are analyzed for comparison with the method proposed in the present invention to verify the superiority of the method proposed in the present invention. Specifically, SMOTE, Cluster-SMOTE, LR-SMOTE, SK-SMOTE, GAN and CGAN are selected respectively, and the original data set is processed for data balancing or data enhancement, so that the number of data labeled "1", "2" and "3" is consistent with the number of data labeled "0", which is 2530, thereby constructing six data sets, respectively referred to as: comparison data set 1, comparison data set 2, comparison data set 3, comparison data set 4, comparison data set 5 and comparison data set 6. RBF-SVM, random forest and 1D-CNN are respectively applied to carry out ten-fold cross validation on the six comparison data sets, and the average classification accuracy they obtain is counted, and compared with the average classification accuracy obtained on their final data sets, as shown in Table 4.
[0169] Table 4 Average classification accuracy of machine learning models on multiple datasets
[0170]
[0171]
[0172] As can be seen from the table, the three machine learning models have the highest average classification accuracy on the final data set, which is significantly higher than the average classification accuracy they have achieved on the six comparison data sets. This shows that the quality of the final data set processed by the method proposed in the present invention is higher than the quality of the comparison data sets processed by the other six data balancing or data enhancement methods, which effectively illustrates the superiority of the method proposed in the present invention over the existing data balancing and data enhancement methods. It is worth noting that compared with the average classification accuracy of 72.34%, 72.39% and 65.54% achieved by the three machine learning models on the temporary data set 1 in Section 4.3, the average classification accuracy they achieved on the comparison data set 4 was 72.28%, 72.36% and 65.42%, and the average classification accuracy achieved by the former was higher. Compared with the classification accuracy of 72.29%, 72.31% and 65.52% achieved by the three machine learning models on the temporary data set 2 in Section 4.3, the average classification accuracy they achieved on the comparison data set 6 was 72.25%, 72.29% and 65.47%, and the average classification accuracy achieved by the former was also higher. A careful analysis shows that there is a lack of feature selection between temporary dataset 1 and comparison dataset 4, and between temporary dataset 2 and comparison dataset 6. This actually effectively illustrates the necessity of feature selection in Section 4.2.
[0173] In addition, the average precision, average recall and average F1-score deviations of the three machine learning models on the data of the four labels of the six comparison data sets and the final data set are calculated and counted, as shown in Table 5. The sum of deviations represents the sum of the differences between each data in a set of data and the mean.
[0174] In the process of carrying out the research of the present invention, it is necessary to use performance evaluation indicators to evaluate the effect of ten-fold cross validation of the machine learning model. The performance evaluation indicators used mainly include classification accuracy, precision, recall and F1-score.
[0175] Assume that the data set is d = {(x1,y1),(x2,y2),…,(x n ,y n )}, where y i is the data x i The true label, R(x i ) is the predicted label given by the machine learning model R. The classification accuracy is expressed as the ratio of the number of data with correct label prediction to the total number of data. Its calculation formula is as follows:
[0176]
[0177] Where I is the indicator function. When R(x i )=yi When I(R(x i )=y i )=1.
[0178] In addition, Precision, Recall, and F1-score can evaluate the classification effect of the machine learning model on the data of a certain label in the data set. Among them, Precision indicates the proportion of data predicted as positive that is truly positive. Recall indicates the proportion of positive data in the data that is correctly predicted. F1-score is an organic combination of the two.
[0179] Table 6 gives the confusion matrix of the binary classification results. The calculation formulas for Precision, Recall and F1-score are as follows:
[0180]
[0181] Table 5. The sum of the deviations of the average precision, average recall, and average F1-scores achieved by the machine learning model on the data of four labels in multiple datasets.
[0182]
[0183] As can be seen from the table, the three machine learning models still achieve the smallest sum of deviations of average precision, average recall and average F1-score on the final data set. In statistics, a group of data with a smaller sum of deviations indicates that this group of data is more balanced and has less differences. Therefore, the smaller the sum of deviations of average precision, average recall and average F1-score, the more balanced the average precision, average recall and average F1-score obtained by the three machine learning models on the four labels in the final data set. This shows that the data imbalance and data missing problems in the original data set are effectively solved, and the quantity and quality of the data in the final data set are more balanced. Therefore, the feasibility, practicality and superiority of the method proposed in the present invention are fully demonstrated.
[0184] Table 6 Confusion matrix of binary classification results
[0185]
[0186] The above calculation examples of the present invention are only used to explain the calculation model and calculation process of the present invention in detail, and are not intended to limit the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.
Claims
1. A data balancing method for landslide prediction in underground engineering scenarios, characterized in that: Data balancing is performed based on the primary data set determined from the original data set of landslide prediction in underground engineering scenarios; The original data set for underground engineering scene landslide prediction is a data set constructed by taking parameters for underground engineering scene landslide prediction as features and taking underground engineering scene landslide types as target variables; The primary data set is a data set obtained by performing feature selection on parameters used for landslide prediction in underground engineering scenarios based on the original data set; The process of performing data balancing includes the following steps: S201, using a classification model to classify the initial data set, counting the minority class data that are misclassified, and constructing an misclassified data set; traversing each data in the misclassified data set, determining whether the data is noise data based on the neighboring data of each data, and deleting the noise data; The minority class data refers to a class of data in which the number of data of a certain class in the data set is less than K% of the mean number of data of all classes; S202, obtaining a data set where noise data is removed, called a denoised data set, and using K-means clustering to determine the center x of multiple data contained in each minority class in the denoised data set cen_i , i is the serial number of the minority class in the data set; S203, calculate the Euclidean distance from multiple data contained in each minority class to the corresponding center j is the serial number of multiple data contained in each minority class; calculate the average Euclidean distance d from the corresponding center of multiple data contained in each minority class mean_i ; S204, calculate the Euclidean distance from multiple data contained in each minority class to the corresponding center The average Euclidean distance d mean_i The ratio is denoted as P i j ; S205, generate new data using formula (6): In the formula, For newly generated data, is a data in a certain minority class, x cen_i for The center of the minority class data, rand(0,P i j ) is an improved random number function, representing the random number between 0 and P i j A random number generated between S206, repeating step S204 and step S205 until the number of newly generated data is the difference between the mean number of minority class data and the mean number of majority class data in the initial data set, thereby obtaining a data set after data balancing. The majority class data quantity mean is the average value of the majority class quantity determined according to the quantity of each class of data in the majority class.
2. A data balancing method for landslide prediction in underground engineering scenarios according to claim 1, characterized in that: The process of feature selection of parameters for landslide prediction in underground engineering scenarios based on the original data set includes the following steps: S101. Based on the features in the original data set, calculate the absolute value of the Pearson correlation coefficient between the features and the target variable, expressed as r i’ , i' represents the serial number of the feature, i' = 1, 2, ..., n, n is the number of features; S102, to r i’ Arrange in descending order to get the first round of feature sorting, denoted as F i’ ; S103. Calculate the p-value of the feature and the target variable in the original data set, expressed as p i’ ; S104, p i’ Arrange in ascending order to obtain the second round of feature sorting, denoted as S i’ ; S105, the first round of sorting and the second round of sorting of accumulated features, represented by a i’ =F i’ +S i’ ; S106, for a i’ Arrange in ascending order to obtain a comprehensive ranking of features, expressed as C i’ ; S107, calculate n / 2, expressed as int(n); retain the first int(n) to the first n features respectively, and construct n-int(n)+1 data sets accordingly; use the classifier to perform ten-fold cross validation on each data set respectively, and obtain n-int(n)+1 average classification accuracy; by comparing which data set the classifier has achieved the highest average classification accuracy, it is determined that the data set has the highest quality, and the features it contains are the feature selection results, and the data set with selected features is recorded as the initial data set.
3. A data balancing method for landslide prediction in underground engineering scenarios according to claim 2, characterized in that: In the process of comprehensive sorting of features in step S106, when the C of multiple features i When the same, for F i’ The smaller the feature, the more likely it is that its corresponding C i The smaller, the better.
4. The data balancing method for landslide prediction in underground engineering scenarios according to claim 2 is characterized in that: In the process of calculating n / 2 in step S107, when n is an odd number, n / 2 is rounded up to an integer and expressed as int(n).
5. The data balancing method for landslide prediction in underground engineering scenarios according to claim 1 is characterized in that: S201 is a process of determining whether the data is noise data according to the neighboring data of each data. The number of similar data K in the five neighboring data of each data is counted. * ; if K * If it is zero, the data is considered as noise data and deleted.
6. The data balancing method for landslide prediction in underground engineering scenarios according to claim 1 is characterized in that: In the process of generating new data in S205, count a certain data in a certain minority class data The categories of the five neighboring data, that is, the number of data a in the neighboring data that belongs to the same category as the data; when a ≥ 3, reduce the generation rate of new data; otherwise, increase the generation rate of new data.
7. The data balancing method for landslide prediction in underground engineering scenarios according to claim 1, characterized in that: In the process of repeating step S204 and step S205 to generate new data in S206, if the amount of newly generated data is greater than the difference between the mean amount of minority class data and the mean amount of majority class data in the initial data set, the data located at the boundary between the category and other categories are removed from the newly generated data.
8. A data enhancement method for landslide prediction in underground engineering scenarios, characterized in that: Based on a primary data set determined according to an original data set for predicting landslides in underground engineering scenarios, a data balancing method for predicting landslides in underground engineering scenarios as described in any one of claims 1 to 7 is used to perform data balancing to obtain a first data set, and at the same time, a data generation method is used to generate data for the primary data set to obtain a second data set; the first and second data sets are merged to obtain a data enhanced data set.
9. The data enhancement method for landslide prediction in underground engineering scenarios according to claim 8, characterized in that: In the process of generating data using the data generation method for the initial data set, CGAN is used to generate data.
10. A data synchronization optimization method for landslide prediction in underground engineering scenarios, characterized in that: Based on the first-generation data set determined according to the original data set for predicting landslides in underground engineering scenarios, a data enhancement method for predicting landslides in underground engineering scenarios according to claim 8 or 9 is used to obtain a data-enhanced data set, which is recorded as a second-generation data set; then synchronous optimization is performed based on the second-generation data set, including the following steps: Step 1: Use statistical methods to calculate the same data in the second-generation data set, retain one copy of the same data, remove the redundant data, and record the corresponding data set as the deduplicated data set. The category of each data in the deduplicated data set is called the original category; Step 2: Use the classification model to classify the deduplicated data set, count the misclassified data, and construct an misclassified data set; traverse each data in the misclassified data set, count the categories of the five neighboring data of each data, and perform majority voting based on the five categories. The voting category is called the majority category of the data; if the original category of the data is inconsistent with the majority category, the data is considered to be boundary data and deleted; Step 3: The deduplicated data set with the boundary data removed is called the transition data set. The number of data in each original category is counted, and the original category with the least amount of data is determined, which is called the reference category. The amount of data it contains is called the reference number, expressed as R_num; Step 4: Normalize the transition data set and limit all data to the range of [0,1]; Step 5: Use K-means clustering to determine the data center x′ of other original categories in the normalized data set except the reference category cen_i , i is the serial number of the category; Step 6: Calculate the Euclidean distance from each data point in each original category except the reference category to the corresponding center j is the serial number of each data in each category of data; according to the Euclidean distance, each data in each category of data is sorted in descending order; Step 7: For the data of the original categories other than the reference category in the normalized data set, delete the data with the highest ranking in turn according to the ranking of the multiple data contained in each original category until the number of data in the current category is consistent with R_num; Step 8: Output the normalized data set after data filtering, that is, the synchronously optimized data set.