A method and system for oversampling for engine assembly data augmentation
By improving the SMOTE algorithm, samples that cause boundary ambiguity and anomalies are removed, solving the distribution problem of unbalanced datasets and improving the accuracy of engine assembly data analysis.
Patent Information
- Application Number
- CN202210263902.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-03-17
AI Technical Summary
The existing SMOTE algorithm is prone to marginalization when dealing with imbalanced datasets, and cannot effectively overcome the uneven distribution of data, thus increasing the difficulty of classification.
By improving the SMOTE algorithm, a step was added to remove samples with blurred class boundaries and abnormal data points. This step identifies and removes samples that cause blurred boundaries and abnormalities. Euclidean distance and binary splitting methods are used for sample screening to maintain the balance of the dataset.
It effectively solves the problem of distribution marginalization, maintains the balance of the dataset, and improves the classification accuracy and uniformity of the dataset.
Smart Images

Figure CN114626549B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of engine assembly data analysis, and particularly relates to a method and system for engine assembly data enhancement oversampling. BACKGROUND
[0002] When using a machine learning algorithm, a certain amount of data set is needed as model training support. If the sample sparsity problem is serious, the source data set is usually data augmented to expand the sample to a certain amount. Engine assembly is a complex and time-consuming work, and the assembly time is long and the process is complex. The number of assembly samples generated in a short time is extremely limited. When analyzing engine assembly data, due to the lack of sample amount, it is often difficult to effectively extract data rules, which is also a typical small sample problem, and the source data set needs to be preprocessed through data augmentation.
[0003] Oversampling is a common strategy for researchers to implement data augmentation, and one of the methods used more is the minority class sample synthesis oversampling technology SMOTE algorithm. The SMOTE oversampling algorithm is an improved scheme based on the random oversampling algorithm. Since the random oversampling takes the strategy of simply copying the sample to increase the minority class sample, it is easy to produce the problem of model overfitting, and the basic idea of the SMOTE algorithm is to analyze the sample and artificially synthesize new samples to add to the data set in an interpolation manner. Take any sample x q in the data set of a certain class as the research object, calculate its distance to all samples in the same class set based on the Euclidean distance, and get its k-nearest neighbors. Determine the sampling rate N, randomly select N samples from the k-nearest neighbors, and record them as set Z = {z1, z2, …, z N}, for each randomly selected neighbor z i , respectively, and the original sample x q According to the following formula to construct a new sample:
[0004] x new = x q + rand(0, 1) * (z i -x q )
[0005] The SMOTE algorithm has certain defects and cannot overcome the data distribution problem of the unbalanced data set and is prone to distribution marginalization. The unbalanced data set refers to a data set in which the number of positive samples and negative samples differs by more than two times. The data distribution problem of the unbalanced data set refers to that the data distribution of the unbalanced data set is uneven, for example, the area of the positive samples is very dense, and the area of the negative samples is very sparse. When the SMOTE algorithm oversamples the data set, the number of positive samples and negative samples is expanded by the same multiple, for example, if the number ratio of positive samples and negative samples in the source data set is 1:10, then the ratio is still 1:10 after expansion, and therefore the data distribution problem of the unbalanced data set cannot be solved. Since the distribution of samples determines the selectable neighbors, if a sample is at the distribution edge of the sample set of the category to which it belongs, the new sample generated from the sample and the neighboring sample will also be at the edge and will be more and more marginalized, thereby blurring the boundary between the sample of the category and the sample of the different category, and making the boundary more and more blurred, and increasing the difficulty of classification by the classification algorithm.
[0006] In summary, how to solve the distribution marginalization problem caused by the principle (random interpolation to generate new samples) of the SMOTE algorithm and how to overcome the data distribution problem of the unbalanced data set have become problems to be solved by those skilled in the art. SUMMARY
[0007] The purpose of the present application is to provide an oversampling method and system for engine assembly data enhancement to solve the distribution marginalization problem and overcome the data distribution problem of the unbalanced data set.
[0008] To achieve the above-mentioned purpose, the present application provides the following solutions.
[0009] An oversampling method for engine assembly data enhancement, the method comprising:
[0010] obtaining a source data set; the source data set comprising a plurality of engine assembly samples and a vibration label corresponding to each of the engine assembly samples; the engine assembly sample comprising all assembly process features in the engine assembly process; the vibration label comprising vibration out-of-tolerance and vibration qualification;
[0011] oversampling the source data set by using a SMOTE oversampling algorithm to generate a plurality of new engine assembly samples;
[0012] updating the source data set with all the new engine assembly samples to obtain a first sample set; the first sample set comprising the source data set and all the new engine assembly samples;
[0013] Based on the first sample set and each of the new engine assembly samples, each first sample to be eliminated is determined; the first sample to be eliminated is the new engine assembly sample that causes ambiguity in the sample category boundary; the sample category includes positive samples and negative samples;
[0014] Remove all the first samples to be removed from the first sample set, update the first sample set, and obtain the second sample set; the second sample set includes the first sample set after removing all the first samples to be removed;
[0015] All the new engine assembly samples in the second sample set are randomly segmented according to different feature values to determine each second sample to be removed; the second sample to be removed is the new engine assembly sample with abnormal data points; the feature value is the data value of the assembly process feature;
[0016] Remove all the second samples to be removed from the second sample set, update the second sample set, and obtain the third sample set; the third sample set includes the second sample set after removing all the second samples to be removed.
[0017] Optionally, determining each first sample to be eliminated based on the first sample set and each of the new engine assembly samples specifically includes:
[0018] For any new engine assembly sample x in the first sample set i Calculate x for each sample in the first sample set j Assembly sample x with the new engine i The Euclidean distance d(x) between them i x j The sample x j For the engine assembly sample or the new engine assembly sample;
[0019] When the first, second, and third conditions are met simultaneously, determine (x) i x j x represents a pair of samples that cause ambiguity in the boundaries of sample categories. i and x j All are the first samples to be removed; the first condition is that sample x does not exist in the first sample set. l Make d(x) l x i )<d(x i x j ) or d(x l x j )<d(x i x j The second condition is x. i and xj belonging to different sample categories; the third condition is that the sample x j is a new engine assembly sample; wherein d(x l , x i ) is the Euclidean distance between the sample x l and the new engine assembly sample x i ; d(x l , x j ) is the Euclidean distance between the sample x l and the sample x j .
[0020] Optionally, the second sample set is randomly divided according to different feature values to determine each second sample to be removed, specifically including:
[0021] randomly obtaining one assembly process feature from all the assembly process features of the new engine assembly samples in the second sample set;
[0022] obtaining data values of each assembly process feature of all the new engine assembly samples in the second sample set;
[0023] determining a maximum data value and a minimum data value according to all the data values;
[0024] randomly taking an intermediate value between the maximum data value and the minimum data value;
[0025] performing binary division on all the new engine assembly samples in the second sample set according to the intermediate value to determine each second sample to be removed.
[0026] Optionally, the binary division on all the new engine assembly samples in the second sample set according to the intermediate value to determine each second sample to be removed specifically includes:
[0027] dividing the new engine assembly samples with data values of the assembly process feature less than the intermediate value into a first divided sample set, and dividing the new engine assembly samples with data values of the assembly process feature greater than or equal to the intermediate value into a second divided sample set;
[0028] repeating the binary division on the first divided sample set and the second divided sample set respectively until each new engine assembly sample is divided out, so as to obtain a binary tree with a single new engine assembly sample as a leaf node;
[0029] judging whether the current binary tree is the Nth binary tree; wherein N is a positive integer greater than 1;
[0030] If the current binary tree is the Nth binary tree, the average value of the depth of each new engine assembly sample in all binary trees is counted;
[0031] The new engine assembly samples are sorted according to the average value from small to large, and a sorting result is obtained;
[0032] The new engine assembly samples whose sorting positions in the sorting result are located in the top 10% are determined as all second samples to be removed.
[0033] Optionally, the binary splitting of all the new engine assembly samples in the second sample set according to the intermediate value to determine each second sample to be removed further includes:
[0034] If the current binary tree is not the Nth binary tree, the step of randomly obtaining one assembly process feature from all the assembly process features of the new engine assembly samples in the second sample set is returned.
[0035] The application also provides the following scheme:
[0036] A system for engine assembly data enhancement oversampling, the system comprises:
[0037] A source data set acquisition module is configured to acquire a source data set; the source data set comprises a plurality of engine assembly samples and vibration labels corresponding to each engine assembly sample; the engine assembly sample comprises all assembly process features in an engine assembly process; and the vibration label comprises a vibration out-of-tolerance and a vibration qualified;
[0038] An oversampling module is configured to generate a plurality of new engine assembly samples by using a SMOTE oversampling algorithm to oversample the source data set;
[0039] A first sample set obtaining module is configured to update the source data set with all the new engine assembly samples to obtain a first sample set; the first sample set comprises the source data set and all the new engine assembly samples;
[0040] A first sample to be removed determining module is configured to determine each first sample to be removed according to the first sample set and each new engine assembly sample; the first sample to be removed is the new engine assembly sample causing the sample category boundary to be blurred; and the sample category comprises a positive sample and a negative sample;
[0041] A second sample set obtaining module is configured to update the first sample set by removing all the first samples to be removed in the first sample set to obtain a second sample set; the second sample set comprises the first sample set after removing all the first samples to be removed;
[0042] The second sample to be removed module is used to randomly segment all the new engine assembly samples in the second sample set according to different feature values to determine each second sample to be removed; the second sample to be removed is the new engine assembly sample with abnormal data points; the feature value is the data value of the assembly process feature;
[0043] The third sample set acquisition module is used to remove all the second samples to be removed from the second sample set, update the second sample set, and obtain the third sample set; the third sample set includes the second sample set after removing all the second samples to be removed.
[0044] Optionally, the first module for determining samples to be removed specifically includes:
[0045] The Euclidean distance calculation unit is used to calculate any new engine assembly sample x in the first sample set. i Calculate x for each sample in the first sample set j Assembly sample x with the new engine i The Euclidean distance d(x) between them i x j The sample x j For the engine assembly sample or the new engine assembly sample;
[0046] The first unit for determining samples to be removed is used to determine (x) when the first condition, the second condition, and the third condition are all met simultaneously. i x j x represents a pair of samples that cause ambiguity in the boundaries of sample categories. i and x j All are the first samples to be removed; the first condition is that sample x does not exist in the first sample set. l Make d(x) l x i )<d(x i x j ) or d(x l x j )<d(x i x j The second condition is x. i and x j Belonging to different sample categories; the third condition is the sample x j Assemble a sample of the new engine; where d(x) l x i ) is the sample x l Assembly sample x with the new engine i The Euclidean distance between them; d(x) l xj ) is the Euclidean distance between the sample x l and the sample x j .
[0047] Optionally, the second sample to be removed determining module specifically comprises:
[0048] a random obtaining unit, configured to randomly obtain one assembly process feature from all the assembly process features of the new engine assembly sample in the second sample set;
[0049] a data value obtaining unit, configured to obtain data values of each of the assembly process features of all the new engine assembly samples in the second sample set;
[0050] a maximum and minimum value obtaining and determining unit, configured to determine a maximum data value and a minimum data value according to all the data values;
[0051] an intermediate value obtaining unit, configured to randomly obtain an intermediate value between the maximum data value and the minimum data value;
[0052] a binary split unit, configured to perform binary split on all the new engine assembly samples in the second sample set according to the intermediate value, to determine each second sample to be removed.
[0053] Optionally, the binary split unit specifically comprises:
[0054] a divided sample set subunit, configured to divide the new engine assembly sample with the data value of the assembly process feature less than the intermediate value into a first split sample set, and divide the new engine assembly sample with the data value of the assembly process feature greater than or equal to the intermediate value into a second split sample set;
[0055] a binary tree obtaining subunit, configured to repeatedly perform the binary split on the first split sample set and the second split sample set respectively, until each of the new engine assembly samples is split out, to obtain a binary tree with a single new engine assembly sample as a leaf node;
[0056] a judging subunit, configured to judge whether the current binary tree is the Nth binary tree; wherein N is a positive integer greater than 1;
[0057] a statistical subunit, configured to, if the output result of the judging subunit is that the current binary tree is the Nth binary tree, statistically average the depths of each of the new engine assembly samples in all the binary trees;
[0058] a sorting subunit, configured to sort the new engine assembly samples according to the average values from small to large, to obtain a sorting result.
[0059] The second sample to be removed determination sub-unit is configured to determine the new engine assembly sample whose ranking position is located in the top 10% in the ranking result as all second samples to be removed.
[0060] Optionally, the binary split unit further comprises:
[0061] The return sub-unit is configured to return the random acquisition unit if the output result of the judgment sub-unit is that the current binary tree is not the Nth binary tree.
[0062] According to the specific embodiments of the present application, the following technical effects are provided:
[0063] The oversampling method and system for engine assembly data enhancement disclosed by the present application improve the existing SMOTE algorithm, add two steps of sample removal causing sample category boundary blurring and sample removal of data point anomaly, the two steps can identify samples causing sample category edge blurring and samples of data point anomaly, and then remove them, so that the distribution edge problem is solved; meanwhile, the two steps can remove part of samples, so they can also process the unbalanced data set problem, that is, remove a certain number of samples of the category with relatively large sample quantity, so that the positive and negative sample quantities are balanced, thereby overcoming the data distribution problem of unbalanced data set. BRIEF DESCRIPTION OF DRAWINGS
[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0065] Figure 1 The flowchart of the oversampling method for engine assembly data enhancement embodiment of the present application;
[0066] Figure 2 The process diagram of the data set being randomly cut of the present application;
[0067] Figure 3 The comparison diagram of the learning effect of the prediction model using different oversampling methods of the present application;
[0068] Figure 4 The different state diagram of the data set in the execution process of the boundary-unchanged oversampling algorithm of the present application;
[0069] Figure 5 The structural diagram of the oversampling system for engine assembly data enhancement embodiment of the present application. DETAILED DESCRIPTION
[0070] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0071] The purpose of the present application is to provide an oversampling method and system for engine assembly data enhancement to solve the problem of distribution marginalization and overcome the problem of data distribution of unbalanced data sets.
[0072] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0073] Figure 1 The flowchart of the embodiment of the oversampling method for engine assembly data enhancement of the present application is shown in FIG. 1. Figure 1 The oversampling method for engine assembly data enhancement includes the following steps.
[0074] Step 101: Obtain a source data set; the source data set includes a plurality of engine assembly samples and vibration labels corresponding to each engine assembly sample; the engine assembly sample includes all assembly process features in the engine assembly process; and the vibration label includes vibration out-of-tolerance and vibration qualification.
[0075] Step 102: Use the SMOTE oversampling algorithm to oversample the source data set to generate a plurality of new engine assembly samples.
[0076] This step 102 mainly performs oversampling, and specifically includes the following steps.
[0077] The positive and negative samples of the source data set are oversampled according to a certain ratio, i.e., the oversampling ratio, which is artificially set according to one's own needs. For example, if the source data set contains 100 samples and you want to expand the sample size to 1000, the ratio is 1:10, and if you want to expand it to 10000, the ratio is 1:100. The source data set is untreated engine assembly data, including a plurality of engine assembly sample data, and the sample quantity is extremely limited. The engine assembly samples in the source data set can be divided into two types according to whether the vibration level is qualified: the vibration qualified sample is a positive sample, and the vibration out-of-tolerance (unqualified) sample is a negative sample. The specific process of oversampling is as follows:
[0078] Define x = {x i |i = 1, 2,..., n sample} is the source data set of engine assembly samples, including positive samples and negative samples, x i} is the vibration label of each sample in the source data set X, and the label value is 0 or 1. The label 0 represents a negative sample of vibration out-of-tolerance, and the label 1 represents a positive sample of vibration qualification. i |i = 1, 2,..., n sample} is the vibration label of each sample in the source data set X, and the label value is 0 or 1. The label 0 represents a negative sample of vibration out-of-tolerance, and the label 1 represents a positive sample of vibration qualification.
[0079] For each sample x in the source data set X, N neighbor points are randomly selected from the k-neighbor set knn x of x. For each selected neighbor point knn, a new sample x new is generated by random interpolation, and the formula is as follows:
[0080] x new = x + rand(0, 1) × (knn - x), y new = y(x)
[0081] In the formula, rand(0, 1) generates a random number between 0 and 1, and (knn - x) calculates the Euclidean distance between the neighbor point knn and the sample x. The formula for calculating the Euclidean distance is as follows:
[0082] Let P and Q be two n-dimensional vectors, and the Euclidean distance between P and Q is where p i and q i are the components of vectors P and Q, respectively. The multiplication of rand(0, 1) and (knn - x) obtains a random value less than or equal to the Euclidean distance between the neighbor point knn and the sample x, and the addition of the sample x and the random value obtains a new sample x new generated by random interpolation between the sample x and the neighbor point knn. The label y new of the new sample is consistent with the label of the sample x.
[0083] The above is the process of generating new samples by oversampling. The set of all generated new samples is denoted as X new , and the set obtained by merging the source data set X and X new is denoted as X enhance , which contains both the source samples and the newly generated samples.
[0084] Step 103: Update the source data set with all new engine assembly samples to obtain a first sample set; the first sample set includes the source data set and all new engine assembly samples.
[0085] The source data set is updated by all the new engine assembly samples, that is, all the new engine assembly samples are added to the source data set to update the source data set.
[0086] Step 104: determining each first sample to be removed according to the first sample set and each new engine assembly sample; the first sample to be removed is a new engine assembly sample causing the sample category boundary to be ambiguous; the sample category includes positive samples and negative samples.
[0087] The step 104 specifically includes:
[0088] For any new engine assembly sample x in the first sample set i , the Euclidean distance d(x j , x i ) between each sample x i in the first sample set and the new engine assembly sample x j is calculated; the sample x j is an engine assembly sample or a new engine assembly sample.
[0089] When the first condition, the second condition and the third condition are met at the same time, it is determined that (x i , x j ) is a sample pair causing the sample category boundary to be ambiguous, and x i and x j are both first samples to be removed; the first condition is that there is no sample x l in the first sample set such that d(x l , x i ) < d(x i , x j ) or d(x l , x j ) < d(x i , x j ) is established; the second condition is that x i and x j belong to different sample categories; the third condition is that the sample x j is a new engine assembly sample; wherein d(x l , x i ) is the Euclidean distance between the sample x l and the new engine assembly sample x i ; d(x l , x j ) is the Euclidean distance between the sample x l and the sample x j .
[0090] Step 105: removing all the first samples to be removed in the first sample set, updating the first sample set to obtain a second sample set; the second sample set includes the first sample set after removing all the first samples to be removed.
[0091] The step 104 and the step 105 mainly perform boundary fuzzy sample elimination, specifically:
[0092] For the new sample generated by the oversampling in the previous step, find the new sample causing boundary fuzziness and eliminate it, the process is as follows: for each new sample x i , calculate the Euclidean distance between each sample in the sample set X enhance and x i , use d(x i , x j ) to represent the Euclidean distance between two sample points, if the following three conditions are met simultaneously: there is no third sample point x l such that d(x l , x i ) < d(x i , x j ) or d(x l , x j ) < d(x i , x j ) is established; x i and x j belong to different categories (the category of the sample, the label value of the sample has two kinds of 0 and 1, 0 represents negative sample, 1 represents positive sample, the category of the sample includes positive sample and negative sample); x j is also a new sample generated. Then (x i , x j ) is a sample pair causing the boundary fuzziness of the sample category, and x i and x j are eliminated from the sample set X enhance .
[0093] Step 106: randomly cutting all new engine assembly samples in the second sample set according to different feature values to determine each second sample to be eliminated; the second sample to be eliminated is a new engine assembly sample with data point anomaly; the feature value is the data value of the assembly process feature.
[0094] The step 106 specifically includes:
[0095] Randomly obtaining an assembly process feature from all assembly process features of the new engine assembly samples in the second sample set.
[0096] Obtaining the data values of each assembly process feature of all new engine assembly samples in the second sample set.
[0097] Determining the maximum data value and the minimum data value according to all data values.
[0098] Randomly taking an intermediate value between the maximum data value and the minimum data value.
[0099] According to the intermediate value, binary cutting is performed on all new engine assembly samples in the second sample set to determine each second to-be-removed sample.
[0100] Specifically, according to the intermediate value, binary cutting is performed on all new engine assembly samples in the second sample set to determine each second to-be-removed sample, and specifically includes:
[0101] The new engine assembly sample with the data value of the assembly process feature less than the intermediate value is divided into the first cut sample set, and the new engine assembly sample with the data value of the assembly process feature greater than or equal to the intermediate value is divided into the second cut sample set.
[0102] The binary cutting is repeatedly performed on the first cut sample set and the second cut sample set respectively until each new engine assembly sample is cut out, and a binary tree with a single new engine assembly sample as a leaf node is obtained.
[0103] It is judged whether the current binary tree is the Nth binary tree; wherein N is a positive integer greater than 1.
[0104] If the current binary tree is the Nth binary tree, the average value of the depth of each new engine assembly sample in all binary trees is counted.
[0105] The new engine assembly samples are sorted in ascending order according to the average value to obtain a sorting result.
[0106] The new engine assembly samples with the sorting position in the top 10% in the sorting result are determined as all second to-be-removed samples.
[0107] Specifically, according to the intermediate value, binary cutting is performed on all new engine assembly samples in the second sample set to determine each second to-be-removed sample, and specifically includes:
[0108] If the current binary tree is not the Nth binary tree, the step of “randomly obtaining an assembly process feature from all assembly process features of the new engine assembly samples in the second sample set” is returned.
[0109] Wherein, N represents a preset number threshold, and in this embodiment, N is 10.
[0110] Step 107: Remove all second to-be-removed samples in the second sample set, update the second sample set, and obtain a third sample set; the third sample set includes the second sample set after removing all second to-be-removed samples.
[0111] The steps 106 and 107 mainly perform abnormal sample removal, and specifically:
[0112] For the sample set X after the boundary fuzzy sample removal step removes the samples causing the boundary fuzziness enhance, find out the abnormal new samples and remove them. In the data space, the sparse region means that the data occurring in this region has a very low probability, so the data falling in these regions can be considered as abnormal. Figure 2 The process of randomly cutting a data set is shown, Figure 2 Part (a) of the figure shows that the normal point x i schematic diagram, Figure 2 Part (b) of the figure shows that the abnormal point x0 is cut out in the process of randomly cutting the data set. It can be seen from the Figure 2 schematic diagram that the normal point x i needs to be cut many times to be identified, while the abnormal point x0 is easily cut out. The number of cuts reflects the degree of abnormality of the data point. The fewer the number of cuts, the more abnormal the data point.
[0113] X enhance The remaining new samples in X m are randomly divided according to different feature values. Each sample contains multiple process feature data. First, a feature f is randomly selected from all the features of the new sample, and a middle value f enhance is randomly taken between the maximum and minimum values of the data value of the feature f of all new samples. m According to this middle value, the new samples in X new1 are divided into two parts, i.e., the samples with the value of the feature f less than f m are divided into the sample set X new2 , and the samples with the value of the feature f not less than f new1 are divided into the sample set X new2 . Then the above division process is repeatedly performed on X enhance and X enhance until each sample is cut out. The above operation creates a binary tree with a single sample as a leaf node. After creating 10 binary trees in the same way, the average depth of each new sample being cut out (i.e., the average value of the depth of each new sample in all binary trees) is counted. The new samples are sorted in ascending order of average depth, and the samples in the top 10% of the sorted position are considered to be samples with small average depth. Since they are far away from other samples, they are cut out early, so they are identified as abnormal samples and removed from X enhance .
[0114] After the above oversampling, boundary ambiguous sample removal and abnormal sample removal steps, i.e., first obtaining the initial X enhance through oversampling, then removing the new samples in X enhance that cause boundary ambiguity, and finally removing the abnormal new samples in X enhanceUnder the condition of not destroying the original engine assembly data distribution, data enhancement is performed on the source data set to obtain an engine assembly data set X after sample expansion enhance .
[0115] The over-sampling method for engine assembly data enhancement provided by the application is a boundary-uncorrelated over-sampling implementation method in engine data enhancement, and relates to the fields of machine learning, small sample problems and engine assembly data analysis. Since the linear principle of random interpolation of the classical SMOTE method used for data enhancement can cause the problem of blurred class boundaries, the sample noise is increased, and the classification is more difficult. The application improves the classical SMOTE over-sampling algorithm in view of the problem of too small sample quantity in engine assembly data analysis, such as the effectiveness of interpolation data, the boundary control problem of sample data and the like, so as to realize boundary-uncorrelated over-sampling and enhance the engine assembly data. The boundary-uncorrelated over-sampling algorithm provided by the application can be used for data enhancement of engine assembly data. On the basis of the classical SMOTE over-sampling algorithm, the SMOTE is improved in view of the actual distribution characteristics of data. After new samples are generated by random interpolation, the new samples that cause the blurred class boundaries of samples are found and removed in the new sample set, then the abnormal samples are found and removed in the remaining new sample set, and finally the sample quantity is increased under the condition of not destroying the original engine assembly data distribution and not affecting the class boundaries, so as to realize data enhancement.
[0116] The embodiment realizes the boundary-uncorrelated over-sampling through the following implementation solution: (1) collecting the assembly data generated in the actual engine assembly work as a source data set, and the assembly data of each engine is a sample in the data set; (2) over-sampling the positive and negative samples of the source data set according to a certain proportion; (3) finding the new samples located at the class boundaries that cause the blurred boundaries in the new samples generated in the above step, and removing the new samples; (4) finding the relatively abnormal new samples in the remaining new samples in the above step, and removing the new samples. The embodiment collects 60 assembly process data samples generated in the engine assembly work. In order to verify the effectiveness of the boundary-uncorrelated over-sampling method provided by the application, after over-sampling is performed on the engine assembly source data set by using various methods (including random over-sampling, SMOTE, GAN and the boundary-uncorrelated over-sampling SMOTE-Clean provided by the application), a classification prediction model is trained based on the same machine learning algorithm, and the learning effects of the models are compared. The model evaluation indexes mainly include AUC (area under the ROC curve), and Accuracy (accuracy), Precision (precision) and F1-score (a comprehensive index based on precision and recall rate) are auxiliary. The test results of the experiment are shown in Table 1. Figure 3 Figure 3 Part (a), part (b), part (c) and part (d) respectively represent the AUC comparison, F1-score comparison, Accuracy comparison and Precision comparison of the classification prediction model trained based on the same machine learning algorithm in 10 random tests after oversampling the engine assembly source data set using different methods.
[0117] Figure 3 The comparison of the learning effect of the prediction model using different oversampling methods in 10 random tests is shown, and it can be seen that for different evaluation indicators, the overall line connected by the results of 10 tests of the data set after data enhancement using SMOTE-Clean is the uppermost, so the overall level of 10 tests is better than the other two oversampling methods. Table 1 records the average test result comparison of the model trained using different oversampling methods, and it can be seen that the scores of each indicator of SMOTE oversampling are higher than those of random oversampling and GAN, and the scores of each indicator of SMOTE-Clean improved from SMOTE are higher than those of SMOTE oversampling. The AUC of SMOTE-Clean is 1 percentage point higher than that of random oversampling, and the F1-score, Accuracy and Precision are nearly 10 percentage points higher. The experiment shows that the boundary-impact-free oversampling method SMOTE-Clean proposed by the present application can effectively improve the shortcomings of SMOTE and solve the problem of too small sample size in engine assembly data analysis.
[0118] Table 1 Comparison of average learning effect of prediction model using different oversampling methods
[0119]
[0120]
[0121] Figure 4 The different states of the data set in the execution process of the boundary-impact-free oversampling algorithm are shown. Figure 4 Part (a) of the figure represents the source data set, and the two symbols respectively represent two types of sample points. Figure 4 Part (b) of the figure represents the result of oversampling the source data set, and a new sample of the same class is inserted between two samples of the same class in a random interpolation manner. The black filled symbol represents the newly generated positive and negative samples. Figure 4 Part (c) of the figure represents the result after removing the samples in the sticky state at the class boundary. If there are two new samples A and B of different classes, their nearest neighbors are each other, then A and B are samples that cause the boundary to be blurred, and need to be removed, such as Figure 4indicated by the dashed line in the part (b). In order to preserve the original information of the samples, the sample points causing the boundary ambiguity in the source dataset are not deleted. Figure 4 The part (d) represents the result after finding and deleting the abnormal samples in the new samples after the previous processing. The abnormal part in the new samples is found by constructing multiple binary trees, as shown in the part (c). Figure 4 indicated by the dashed line in the part (c), and then the abnormal samples are deleted. In order to preserve the original information of the samples, the abnormal samples in the source dataset are not deleted.
[0122] Finally, the data enhanced engine assembly dataset is obtained by the boundary non-impact oversampling, the samples of the source dataset are expanded, and the problem of boundary ambiguity caused by the new samples is avoided.
[0123] Figure 5 The structure diagram of an embodiment of the oversampling system for engine assembly data enhancement of the application is shown in FIG. 1. Figure 5 The oversampling system for engine assembly data enhancement includes:
[0124] The source dataset acquisition module 501 is configured to acquire a source dataset. The source dataset includes a plurality of engine assembly samples and a vibration label corresponding to each engine assembly sample. The engine assembly sample includes all assembly process features in the engine assembly process. The vibration label includes a vibration out-of-tolerance and a vibration qualified.
[0125] The oversampling module 502 is configured to perform oversampling on the source dataset by using an SMOTE oversampling algorithm to generate a plurality of new engine assembly samples.
[0126] The first sample set obtaining module 503 is configured to update the source dataset with all the new engine assembly samples to obtain a first sample set. The first sample set includes the source dataset and all the new engine assembly samples.
[0127] The first to-be-deleted sample determining module 504 is configured to determine each first to-be-deleted sample according to the first sample set and each new engine assembly sample. The first to-be-deleted sample is a new engine assembly sample causing the boundary ambiguity of the sample category. The sample category includes a positive sample and a negative sample.
[0128] The first to-be-deleted sample determining module 504 specifically includes:
[0129] The Euclidean distance calculation unit is configured to calculate the Euclidean distance d(x i , x j ) between each sample x i in the first sample set and the new engine assembly sample x i . j j a sample or a new engine assembly sample.
[0130] The first sample to be removed determination unit is configured to determine (x i , x j ) as a sample pair causing the sample category boundary to be ambiguous when the first condition, the second condition and the third condition are simultaneously satisfied, x i and x j are both the first sample to be removed; the first condition is that there is no sample x l in the first sample set such that d(x b x i ) < d(x i , x j ) or d(x l , x j ) < d(x t , x j ) is established; the second condition is that x i and x j belong to different sample categories; and the third condition is that the sample x j is a new engine assembly sample; wherein d(x l , x i ) is the Euclidean distance between the sample x l and the new engine assembly sample x i ; and d(x l , x j ) is the Euclidean distance between the sample x l and the sample x j .
[0131] The second sample set obtaining module 505 is configured to remove all the first samples to be removed in the first sample set, update the first sample set, and obtain a second sample set; the second sample set comprises the first sample set after removing all the first samples to be removed.
[0132] The second sample to be removed determination module 506 is configured to randomly split all the new engine assembly samples in the second sample set according to different feature values, and determine each second sample to be removed; the second sample to be removed is a new engine assembly sample with an abnormal data point; and the feature value is a data value of an assembly process feature.
[0133] The second sample to be removed determination module 506 specifically comprises:
[0134] The random acquisition unit is configured to randomly acquire one assembly process feature from all the assembly process features of the new engine assembly samples in the second sample set.
[0135] The data value acquisition unit is configured to acquire the data values of each assembly process feature of all the new engine assembly samples in the second sample set.
[0136] The maximum minimum value obtaining determination unit is configured to determine a data value maximum value and a data value minimum value according to all data values.
[0137] The intermediate value obtaining unit is configured to randomly obtain an intermediate value between the data value maximum value and the data value minimum value.
[0138] The binary split unit is configured to perform binary split on all new engine assembly samples in the second sample set according to the intermediate value to determine each second to-be-removed sample.
[0139] Specifically, the binary split unit specifically includes:
[0140] The divided sample set subunit is configured to divide the new engine assembly sample with the data value of the assembly process feature less than the intermediate value into the first split sample set, and divide the new engine assembly sample with the data value of the assembly process feature greater than or equal to the intermediate value into the second split sample set.
[0141] The binary tree obtaining subunit is configured to repeatedly perform binary split on the first split sample set and the second split sample set respectively until each new engine assembly sample is split out, and obtain a binary tree with a single new engine assembly sample as a leaf node.
[0142] The judgment subunit is configured to judge whether the current binary tree is the Nth binary tree; wherein N is a positive integer greater than 1.
[0143] The statistical subunit is configured to, if the output result of the judgment subunit is that the current binary tree is the Nth binary tree, statistically average the depth of each new engine assembly sample in all binary trees.
[0144] The sorting subunit is configured to sort the new engine assembly samples in ascending order of the average value to obtain a sorting result.
[0145] The second to-be-removed sample determination subunit is configured to determine that the new engine assembly samples with a sorting position in the top 10% in the sorting result are all second to-be-removed samples.
[0146] Specifically, the binary split unit further includes:
[0147] The return subunit is configured to, if the output result of the judgment subunit is that the current binary tree is not the Nth binary tree, return the random obtaining unit.
[0148] The third sample set obtaining module 507 is configured to remove all second to-be-removed samples in the second sample set, update the second sample set, and obtain a third sample set; the third sample set includes the second sample set after removing all second to-be-removed samples.
[0149] The various embodiments described in this specification are presented for the purpose of illustrating the principles of the present application and its best mode of operation. Each of the embodiments described in this specification has been provided for the purpose of illustration only and the various embodiments are not intended to limit the present application in any way unless otherwise specifically indicated. The same parts and / or features of the various embodiments described in this specification can be referenced using the same reference numerals for the ease of understanding of the present application.
[0150] The principles and implementations of the present application have been described above with the specific examples. The above description of the embodiments is only for the purpose of helping to understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, the specific implementation and application range of the present application can be changed according to the idea of the present application. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method for oversampling for engine assembly data augmentation, the method comprising: The method comprises: acquiring a source data set; the source data set comprises a plurality of engine assembly samples and a vibration label corresponding to each engine assembly sample; the engine assembly sample comprises all assembly process features in an engine assembly process; the vibration label comprises a vibration out-of-tolerance and a vibration pass; oversampling the source data set by using an SMOTE oversampling algorithm to generate a plurality of new engine assembly samples; updating the source data set with all the new engine assembly samples to obtain a first sample set; the first sample set comprises the source data set and all the new engine assembly samples; determining each first sample to be removed according to the first sample set and each new engine assembly sample; the first sample to be removed is the new engine assembly sample causing sample category boundary ambiguity; the sample category comprises a positive sample and a negative sample; removing all the first samples to be removed in the first sample set to update the first sample set to obtain a second sample set; the second sample set comprises the first sample set after removing all the first samples to be removed; randomly cutting all the new engine assembly samples in the second sample set according to different feature values to determine each second sample to be removed; the second sample to be removed is the new engine assembly sample with data point anomaly; the feature value is a data value of the assembly process feature; removing all the second samples to be removed in the second sample set to update the second sample set to obtain a third sample set; the third sample set comprises the second sample set after removing all the second samples to be removed; the method further comprises: for any new engine assembly sample x in the first sample set i , calculating the Euclidean distance d(x i ,x j ) between each sample x j in the first sample set and the new engine assembly sample x i ; the sample x j is the engine assembly sample or the new engine assembly sample When the first condition, the second condition and the third condition are satisfied simultaneously, it is determined that (x i ,x j ) is a sample pair causing the sample category boundary to be blurred, x i and x j are both first to-be-removed samples; the first condition is that there is no sample x l in the first sample set such that d(x l ,x j )<d(x i ,x j ) or d(x l ,x j )<d(x i ,x j ) is established; the second condition is that x i and x j belong to different sample categories; the third condition is that the sample x j is the new engine assembly sample; wherein d(x l ,x i ) is the Euclidean distance between the sample x l and the new engine assembly sample x i ; d(x l ,x j ) is the Euclidean distance between the sample x l and the sample x j .
2. The oversampling method for engine assembly data augmentation, as recited in claim 1, wherein, the method further comprises: randomly acquiring one assembly process feature from all the assembly process features of the new engine assembly samples in the second sample set; acquiring data values of each assembly process feature of all the new engine assembly samples in the second sample set; determining a maximum data value and a minimum data value according to all the data values; randomly taking an intermediate value between the maximum data value and the minimum data value; performing binary cutting on all the new engine assembly samples in the second sample set according to the intermediate value to determine each second sample to be removed.
3. The oversampling method for engine assembly data augmentation, as recited in claim 2, wherein, the method further comprises: dividing the new engine assembly sample with a data value of the assembly process feature less than the intermediate value into a first cut sample set, and dividing the new engine assembly sample with a data value of the assembly process feature greater than or equal to the intermediate value into a second cut sample set; repeating the binary splitting on the first split sample set and the second split sample set respectively until each of the new engine assembly samples is split out, to obtain a binary tree with each of the new engine assembly samples as a leaf node; determining whether the current binary tree is the Nth binary tree; where N is a positive integer greater than 1; if the current binary tree is the Nth binary tree, then calculating the average of the depths of each of the new engine assembly samples in all the binary trees; sorting the new engine assembly samples in descending order of the average to obtain a sorting result; determining the new engine assembly samples with a sorting position in the top 10% of the sorting result as all second samples to be removed.
4. The oversampling method for engine assembly data augmentation, as recited in claim 3, wherein, The binary splitting of all the new engine assembly samples in the second sample set according to the intermediate value to determine each second sample to be removed further includes: if the current binary tree is not the Nth binary tree, then returning to the step of randomly selecting one of the assembly process features from all the assembly process features of the new engine assembly samples in the second sample set.
5. A system for oversampling of engine assembly data augmentation, characterized by, The system includes: a source data set obtaining module configured to obtain a source data set; the source data set includes a plurality of engine assembly samples and a vibration label corresponding to each of the engine assembly samples; the engine assembly sample includes all assembly process features in an engine assembly process; and the vibration label includes a vibration out-of-tolerance and a vibration pass; an oversampling module configured to generate a plurality of new engine assembly samples by using a SMOTE oversampling algorithm to oversample the source data set; a first sample set obtaining module configured to update the source data set with all the new engine assembly samples to obtain a first sample set; the first sample set includes the source data set and all the new engine assembly samples; a first sample to be removed determining module configured to determine each first sample to be removed according to the first sample set and each of the new engine assembly samples; the first sample to be removed is the new engine assembly sample causing a sample class boundary to be blurred; and the sample class includes a positive sample and a negative sample; a second sample set obtaining module configured to remove all the first samples to be removed in the first sample set to update the first sample set and obtain a second sample set; the second sample set includes the first sample set after removing all the first samples to be removed; a second sample to be removed determining module configured to determine each second sample to be removed by randomly splitting all the new engine assembly samples in the second sample set according to different feature values; the second sample to be removed is the new engine assembly sample with an abnormal data point; and the feature value is a data value of the assembly process feature; a third sample set obtaining module configured to remove all the second samples to be removed in the second sample set to update the second sample set and obtain a third sample set; the third sample set includes the second sample set after removing all the second samples to be removed; The first sample to be removed determining module specifically includes: an Euclidean distance calculation unit configured to calculate an Euclidean distance d(x i , x j ) between each sample x i in the first sample set and the new engine assembly sample x i , x j ; the sample x j is the engine assembly sample or the new engine assembly sample; The first unit for determining samples to be removed is used to determine (x) when the first condition, the second condition, and the third condition are all met simultaneously. i ,x j x represents a pair of samples that cause ambiguity in the boundaries of sample categories. i and x j All are the first samples to be removed; the first condition is that sample x does not exist in the first sample set. l Make d(x) l ,x i ) <d(x i ,x j ) or d(x l ,x j ) <d(x i ,x j The second condition is x. i and x j Belonging to different sample categories; the third condition is the sample x j Assemble a sample of the new engine; where d(x) l ,x i ) is the sample x l Assembly sample x with the new engine i The Euclidean distance between them; d(x) l ,x j ) is the sample x l With the sample x j The Euclidean distance between them.
6. The oversampling system for engine assembly data augmentation of claim 5, wherein, The second sample to be removed determining module specifically includes: a random acquisition unit, configured to randomly acquire one of the assembly process features from all the assembly process features of the new engine assembly samples in the second sample set; a data value acquisition unit, configured to acquire data values of each of the assembly process features of all the new engine assembly samples in the second sample set; a maximum and minimum value acquisition and determination unit, configured to determine a maximum data value and a minimum data value according to all the data values; an intermediate value acquisition unit, configured to randomly acquire an intermediate value between the maximum data value and the minimum data value; a binary split unit, configured to perform binary split on all the new engine assembly samples in the second sample set according to the intermediate value to determine each second to-be-removed sample.
7. The oversampling system for engine assembly data augmentation of claim 6, wherein, The binary split unit specifically comprises: a divided sample set subunit, configured to divide the new engine assembly samples with data values of the assembly process features less than the intermediate value into a first split sample set, and divide the new engine assembly samples with data values of the assembly process features greater than or equal to the intermediate value into a second split sample set; a binary tree obtaining subunit, configured to repeatedly perform the binary split on the first split sample set and the second split sample set respectively until each of the new engine assembly samples is split out, to obtain a binary tree with each of the new engine assembly samples as a leaf node; a judgment subunit, configured to judge whether the current binary tree is the Nth binary tree; wherein N is a positive integer greater than 1; a statistical subunit, configured to, if the output result of the judgment subunit is that the current binary tree is the Nth binary tree, statistically average the depths of each of the new engine assembly samples in all the binary trees; a sorting subunit, configured to sort the new engine assembly samples in ascending order of the average values to obtain a sorting result; a second to-be-removed sample determining subunit, configured to determine that the new engine assembly samples with a sorting position in the sorting result in a front 10% as all second to-be-removed samples.
8. The oversampling system for engine assembly data augmentation of claim 7, wherein, The binary split unit further comprises: a return subunit, configured to, if the output result of the judgment subunit is that the current binary tree is not the Nth binary tree, return the random acquisition unit.