Automobile fault diagnosis system based on sample nearest neighbor information missing value filling

By using a missing value imputation method based on nearest neighbor information, the problem of missing key information in incomplete datasets in vehicle fault diagnosis is solved. Adaptive weighted K-nearest neighbor data imputation and F-test are used to determine the feature imputation order. Combined with the XGBoost model, high-precision vehicle fault diagnosis is achieved, improving the diagnostic accuracy.

CN116680526BActive Publication Date: 2026-03-24SHANGHAI JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing automotive fault diagnosis methods lack a reasonable data feature imputation order and effective utilization of imputed data when dealing with incomplete datasets, resulting in the neglect of key information. Furthermore, the classic Euclidean distance cannot be applied to data containing missing values, leading to a decrease in diagnostic accuracy.

Method used

A missing value imputation method based on nearest neighbor information of samples is adopted. Through data normalization, feature imputation order calculation, data imputation and inverse normalization, combined with the adaptive weighted K-nearest neighbor data imputation algorithm and F test, the missing values ​​of incomplete samples are gradually filled in. The XGBoost model is used for training to achieve high-precision fault diagnosis.

Benefits of technology

It improves the recall rate of vehicle fault diagnosis and significantly enhances the diagnostic and predictive capabilities for incomplete datasets, increasing the recall rate by 14.41% to 21.24% compared to existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116680526B_ABST
    Figure CN116680526B_ABST
Patent Text Reader

Abstract

A kind of automobile fault diagnosis system based on sample nearest neighbor information missing value filling, comprising: data normalization module, feature filling sequence calculation module, data filling module, data reverse normalization module and fault diagnosis output module, the incomplete data set received by the present application is first normalized;Afterwards, the system determines the feature filling sequence based on F test (F-test);Afterwards, the system is based on the nearest neighbor information of incomplete sample, and the missing value contained in it is filled according to the feature filling sequence;After filling, the system carries out reverse normalization to data set, and outputs complete automobile fault data set;Finally, the system establishes XGBoost (extreme gradient boosting tree) model, and uses the complete data set obtained to train it, and finally realizes high-precision automobile fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a technology in the field of automobile manufacturing, specifically to an automobile fault diagnosis system based on missing value imputation of sample nearest neighbor information. Background Technology

[0002] In the automotive manufacturing industry, vehicle fault diagnosis involves building machine learning models on a dataset of vehicle faults to diagnose the category of new samples and determine whether a fault exists. Based on the diagnostic results, faulty vehicles can be repaired and maintained in a timely manner, thus preventing more serious accidents. During the production process, due to equipment malfunctions, human error, and other reasons, the resulting vehicle fault datasets often contain incomplete samples, meaning some data samples have missing values. Existing vehicle fault diagnosis methods often directly delete incomplete samples, which results in the loss of some important information and a decrease in fault diagnosis accuracy.

[0003] To improve the accuracy of fault diagnosis, missing values ​​in incomplete datasets can be imputed before machine learning, thus constructing a complete training dataset for model training. Existing data imputation techniques typically use the mean, median, etc., for direct imputation. These methods do not consider the relationships and influences between data points, resulting in imputed results lacking sufficient scientific rigor. Another type of missing value imputation method is machine learning-based data imputation, but these methods are often one-time imputations, lacking a proper arrangement of the imputation order and effective utilization of the imputed data. Furthermore, since classical Euclidean distance cannot be directly applied to data containing missing values, existing machine learning imputation methods often replace missing parts with 0 before calculation or directly exclude incomplete samples from the calculation, thus easily overlooking key information contained in incomplete samples. These reasons often lead to the poor performance of existing data imputation methods.

[0004] To address the aforementioned issues, properly supplementing the automotive fault dataset to create a complete dataset for training fault diagnosis machine learning models is one of the keys to improving the accuracy of automotive fault diagnosis. Summary of the Invention

[0005] This invention addresses the shortcomings of existing technologies, such as the lack of a reasonable arrangement of data feature imputation order, insufficient utilization of imputed data, and the use of classical Euclidean distance as the distance metric in most technologies, which fails to include incomplete samples in the nearest neighbor calculation process and thus ignores key information contained in incomplete samples. The invention proposes a vehicle fault diagnosis system based on nearest neighbor information imputation. First, the received incomplete dataset is normalized. Then, the system determines the data feature imputation order based on the F-test. Next, the system imputes the missing values ​​of incomplete samples according to the feature imputation order, based on the nearest neighbor information of the incomplete samples. After imputation, the system denormalizes the dataset and outputs a complete vehicle fault dataset. Finally, the system builds an extreme gradient boosting (XGBoost) model and trains it using the acquired complete dataset, ultimately achieving high-precision vehicle fault diagnosis.

[0006] This invention is achieved through the following technical solution:

[0007] This invention relates to an automotive fault diagnosis system based on nearest neighbor information for imputing missing values. The system includes: a data normalization module, a feature imputation order calculation module, a data imputation module, a data denormalization module, and a fault diagnosis output module. The data normalization module receives an automotive fault dataset containing incomplete samples, determines the target data matrix to be imputed, and normalizes the target data matrix based on features to obtain a normalized target matrix. The feature imputation order calculation module first calculates the missing weighted Euclidean distance between incomplete samples and other samples in the normalized target matrix. Then, based on the calculation result, it uses the Adaptive Weighted K-nearest Neighbor Data Imputation (AWKNN-DI) algorithm to pre-imputate the normalized target matrix, obtaining a pre-imputed matrix. The pre-imputed matrix is ​​then subjected to an F-test to obtain the sum of the F-values ​​of each feature with respect to other features, which is used as a measure of feature importance. The feature imputation order is determined by descending feature importance. The data imputation module uses bisecting K-means... The K-means clustering algorithm divides the normalized target matrix into K sub-data matrices. Then, an adaptive weighted K-nearest neighbor data imputation algorithm is used to imput incomplete samples in each sub-data matrix, resulting in complete imputed sub-data matrices. Specifically, features of each sample are imputed sequentially according to the data feature imputation order, and the imputed complete features are dynamically replaced in their corresponding positions in the sub-data matrices, ensuring that subsequent feature imputation processes effectively utilize the imputation results. The data denormalization module first combines the complete sub-data matrices obtained in the previous module into a complete normalized matrix, then denormalizes the complete normalized matrix, and outputs the imputed complete data matrix. The fault diagnosis output module first establishes an XGBoost (eXtreme Gradient Boosting) model and divides the obtained complete dataset into training and test sets. The training set is used to train the eXtreme Gradient Boosting model, and the test set is used to test the fault diagnosis prediction performance of the trained model. Recall rate is used as the prediction performance evaluation metric. Finally, the trained model outputs the predicted category of new samples.

[0008] The target data matrix refers to an N-row, D-column matrix of missing values ​​to be filled in the vehicle fault dataset, denoted as X = (x1, x2, ..., x...). N ) T ,in:

[0009] The sample refers to each row in the data matrix.

[0010] The features mentioned refer to the columns in the data matrix, which represent various properties of the sample, such as the car's manufacturing year and fuel consumption.

[0011] The incomplete sample refers to a sample that contains at least one missing feature value.

[0012] The normalization mentioned refers to scaling each feature value of each sample in the target data matrix to an interval between 0 and 1, and eliminating its dimensions. Specifically: in: Let be the value in the i-th row and d-th column of the target data matrix. To The result after normalization and These are the maximum and minimum values ​​in the d-th column of the target data matrix, respectively.

[0013] The aforementioned missing weighted Euclidean distance refers to a distance metric feature improved upon the classic Euclidean distance. It overcomes the limitation of the classic Euclidean distance in measuring the distance between two samples with inconsistent dimensions. Specifically: Where i and j are the numbers of the two target samples, and d is the number of the feature value that is not missing in samples i and j. and Let n be the feature values ​​for samples i and j where neither is missing. a Let n be the total number of features contained in sample i. c Let be the number of features that are not missing in samples i and j.

[0014] The adaptive weighted K-nearest neighbor (KNN) data imputation algorithm described above is an improved version of the classic KNN algorithm. It replaces the classic Euclidean distance in the classic KNN algorithm with the missing weighted Euclidean distance mentioned earlier, overcoming the limitation of the classic KNN algorithm, which can only find the nearest neighbor of the target sample within samples of the same dimension. Specifically, it first uses the missing weighted Euclidean distance ρ... ij Find the k nearest neighbors of the incomplete target data samples, where k is 10% of the total number of samples in the target data matrix, and has a minimum value of 5. Then, for the missing features of the incomplete data samples, calculate the distance-weighted mean of the feature values ​​corresponding to the nearest neighbors. Where: d is the column label of the feature to be filled, and the calculation result is used to fill the missing value; if the nearest neighbor corresponding feature is also missing, it is not included in the calculation.

[0015] The F-test mentioned above refers to the Joint Hypotheses Test, a method for verifying whether a statistical value contains a difference under the null hypothesis (H0). Specifically, it involves calculating the squares of the standard deviations of both sets of data, then dividing the squares by the sum of the squares to obtain the F-value. The calculated F-value is then compared with the F-value obtained from a lookup table. If the F-value is... <F 表 This indicates that there is no significant difference between the two sets of data; otherwise, it indicates that there is a difference.

[0016] The F-value refers to the calculation result obtained through the F-test.

[0017] The data feature imputation order refers to the order in which the various feature values ​​contained in an incomplete sample are filled when imputing data. This order follows the principle that the more important features are filled first.

[0018] The Bisecting K-means clustering algorithm is a structural clustering (hierarchical clustering) method. It continuously performs k=2 k-means splits on selected clusters until the number of clusters equals the user-specified number, while minimizing the overall sum of squared errors. Specifically: All points are grouped into one cluster, and then this cluster is split in two (i.e., k=2 clustering); the cluster that minimizes the clustering cost function (i.e., the sum of squared errors, SSE) is split into two clusters (i.e., the cluster with the largest error is selected for splitting); this step is repeated until the number of split clusters equals the user-specified number of clusters (i.e., the input K parameter).

[0019] The aforementioned sub-data matrix combination refers to vertically splicing together the complete sub-data matrices obtained in the data imputation module to obtain a data matrix with the same number of samples and features as the original target data matrix.

[0020] The aforementioned inverse normalization restores the normalized value to its original value range, specifically as follows: in: This is the result obtained by inverse normalization of the value in the i-th row and d-th column of the normalized data matrix. Let be the original value in the i-th row and d-th column of the normalized data matrix. and These are the maximum and minimum values ​​in the d-th column of the normalized data matrix, respectively.

[0021] The XGBoost model is a machine learning classification model that integrates multiple decision trees. It uses a BoostingTree model with regularization to iteratively train the ensemble model. The principle and process can be found in the following reference: [1] Chen T, Guestrin C. XGBoost: A Scalable Tree Boosting System[J]. ACM, 2016.

[0022] The recommended ratio of the training set to the test set is 8:2. If the dataset has already been divided into training and test sets, then the original dataset division should be followed.

[0023] The recall rate refers to the probability that a faulty sample is successfully predicted by the machine learning model. It reflects the predictive ability of the machine learning model for faulty samples. Where: R is the recall rate, TP is the number of samples correctly predicted as faulty, and FN is the number of samples incorrectly predicted as fault-free.

[0024] The predicted category of the new sample refers to whether the new sample input into the machine learning model is diagnosed as faulty or faultless.

[0025] Technical effect

[0026] This invention targets incomplete vehicle fault datasets. First, for missing values ​​in incomplete samples, the missing values ​​are filled in cyclically according to the calculated feature filling order and based on the nearest neighbor information of the target samples. Then, the complete dataset obtained after filling is used to train an XGBoost model, and high-precision diagnosis of vehicle faults is achieved based on the obtained model.

[0027] Compared with existing technologies, this invention uses an improved adaptive weighted K-nearest neighbor data imputation algorithm to pre-imputate and formally imputate incomplete datasets in blocks. This fully utilizes the important information contained in incomplete samples, avoiding information loss and misuse of information caused by directly deleting incomplete samples or using simple statistical values ​​for imputation, thus improving the quality of data imputation. Furthermore, before data imputation, this invention first determines the data feature imputation order based on the F-test, and then iteratively imputs each missing value of the incomplete samples in sequence, taking feature importance into account during the imputation process and incorporating the results obtained from earlier imputations into subsequent imputations, fully maximizing the value of the imputation results and overcoming the shortcomings of existing technologies that imputate in one go. This invention also uses the imputed complete dataset to train an XGBoost model, resulting in a model with a high recall rate. Overall, this invention improves the diagnostic and predictive capabilities for incomplete automotive fault datasets, achieving higher prediction accuracy compared to existing technologies. Attached Figure Description

[0028] Figure 1 This is a system structure diagram of the present invention;

[0029] Figure 2 This is a flowchart illustrating the feature filling sequence calculation module in this invention.

[0030] Figure 3 This is a flowchart illustrating the data filling module in this invention;

[0031] Figure 4 A flowchart illustrating the adaptive weighted K-nearest neighbor data imputation algorithm. Detailed Implementation

[0032] like Figure 1 As shown, this embodiment employs a vehicle fault diagnosis method based on the APSFailure at Scania Trucks dataset released by Scania Trucks, specifically including:

[0033] S1. Reading Data: The dataset used in this embodiment has a dimension of 170, which means it contains 170 data features, covering information such as vehicle speed and mileage; the original dataset has been divided into training set and test set, where: the training set contains 60,000 samples and the test set contains 16,000 samples, and each sample is classified as either faulty or fault-free; the training set contains 59,000 fault-free samples and 1,000 faulty samples; in addition, both the training set and the test set of the original dataset contain a large number of missing values.

[0034] S2. Generate the target data matrix: Since both the original test set and training set in this embodiment contain missing values, the original test set and training set are directly used as the target data matrix for training and testing.

[0035] S3. Receive the target data matrix X used for training, normalize it, and obtain the normalized target matrix.

[0036] S4, to Pre-filling is performed using an adaptive weighted K-nearest neighbor data imputation algorithm to obtain the pre-filled data matrix. Specifically, it includes:

[0037] S41, will Using a specific incomplete data sample as the imputation target, and based on the aforementioned missing weighted Euclidean distance, the imputation target is located in... Find the k nearest neighbors in the array, where the value of k is... 10% of the total sample size.

[0038] S42. For a missing feature value of the target to be filled, calculate the distance-weighted average of the corresponding features of the nearest neighbors of the target to be filled, and use the calculation result to fill the missing value; if the corresponding feature of the nearest neighbor is also missing, it is not included in the calculation; the distance-weighted average... Where: d is the column index of the feature to be filled.

[0039] S43. Repeat steps S41 and S42 until... All missing values ​​have been filled in, and the output is complete.

[0040] S5, For pre-filled data matrix Perform an F-test to obtain the sum of the F-values ​​of each feature with respect to the other features, and use this sum as a measure of feature importance. Arrange the features in descending order of importance to determine the order of feature imputation.

[0041] S6. For the normalized target matrix Clustering is performed using the binary K-means clustering algorithm. Divide into K sub-data matrices; in this embodiment, K = 10, that is, obtain

[0042] S7. For each sub-data matrix Where: j = 1 to 10, the missing values ​​in: are filled using the adaptive weighted K-nearest neighbor data imputation algorithm to obtain the imputed complete sub-data matrices. Specifically, it includes:

[0043] S71, will Using a specific incomplete data sample as the imputation target, and based on the aforementioned missing weighted Euclidean distance, we find the result after replacing the target with the imputation result. Find the k nearest neighbors in the array, where the value of k is... The sample size is 10% of the total sample size, with a minimum value of 5.

[0044] S72. Select a missing feature of the target to be filled, calculate the distance-weighted average of the corresponding feature values ​​of the nearest neighbor of the target to be filled, and use the calculation result to fill the missing value; if the corresponding feature of the nearest neighbor is also missing, it will not be included in the calculation; the definition of the distance-weighted average is the same as that in S42.

[0045] S73. Repeat steps S71 and S72 until all features in all sub-data matrices are filled in, and output the complete sub-data matrices.

[0046] S71 describes replacing the result with the filling result. This refers to replacing the original feature with the obtained complete feature after the previous round of filling. After obtaining the corresponding incomplete features, If the iteration is the first round, then This is the original input.

[0047] The selection method for filling missing features in S72 is as follows: according to the order of data feature filling, select the feature that has not yet been filled. As the algorithm iterates, the importance of the selected missing features decreases sequentially until all features are filled.

[0048] S8, each Combined into a complete normalized matrix after filling.

[0049] S9, to Perform inverse normalization to obtain the complete data matrix after filling.

[0050] S10. Build the XGBoost model. Specifically, use the xgboost library in Python to build the XGBClassifier classifier. The classifier parameters should be consistent with the recommended values.

[0051] S11, Use The established XGBoost model is trained to obtain a well-trained fault diagnosis model.

[0052] S12, Receive the target data matrix X for testing. test Repeat steps S3-S9 for X test Perform the filling to obtain the complete data matrix after filling.

[0053] S13. Use the XGBoost fault diagnosis model trained in S10 to... The samples in the dataset are used for fault diagnosis prediction, and the recall rate of the fault diagnosis prediction results is calculated.

[0054] To further illustrate the effectiveness of this method, four methods were compared: (1) using the classic K-nearest neighbor data imputation algorithm to imput data, and using the imputed data matrix to train an XGBoost classifier, denoted as "K-nearest neighbor data imputation + XGB"; (2) deleting incomplete samples from the target data matrix, and using the deleted data matrix to train an XGBoost classifier, denoted as "deletion + XGB"; (3) using the classic K-nearest neighbor data imputation algorithm to imput data, and using the imputed data matrix to train a Random Forest (RF) classifier, denoted as "K-nearest neighbor data imputation + RF"; (4) deleting incomplete samples from the target data matrix, and using the deleted data matrix to train a Random Forest classifier, denoted as "deletion + RF". The recall rates of the above methods and this method in fault diagnosis on the test target data matrix were statistically analyzed to evaluate the fault diagnosis prediction performance of each method.

[0055] Table 1 shows the recall rates obtained by different methods in fault diagnosis in this embodiment.

[0056] Table 1

[0057]

[0058] As shown in Table 1, for the problem of vehicle fault diagnosis, compared with the prior art, the recall rate of the present invention is improved by 14.41% to 21.24%, which shows that the present invention significantly enhances the diagnostic and predictive ability of incomplete vehicle fault data.

[0059] The above-described specific implementations can be partially adjusted by those skilled in the art in different ways without departing from the principles and purpose of the present invention. The scope of protection of the present invention is defined by the claims and is not limited to the above-described specific implementations. All implementation schemes within the scope of the claims are bound by the present invention.

Claims

1. A vehicle fault diagnosis system based on missing value imputation of nearest neighbor information, characterized in that, include: The system comprises a data normalization module, a feature imputation order calculation module, a data imputation module, a data denormalization module, and a fault diagnosis output module. Specifically: The data normalization module receives a vehicle fault dataset containing incomplete samples, covering vehicle speed and mileage. It determines the target data matrix to be imputed and normalizes the target data matrix based on its features, obtaining a normalized target matrix. The feature imputation order calculation module first calculates the missing weighted Euclidean distance between incomplete samples and other samples in the normalized target matrix. Then, based on the calculation results, it uses an adaptive weighted K-nearest neighbor data imputation algorithm to pre-impute the normalized target matrix, obtaining a pre-imputed matrix. An F-test is then performed on the pre-imputed matrix to obtain the sum of the F-values ​​of each feature with respect to other features, which is used as a measure of feature importance. The feature imputation order is determined by descending feature importance. The data imputation module uses a binary K-means clustering algorithm to cluster the normalized target matrix into K sub-data matrices. Then, the adaptive weighted K-nearest neighbor data imputation algorithm is used to imput incomplete samples in each sub-data matrix, resulting in complete sub-data matrices after imputation. Specifically, each feature of each sample is imputed sequentially according to the data feature imputation order, and the imputed complete features are dynamically replaced in the corresponding positions in the sub-data matrix, so that the subsequent feature imputation process effectively utilizes the obtained imputation results. The data denormalization module first combines the complete sub-data matrices obtained in the previous module into a complete normalized matrix, then denormalizes the complete normalized matrix, and outputs the imputed complete data matrix. The fault diagnosis output module first establishes an extreme gradient boosting tree model and divides the obtained complete dataset into a training set and a test set. Then, the extreme gradient boosting tree model is trained using the training set, and the fault diagnosis prediction performance of the trained model is tested using the test set. The recall rate is used as the prediction performance evaluation index, and then the trained model is used to output the predicted category of new samples. The aforementioned missing weighted Euclidean distance refers to a distance metric feature improved from the classic Euclidean distance, specifically: Where i and j are the numbers of the two target samples, and d is the number of the feature value that is not missing in samples i and j. and For features where neither sample i nor j is missing, Let i be the total number of features contained in sample i. The number of features that are not missing in samples i and j; The F-test mentioned above refers to a joint hypothesis test, specifically: Calculate the squares of the standard deviations of the two sets of data separately, then divide the squares of the two standard deviations to obtain the F-value between the two sets of data. Finally, compare the calculated F-value with the F-value obtained from a lookup table. If F... <F 表 This indicates that there is no significant difference between the two sets of data; otherwise, it indicates that there is a difference. The aforementioned sub-data matrix combination refers to vertically splicing together the complete sub-data matrices obtained in the data imputation module to obtain a data matrix with the same number of samples and features as the original target data matrix.

2. The vehicle fault diagnosis system based on missing value imputation of nearest neighbor information according to claim 1, characterized in that, The term "sample" refers to each row in the data matrix; the term "feature" refers to each column in the data matrix; and the term "incomplete sample" refers to a sample that contains at least one missing feature value. The target data matrix refers to an N-row, D-column matrix of missing values ​​to be filled in the vehicle fault dataset, denoted as... ,in: .

3. The vehicle fault diagnosis system based on missing value imputation of nearest neighbor information according to claim 1, characterized in that, The normalization mentioned refers to scaling each feature value of each sample in the target data matrix to an interval between 0 and 1, and eliminating its dimensions. Specifically: ,in: To The result after normalization and These are the maximum and minimum values ​​in the d-th column of the target data matrix, respectively.

4. The vehicle fault diagnosis system based on missing value imputation of nearest neighbor information according to claim 1, characterized in that, The aforementioned inverse normalization restores the normalized value to its original value range, specifically as follows: ,in: This is the result obtained by inverse normalization of the value in the i-th row and d-th column of the normalized data matrix. Let be the original value in the i-th row and d-th column of the normalized data matrix. and These are the maximum and minimum values ​​in the d-th column of the normalized data matrix, respectively.

5. The vehicle fault diagnosis system based on missing value imputation of nearest neighbor information according to claim 1, characterized in that, The adaptive weighted K-nearest neighbor data imputation algorithm is specifically as follows: First, based on the missing weighted Euclidean distance... Find the k nearest neighbors of the incomplete target sample, where k is 10% of the total number of samples in the target data matrix, and has a minimum value of 5; then, for the missing features of the incomplete sample, calculate the distance-weighted mean of the feature values ​​corresponding to its nearest neighbors. , where d is the column index of the feature to be filled, and the calculation result is used to fill the missing values; if the nearest neighbor corresponding feature is also missing, it is not included in the calculation.

6. The vehicle fault diagnosis system based on missing value imputation of nearest neighbor information according to claim 1, characterized in that, The binary K-means clustering algorithm is as follows: all points are grouped into a cluster, and then the cluster is divided into two, i.e., clustering with k=2 is performed; the cluster that minimizes the clustering cost function, i.e., the sum of squared errors, is split into two clusters, i.e., the cluster with the largest error is selected for splitting; the previous step is repeated until the number of split clusters is equal to the number of clusters specified by the user, i.e., the input K parameter.

7. A method for vehicle fault diagnosis based on missing value imputation of nearest neighbor information in the system according to any one of claims 1-6, characterized in that, include: S1. Read the data: Use a dataset containing 170 data features, divide it into a training set containing 60,000 samples and a test set containing 16,000 samples. Each sample is classified as either faulty or fault-free. The training set contains 59,000 fault-free samples and 1,000 faulty samples. In addition, both the training and test sets of the original dataset contain missing values. S2. Generate the target data matrix: Use the original test set and training set directly as the target data matrix for training and testing; S3, Receive the target data matrix used for training. Normalize it to obtain the normalized target matrix. ; S4, to Pre-filling is performed using an adaptive weighted K-nearest neighbor data imputation algorithm to obtain the pre-filled data matrix. Specifically, it includes: S41, will Using an incomplete sample as the imputation target, and based on the missing weighted Euclidean distance, the imputation target is found in... Find the k nearest neighbors in the array, where the value of k is... 10% of the total sample size; S42. For a missing feature value of the target to be filled, calculate the distance-weighted average of the nearest neighbor features of the target to be filled. The calculation results are used to fill in missing values; if the corresponding feature of the nearest neighbor is also missing, it is not included in the calculation, where: d is the column index of the feature to be filled; S43. Repeat steps S41 and S42 until... All missing values ​​have been filled in, and the output is complete. ; S5, For pre-filled data matrix Perform an F-test to obtain the sum of the F-values ​​of each feature with respect to the other features, and use this sum as a measure of feature importance. Sort the features in descending order of feature importance to determine the order of data feature imputation. S6. For the normalized target matrix Clustering is performed using the binary K-means clustering algorithm. Divide into K sub-data matrices. When K=10, ; S7. For each sub-data matrix ,in: The missing values ​​were filled using an adaptive weighted K-nearest neighbor data imputation algorithm, resulting in complete sub-data matrices after imputation. Specifically, it includes: S71, will Using an incomplete sample as the imputation target, and based on the missing weighted Euclidean distance, we find the imputation target after replacing it with the imputation result. Find the k nearest neighbors in the array, where the value of k is... 10% of the total sample size, with a minimum value of 5; The replacement using the filling result This refers to replacing the original feature with the obtained complete feature after the previous round of filling. After obtaining the corresponding incomplete features, If the iteration is the first round, then This is the original input; S72. Select a missing feature of the target to be filled, calculate the distance-weighted average of the corresponding feature values ​​of the nearest neighbor of the target to be filled, and use the calculation result to fill the missing value; if the corresponding feature of the nearest neighbor is also missing, it will not be included in the calculation. The process of filling in missing values ​​using the calculation results refers to: selecting the feature that has not yet been filled in the order of data feature filling; as the algorithm iterates, the importance of the selected missing features decreases sequentially until all features have been filled. S73. Repeat steps S71 and S72 until all features in all sub-data matrices are filled in, and output the complete sub-data matrices. ; S8, each Combined into a complete normalized matrix after filling. ; S9, to Perform inverse normalization to obtain the complete data matrix after filling. ; S10. Build the XGBoost model. Specifically, use the xgboost library in Python to build the XGBClassifier classifier. The classifier parameters should be consistent with the recommended values. S11, Use The XGBoost model is trained to obtain a well-trained fault diagnosis model. S12, Receive the target data matrix for testing. Repeat steps S3-S9. Perform the filling to obtain the complete data matrix after filling. ; S13. Use the XGBoost fault diagnosis model trained in S10 to... The samples in the dataset are used for fault diagnosis prediction, and the recall rate of the fault diagnosis prediction results is calculated.

Citation Information

Patent Citations

  • KNN-based improved missing data filling algorithm

    CN106407464A

  • Incomplete data weighted clustering method of adaptive intervals

    CN110197216A