A method for repairing missing values of medical data based on multiple confidence
By using a multi-reset reliability-based approach, combined with statistics and autoassociative neural networks, the data imputation process is optimized, solving the problems of resource waste and low accuracy in the processing of medical data with missing multidimensional attributes, and achieving efficient and accurate data imputation.
Patent Information
- Application Number
- CN202310031008.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-10
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-01-10
AI Technical Summary
Existing technologies often lead to resource waste when processing medical data with missing multidimensional attributes, failing to effectively utilize information from missing data samples, resulting in low data filling efficiency and accuracy.
A multi-reset confidence-based approach is adopted, which uses statistical methods to analyze the correlation in the dataset, calculates attribute weights and sample confidence, combines an autoassociative neural network model for batch imputation, optimizes the transmission path of the neural network, and improves the loss function to enhance imputation accuracy.
It improves data utilization and filling accuracy, optimizes the transmission path of the autoassociative neural network model, reduces self-mapping problems, and enhances the efficiency and accuracy of filling missing values in multidimensional data.
Smart Images

Figure CN116089801B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the intersection of medical health and information science, and in particular, to a medical data missing value repair method based on multiple confidence. BACKGROUND
[0002] With the vigorous development of the big data industry and the vigorous promotion of intelligent medical treatment in the whole society, more and more medical data sets are used to assist medical diagnosis, and the quality of the data set directly affects the diagnosis result. At present, due to various uncontrollable factors, medical data inevitably exists in the process of collection, transmission and storage. Data missing affects the authenticity of the data itself, reduces the effectiveness of the data, and affects the subsequent data analysis, so it is very necessary to fill the missing data.
[0003] At present, researchers mostly solve the data missing problem through mean filling, regression filling, multiple filling and nearest neighbor filling, etc. However, in the case that the data set sample has multi-dimensional attribute missing and the missing rate is large, these filling methods are difficult to accurately, effectively and quickly fill.
[0004] Traditional statistical algorithms and machine learning algorithms mostly fill in single missing attributes. When filling in a certain attribute in the data set, the remaining missing attribute samples are deleted, which causes waste of resources, cannot obtain valuable information in the missing data samples, and may even affect the correctness of the result analysis.
[0005] Therefore, the technical personnel in the art are committed to developing a medical data missing value repair method based on multiple confidence, which fills in the multi-dimensional data missing values in the data set sample in batches, improves the filling efficiency, reasonably adds the data samples with multi-dimensional missing values to the training model, fully excavates the data information in the data set, so as to solve the above-mentioned deficiencies of the prior art. SUMMARY
[0006] In view of the above defects of the prior art, the technical problem to be solved by the present application is that the currently existing filling methods mostly fill in single missing attributes, and when filling in a certain attribute in the data set, the remaining missing attribute samples are deleted, which causes waste of resources, cannot obtain valuable information in the missing data samples, and the utilization rate of the original data in the data set is low, the efficiency and accuracy of data filling are low.
[0007] To achieve the above object, the application provides a medical data missing value repairing method based on multiple confidence, which comprises the following steps.
[0008] Further, the medical data missing value repairing method based on multiple confidence comprises the following steps.
[0009] Step 1: import the missing data set;
[0010] Step 2: eliminate the dimensional influence between sample indicators, and normalize the data set, wherein the data sample normalization formula is as follows (1):
[0011] (1)
[0012] wherein,
[0013] is the normalized value of the original data in the a-th row and the b-th column;
[0014] represents the data to be normalized in the sample;
[0015] represents the maximum value of the data attribute;
[0016] represents the minimum value of the data attribute;
[0017] Step 3: calculate the correlation matrix between the attributes by the statistical method; the correlation coefficient calculation formula between the characteristics is as follows (2):
[0018] (2)
[0019] wherein,
[0020] represents the correlation between the attribute and the attribute ; and
[0021] representing the attribute and the attribute covariance;
[0022] and representing the attribute and the attribute variance;
[0023] Step 4, updating the weight of the remaining attributes relative to the target attribute by using the correlation coefficient obtained in step 3; the target attribute is all the attributes in the sample set; the specific weight calculation formula is as follows formula (3):
[0024] (3)
[0025] wherein,
[0026] representing the weight of the attribute relative to the attribute
[0027] representing the total number of attributes of the sample;
[0028] Step 5, calculating the confidence of each sample set; specifically including,
[0029] Step 5-1, calculating the weight of other attributes relative to the target attribute in the sample in the manner of step 4; calculating the multiple confidence of the sample according to formula (4), and the degree of damage of the sample is obtained by adding the weight of all missing value attributes:
[0030] (4)
[0031] wherein,
[0032] ms represents the missing attribute;
[0033] representing the confidence of the sample when predicting the value of the th attribute in the th sample;
[0034] Step 5-2, filling all missing values at one time through a self-associative neural network model; under the premise of being uncertain about the missing attributes of the sample, outputting a predicted value for each attribute of the sample; when predicting each attribute, the sample will obtain a new confidence, that is, the sample has as many confidences as the dimensions of the sample;
[0035] Step 6, label the missing values in the dataset, return the coordinate position information of the missing values in the dataset, and pre-fill according to the characteristics of the missing value attribute using the average value or mode or median;
[0036] Step 7, divide the dataset into training set and test set;
[0037] Step 8, build a neural network and optimize the transmission path of the neural network; the number of output quantities of all attribute values of the predicted sample is equal to the number of input quantities; add the predicted classification result to the output layer of the neural network; when filling a missing value, remove the corresponding input data quantity from the training model, and the specific network transmission function is as follows:
[0038] The transfer formula of the next level of the input layer is as follows formula (5):
[0039] (5)
[0040] The transfer formula between hidden layers is as follows formula (6):
[0041] (6)
[0042] When the predicted value is a continuous value, the output value of the network is as formula (7):
[0043] (7)
[0044] When the predicted value is a binary classification attribute, the output transfer function of the network is formula (8); when the predicted value is a multi-classification attribute, the output transfer function of the network is formula (9)
[0045] (8)
[0046] (9)
[0047] In formula (5), (6), (7), (8), (9),
[0048] The confidence of the incomplete sample is , wherein represents the confidence of the sample when predicting the i-th attribute of the k-th sample;
[0049] represents the relu activation function;
[0050] represents the sigmoid activation function;
[0051] represents the softmax activation function;
[0052] represents the output of the first hidden layer of the neural network when predicting the attribute
[0053] represents the output of the second hidden layer of the neural network when predicting the attribute
[0054] represents the output value of the network model;
[0055] represents the transmission weight between the first attribute of the input sample and the second neuron of the second layer of the network;
[0056] represents the transmission weight between the first neuron of the first hidden layer and the second neuron of the second hidden layer;
[0057] represents the transmission weight between the second neuron of the second hidden layer and the attribute to be predicted of the output layer;
[0058] represents the first attribute of the first input sample;
[0059] is the bias quantity of the network model;
[0060] represents that the hidden layer has a total of
[0061] represents the number of attributes of the sample;
[0062] Step 9, one-hot encoding is performed on the classification attribute in the data set;
[0063] Step 10, the loss function is optimized; the multiple confidence values calculated are applied to the loss function of the neural network model, and the influence degree of each sample on the model training is distinguished by adjusting the sample confidence;
[0064] The expression of the loss function is as follows:
[0065] (10)
[0066] In the formula,
[0067] indicates the confidence of the sample in filling the missing attribute of the th sample, indicates that the attribute value is a continuous numerical variable;
[0068] indicates a classification attribute;
[0069] indicates the i th attribute in the k th sample; the attribute is a continuous variable;
[0070] indicates the predicted value of the i th attribute in the k th sample;
[0071] indicates the classification result of the i th attribute of the k th sample; the classification result is represented by one-hot encoding;
[0072] indicates the predicted result of the i th classification attribute of the k th sample.
[0073] An 'early stopping' strategy is introduced to maximize the accuracy of prediction;
[0074] The 'early stopping' strategy is introduced to determine the optimal training number to obtain the best result during model training. If the training number is too small, underfitting will occur, and if the training number is too large, overfitting will occur. To solve this problem, the early stopping strategy is introduced. After each epoch, the test result is obtained on the validation set. With the increase of the epoch to a certain value, the error of the validation set will change from a downward trend to an upward trend. At this time, the training is stopped. The epoch at this time is the optimal training number.
[0075] By adopting the above scheme, the medical data missing value repair method based on multiple confidence degrees disclosed by the application has the following advantages:
[0076] (1) The medical data missing value repair method based on multiple confidence degrees combines statistical methods and machine learning methods, takes the dimension number of the sample as the judgment basis, and gives the sample multiple confidence degrees. By dynamically selecting the confidence degrees, the loss function of the self-associative neural network model is optimized, the incomplete sample is introduced into the training of the model, and the utilization rate of the data is improved.
[0077] (2) The method for repairing missing values of medical data based on multiple confidence degrees, optimizes the transmission path of the self-associative neural network model, removes the self-mapping problem from the input node to the output node (when predicting a certain attribute, the attribute does not participate in the input of the network model), and strengthens the mutual correlation between nodes;
[0078] (3) The method for repairing missing values of medical data based on multiple confidence degrees synchronously predicts the missing values of the classification attributes and the continuous attributes, improves the efficiency of model filling, optimizes the transmission path of the self-associative neural network model, and removes the self-mapping problem from the input node to the output node;
[0079] In summary, the method for repairing missing values of medical data based on multiple confidence degrees disclosed in the application fills the multi-dimensional data missing values in the batch filling data set samples, improves the filling efficiency, reasonably adds the data samples with multi-dimensional missing values to the training model, fully mines the data information in the data set, improves the utilization rate of the data in the original data set, speeds up the efficiency of data filling, and improves the accuracy of data filling;
[0080] The concept, specific technical solutions and generated technical effects of the application will be further described in combination with specific embodiments, so as to fully understand the purposes, features and effects of the application. BRIEF DESCRIPTION OF DRAWINGS
[0081] Figure 1 is a flowchart of the method for repairing missing values of medical data based on multiple confidence degrees;
[0082] Figure 2 is a network structure diagram of the method for repairing missing values of medical data based on multiple confidence degrees; DETAILED DESCRIPTION
[0083] The following describes a plurality of preferred embodiments of the application, so that the technical content of the application is clearer and easier to understand. The application can be embodied in many different forms, and these embodiments are described by way of example only, and the protection scope of the application is not limited to the embodiments mentioned in the text.
[0084] Embodiment 1, a method for repairing missing values of medical data based on multiple confidence degrees
[0085] The data set adopts the heart disease data set on the kaggle official website;
[0086] In this embodiment 1, according to the filled missing values of the attributes, the relative weights of each attribute and the predicted attribute are calculated, a plurality of confidence degrees are given to the samples in combination with the number of sample missing values, the influence of each sample on the model training when filling each attribute is distinguished by adjusting the sample confidence degrees; specifically,
[0087] Step 1, load the heart disease dataset on Kaggle website; randomly missing the heart disease dataset, save the relative position coordinates of the missing values in the dataset to the local as (a, b); on the dataset, fill the missing values of the classification attribute with the mode, and fill the missing values of the continuous data with the mean;
[0088] Step 2, eliminate the influence of dimension between sample indicators, normalize the data set, and the data sample normalization formula is as follows (1):
[0089] (1)
[0090] Wherein,
[0091] is the normalized value of the original data in the first row and the first column;
[0092] Indicates the data that needs to be normalized in the sample;
[0093] Indicates the maximum value of the data attribute;
[0094] Indicates the minimum value of the data attribute;
[0095] Step 3, calculate the correlation matrix between attributes by statistical method; the correlation coefficient between characteristics is calculated as follows (2):
[0096] (2)
[0097] Wherein,
[0098] Indicates the correlation between attribute and attribute ;
[0099] Indicates the covariance of attribute and attribute ;
[0100] and Indicates the variance of attribute and attribute ;
[0101] Step 4, update the weight of each attribute relative to the target attribute using the correlation coefficient obtained in step 3; the target attribute is all attributes in the sample set; the specific weight calculation formula is as follows (3):
[0102] (3)
[0103] wherein,
[0104] representing the attribute relative to the attribute weight;
[0105] representing the total number of attributes of the sample;
[0106] Step 5, calculating the confidence of each sample set; specifically comprising,
[0107] Step 5-1, calculating the weight of other attributes relative to the target attribute in the sample in the manner of step 4; calculating the multiple confidence of the sample according to formula (4), and the degree of damage of the sample is obtained by adding the weights of all missing value attributes:
[0108] (4)
[0109] wherein,
[0110] ms represents the missing attribute;
[0111] representing the confidence of the sample when predicting the value of the th attribute in the th sample;
[0112] Step 5-2, filling all missing values at one time through a self-associative neural network model; under the premise of not determining the missing attributes of the sample, outputting a predicted value for each attribute of the sample; when predicting each attribute, the sample will obtain a new confidence, that is, the sample has as many confidences as the number of dimensions of the sample;
[0113] In the step 5, resetting the confidence of each sample, the data set has fourteen attributes, and a confidence is given to the sample for each attribute ;
[0114] Therefore, the sample has fourteen confidences; assuming that the first sample is missing the first, third, and fifth attributes, the sample confidence can be represented as follows: , wherein represents the weight of attribute 3 relative to attribute 1 when filling attribute 1, represents the weight of attribute 5 relative to attribute 1 when filling attribute 1;
[0115] and so on, ; and so on, to calculate the value of ;
[0116] Step 6, label the missing values in the data set, return the coordinate position information of the missing values in the data set, and pre-fill according to the characteristics of the missing value attribute using the average value or mode or median;
[0117] In step 6, according to the relative position coordinates of step 1 , the position coordinates of the data to be filled in the training set and the test set are updated again ;
[0118] Step 7, divide the data set into training set and test set;
[0119] In step 7, 80% of the data set is the training set, and 20% is the test set;
[0120] Step 8, build a neural network and optimize the transmission path of the neural network; the number of output quantities of the model prediction sample is equal to the number of input quantities; add the predicted classification result to the output layer of the neural network; when filling a missing value, remove the corresponding input data quantity from the training model, and the specific network transmission function is as follows:
[0121] The transfer formula of the next level of the input layer is as follows formula (5):
[0122] (5)
[0123] The transfer formula between the hidden layers is as follows formula (6):
[0124] (6)
[0125] When the predicted value is a continuous value, the output value of the network is as formula (7):
[0126] (7)
[0127] When the predicted value is a binary classification attribute, the output transfer function of the network is formula (8); when the predicted value is a multi-classification attribute, the output transfer function of the network is formula (9)
[0128] (8)
[0129] (9)
[0130] In formula (5), (6), (7), (8), (9),
[0131] The confidence of the incomplete sample is , wherein represents the predicted value of the i-th sample in the j-th attribute The confidence level assigned to a sample when considering an attribute;
[0132] This represents the ReLU activation function;
[0133] Represents the sigmoid activation function;
[0134] Represents the softmax activation function;
[0135] Indicating the prediction of the first When the attribute is , the input layer of the neural network to the next layer is . The output of each neuron;
[0136] This indicates the second hidden layer. Each neuron predicts attributes Output at time;
[0137] This represents the output value of the network model;
[0138] Represents the first input sample Each attribute is connected to the second layer of the network. The transmission weights between neurons;
[0139] This represents the first hidden layer. The first neuron is connected to the second hidden layer. The transmission weights between neurons;
[0140] This indicates the second hidden layer. The attribute to be predicted from each neuron to the output layer Transmission weights between them;
[0141] Indicates the first The first input sample One attribute;
[0142] This refers to the bias of the network model.
[0143] There are a total of hidden layers. One neuron;
[0144] This indicates the number of attributes in the sample;
[0145] In step 8, the specific network structure diagram is as follows: Figure 2 As shown;
[0146] In the heart disease dataset, the first input of the dataset does not participate in the training when predicting the first output of the output layer, and by analogy, the second input of the dataset does not participate in the training of the model when predicting the second output of the output layer, until the last predicted value is outputted;
[0147] Step 9, one-hot encoding the classification attributes in the dataset; adding the prediction output of the classification attributes to the output layer of the neural network, and using the softmax activation function to output a set of probability values; and taking the product of the one-hot encoding of the predicted value and the accurate value as part of the loss function;
[0148] Step 10, optimizing the loss function; the multiple confidence values calculated are used in the loss function of the neural network model, and the influence degree of each sample on the model training is distinguished by adjusting the sample confidence;
[0149] The expression of the loss function is as follows:
[0150] (10)
[0151] In the formula,
[0152] represents the confidence of the i-th sample when filling the i-th missing attribute, represents that the attribute value is a continuous numerical variable; represents a classification attribute;
[0153] represents the i-th attribute in the i-th sample (the attribute is a continuous variable);
[0154] represents the predicted value of the i-th attribute in the i-th sample;
[0155] represents the classification result of the i-th attribute in the i-th sample (the classification result is represented by one-hot encoding); represents the predicted result of the i-th classification attribute in the i-th sample;
[0156] represents the predicted result of the i-th classification attribute in the i-th sample; represents the predicted result of the i-th classification attribute in the i-th sample;
[0157] represents the predicted result of the i-th classification attribute in the i-th sample;
[0158] The regression error and the classification error are combined and multiplied by the confidence of the sample to which the missing value to be filled corresponds as a final loss function; the number of sample training times follows the "early stopping" strategy to obtain the best filling effect; the 'early stopping' strategy is introduced to determine the best training times to obtain the best results during model training; if the training times are too few, underfitting will occur, and if the training times are too many, overfitting will occur; to solve this problem, the early stopping strategy is introduced; after each epoch, the test result on the validation set is obtained; as the epoch increases to a certain value, the error of the validation set will change from a downward trend to an upward trend, at which point the training is stopped, and the epoch at this time is the best training times;
[0159] Step 11, according to the missing value coordinates (A, B) recorded in step 6, compare the filled value with the accurate value in the original data to calculate the continuous value filling percentage error rate is the accurate value, is the filled value) and the accuracy rate of the classification attribute filling (filled correctly, , not correctly );
[0160] Comparative Example 2, without setting the sample confidence, directly training the sample;
[0161] Step 1, load the heart disease data set on the kaggle website; randomly missing the heart disease data set, save the relative position coordinates of the missing values in the data set to the local, denoted as (a, b); on the data set, the missing values of the classification attribute are filled with the mode, and the missing values of the continuous data are filled with the average value;
[0162] Step 2, eliminate the dimension effect between sample indicators, normalize the data set, and the data sample normalization formula is as follows formula (1):
[0163] (1)
[0164] wherein,
[0165] is the normalized value of the original data in the first row and the first column;
[0166] indicates the data in the sample that needs to be normalized;
[0167] indicates the maximum value of the data attribute;
[0168] representing the minimum value of the data attribute;
[0169] Step 3, label the missing values in the data set, return the coordinate position information of the missing values in the data set, and pre-fill according to the characteristics of the missing value attribute using the average value or mode or median;
[0170] In step 3, according to the relative position coordinates of step 1 , the position coordinates of the data to be filled in the training set and the test set are updated again ;
[0171] Step 4, divide the data set into training set and test set;
[0172] In step 4, 80% of the data set is the training set, and 20% is the test set;
[0173] Step 5, build a neural network and optimize the transmission path of the neural network; the number of output quantities of the model prediction sample is equal to the number of input quantities; add the predicted classification result to the output layer of the neural network; when filling a missing value, remove the corresponding input data quantity from the training model, and the specific network transmission function is as follows:
[0174] The transfer formula of the next level of the input layer is as follows formula (5):
[0175] (5)
[0176] The transfer formula between the hidden layers is as follows formula (6):
[0177] (6)
[0178] When the predicted value is a continuous value, the output value of the network is as formula (7):
[0179] (7)
[0180] When the predicted value is a binary classification attribute, the output transfer function of the network is formula (8); when the predicted value is a multi-classification attribute, the output transfer function of the network is formula (9)
[0181] (8)
[0182] (9)
[0183] In formula (5), (6), (7), (8), (9),
[0184] represents the relu activation function;
[0185] Represents the sigmoid activation function;
[0186] Represents the softmax activation function;
[0187] Indicating the prediction of the first When the attribute is , the input layer of the neural network to the next layer is . The output of each neuron;
[0188] This indicates the second hidden layer. Each neuron predicts attributes Output at time;
[0189] This represents the output value of the network model;
[0190] Represents the first input sample Each attribute is connected to the second layer of the network. The weights transmitted between neurons;
[0191] This represents the first hidden layer. The first neuron is connected to the second hidden layer. The weights transmitted between neurons;
[0192] This indicates the second hidden layer. The attribute to be predicted from each neuron to the output layer Transmission weights between them;
[0193] Indicates the first The first input sample One attribute;
[0194] This refers to the bias of the network model.
[0195] There are a total of hidden layers. One neuron;
[0196] This indicates the number of attributes in the sample;
[0197] Step 6: Perform one-hot encoding on the categorical attributes in the dataset; add the predicted output of the categorical attributes to the output layer of the neural network, use the softmax activation function to output a set of probability values, and use the product of the one-hot encoding of the predicted value and the accurate value as part of the loss function.
[0198] Step 7: Optimize the loss function; the expression for the loss function is as follows (10):
[0199] (10)
[0200] In the formula,
[0201] This indicates that the attribute value is a continuous numeric variable;
[0202] Indicates category attributes;
[0203] Indicates the first The first sample One attribute (this attribute is a continuous variable);
[0204] Indicates the first The first sample Predicted values for each attribute;
[0205] Indicates the first The first sample The classification results of each attribute (the classification results are represented by one-hot encoding);
[0206] Indicates the first The first sample Prediction results for each categorical attribute;
[0207] In step 7, the regression error and classification error The results are combined and multiplied by the confidence level of the missing value to be filled in the corresponding sample as the final loss function; the number of training iterations follows an "early stop" strategy to obtain the best filling effect;
[0208] Step 8: Based on the missing value coordinates (A, B) recorded in Step 3, compare the imputed values with the accurate values in the original data, and calculate the continuous value imputed percentage error rate. ( For accurate values, Accuracy of filling in values and categorical attributes (When filled correctly, When incorrect );
[0209] Comparative Example 3: Calculate the sample confidence based on the number of missing values, and then change the degree of influence of each sample on model training.
[0210] Step 1, load the heart disease dataset on Kaggle website; randomly missing the heart disease dataset, save the relative position coordinates of the missing values in the dataset to the local as (a, b); on the dataset, fill the missing values of the classification attribute with the mode, and fill the missing values of the continuous data with the average value;
[0211] Step 2, eliminate the dimensional influence between sample indicators, normalize the data set, and the data sample normalization formula is as follows (1):
[0212] (1)
[0213] Wherein,
[0214] is the normalized value of the original data in the i-th row and the j-th column; Indicates the data that needs to be normalized in the sample;
[0215] Indicates the maximum value of the data attribute;
[0216] Indicates the minimum value of the data attribute;
[0217] Step 3, count the number of missing values of each data sample and the total number of sample attributes, sample confidence = sample missing value number / sample attribute total number, each sample has only one confidence, and the sample confidence is recorded as , indicating the i-th sample;
[0218] Step 4, label the missing values of the data set, return the coordinate position information of the missing values in the data set, and pre-fill according to the characteristics of the missing value attribute, average value or mode or median;
[0219] In step 4, according to the relative position coordinates of step 1, the position coordinates of the data to be filled in the training set and the test set are updated again
[0220] ; Step 5, divide the data set into training set and test set;
[0221] In step 5, 80% of the data set is the training set, and 20% is the test set;
[0222]
[0223] Step 6, build a neural network, optimize the transmission path of the neural network; the model predicts the sample all attribute value output quantity equal to the input quantity; add the predicted classification result to the output layer of the neural network; when filling in a missing value, remove the corresponding input data quantity from the training model, the specific network transmission function is as follows:
[0224] The transfer formula of the next level of the input layer is as follows formula (5):
[0225] (5)
[0226] The transfer formula between hidden layers is as follows formula (6):
[0227] (6)
[0228] When the predicted value is continuous, the output value of the network is as formula (7):
[0229] (7)
[0230] When the predicted value is a binary classification attribute, the output transfer function of the network is formula (8); when the predicted value is a multi-classification attribute, the output transfer function of the network is formula (9)
[0231] (8)
[0232] (9)
[0233] In formula (5), (6), (7), (8), (9),
[0234] Represents the relu activation function;
[0235] Represents the sigmoid activation function;
[0236] Represents the softmax activation function;
[0237] Indicates the output of the first hidden layer of the neural network when predicting the first attribute; Indicates the output of the first hidden layer of the neural network when predicting the first attribute;
[0238] Indicates the output of the second hidden layer of the neural network when predicting the first attribute;
[0239] Indicates the output value of the network model;
[0240] represents the transmission weight between the first hidden layer and the second hidden layer; represents the transmission weight between the first hidden layer and the second hidden layer;
[0241] represents the transmission weight between the first hidden layer and the second hidden layer; represents the transmission weight between the first hidden layer and the second hidden layer;
[0242] represents the transmission weight between the first hidden layer and the second hidden layer; represents the transmission weight between the first hidden layer and the second hidden layer;
[0243] represents the transmission weight between the first hidden layer and the second hidden layer; represents the transmission weight between the first hidden layer and the second hidden layer;
[0244] represents the bias of the network model;
[0245] represents the total number of neurons in the hidden layer;
[0246] represents the number of attributes of the sample; Step 7, one-hot encoding of the classification attributes in the data set; adding the prediction output of the classification attributes to the output layer of the neural network, and outputting a set of probability values by using the softmax activation function, and taking the product of the one-hot encoding of the predicted value and the accurate value as part of the loss function;
[0247] Step 8, optimizing the loss function; the multiple confidence values calculated are applied to the loss function of the neural network model, and the influence degree of each sample on the model training is distinguished by adjusting the sample confidence;
[0248] The expression of the loss function is as follows:
[0249]
[0250] (10) In the formula,
[0251]
[0252] represents the confidence of the i-th sample; represents that the attribute value is a continuous numerical variable;
[0253] represents that the attribute value is a continuous numerical variable;
[0254] represents a classification attribute;
[0255] represents the first attribute in the first sample (the attribute is a continuous variable);
[0256] represents the predicted value of the first attribute in the first sample;
[0257] represents the classification result of the first attribute in the first sample (the classification result is represented by one-hot encoding);
[0258] represents the predicted result of the first classification attribute in the first sample;
[0259] In step 8, the regression error and the classification error are combined and multiplied by the confidence of the sample to be filled with missing values as the final loss function; the number of sample training times follows the "early stopping" strategy to obtain the best filling effect;
[0260] Step 9, according to the missing value coordinates (A, B) recorded in step 4, compare the filling value with the accurate value in the original data, calculate the continuous value filling percentage error rate is the accurate value, is the filling value) and the accuracy rate of the classification attribute filling (when filling correctly, ,when incorrectly ) Comparative Example 4, fill the missing value attribute with the random forest algorithm;
[0261] Except that the random forest algorithm is used to fill the missing value attribute, the rest is the same as Example 1;
[0262] Test Example 5, compare the filling results of Example 1, Comparative Example 2, Comparative Example 3, Comparative Example 4
[0263] Set evaluation index:
[0264]
[0265] According to the data type, it is divided into continuous data and discrete data; in the calculation of the filling accuracy of continuous data, the mean absolute percentage error (MAPE) is used as the index for evaluating the data filling quality; in the evaluation of the filling quality of discrete data, the filling accuracy (ACC) is used to describe the filling precision; the calculation formulas of the two are as follows:
[0266]
[0267]
[0268] In the formula,
[0269] indicates the predicted value of the i th sample;
[0270] indicates the accurate value of the original sample;
[0271] indicates the number of samples of the data set, when the predicted value is consistent with the original data value in the prediction of discrete data, , when the predicted value is inconsistent with the original data value, ;
[0272] The final result is as follows in Table 1:
[0273] Table 1 Comparison results of four filling methods
[0274]
[0275] It can be obtained that the filling result of the method for repairing missing values of medical data based on multiple confidence levels has the highest filling accuracy (ACC) and the lowest percentage error (MAPE) compared with the comparative examples 2, 3 and 4, and the effect is the best;
[0276] In summary, the technical scheme of the patent fills the multi-dimensional data missing values in the batch data set samples, improves the filling efficiency, reasonably adds the data samples with multi-dimensional missing values to the training model, fully excavates the data information in the data set, improves the utilization rate of the data in the original data set, speeds up the efficiency of data filling, and improves the accuracy of data filling;
[0277] The above describes the preferred embodiments of the present application in detail. It should be understood that those skilled in the art can make many modifications and changes without creative labor based on the concept of the present application. Therefore, any technical solution obtained by logical analysis, reasoning or limited test based on the prior art according to the concept of the present application shall be within the protection scope determined by the claims.
Claims
1. A method for repairing missing values in medical data based on multi-reset reliability, characterized in that, Includes the following steps: Step 1: Import the missing dataset; Step 2: Eliminate the influence of dimensions between sample indicators and normalize the dataset; Step 3: Calculate the correlation matrix between the attributes using statistical methods; Step 4: Update the weights of the remaining attributes relative to the target attribute using the correlation coefficients obtained in Step 3; The target attribute is all attributes in the sample set; Step 5: Calculate the confidence score for each sample set; this specifically includes the following steps: Step 5-1: Calculate the weights of other attributes in the sample relative to the target attribute, following the method in Step 4; calculate the multiple reset reliability of the sample according to formula (4). The degree of sample corruption is obtained by summing the weights of all missing value attributes: (4) in, ms indicates the missing attribute; Indicates the first Predicting the first sample in the nth sample The confidence level of a sample when considering each attribute; Representing attributes Relative to attributes The weights; Step 5-2: Fill in all missing values at once using an autoassociative neural network model; under the premise of uncertainty about the missing attributes of the sample, output a predicted value for each attribute of the sample; when predicting each attribute, the sample will obtain a new confidence score, that is, the number of confidence scores for a sample is equal to the number of dimensions. Step 6: Label the missing values in the dataset, return the coordinate position information of the missing values in the dataset, and pre-fill them with the mean, mode or median according to the characteristics of the missing value attributes. Step 7: Divide the dataset into a training set and a test set; Step 8: Build the neural network and optimize its transmission path; ensure the number of output values for all predicted attributes of the sample equals the number of input values; add the predicted classification result to the output layer of the neural network; when filling in a missing value, remove the corresponding input data from the training model. Step 9: Perform one-hot encoding on the categorical attributes in the dataset; Step 10: Optimize the loss function; apply the calculated multi-reset confidence to the loss function of the neural network model, and distinguish the degree of influence of each sample on the model training by adjusting the sample confidence; introduce an 'early stop' strategy to maximize the prediction accuracy; In step 10, The expression for the loss function is as follows (10): (10) In the formula, Indicates the first The sample is filled in the first... When one attribute is missing, the confidence level of the sample. This indicates that the attribute value is a continuous numeric variable; Indicates category attributes; Let i represent the i-th attribute in the k-th sample; the attribute is a continuous variable. This represents the predicted value of the i-th attribute in the k-th sample; This represents the classification result of the i-th attribute of the k-th sample; the classification result is represented using one-hot encoding. This represents the prediction result of the i-th classification attribute of the k-th sample.
2. The method for repairing missing values in medical data based on multiple reset reliability as described in claim 1, wherein in step 2, the following is characterized in that: The data sample normalization formula is as follows (1): (1) in, This is the normalized value of the original data in row a and column b; This represents the data in the sample that needs to be normalized; This indicates the maximum value of the data attribute; This represents the minimum value of the data attribute.
3. The method for repairing missing values in medical data based on multiple reset reliability as described in claim 1, wherein step 3 is characterized in that, The formula for calculating the correlation coefficient between features is as follows (2): (2) in, Representing attributes and attributes The correlation between them; Representing attributes and attributes covariance; and Representing attributes and attributes The variance.
4. The method for repairing missing values in medical data based on multiple reset reliability as described in claim 1, wherein step 4 is characterized in that, The specific weight calculation formula is as follows (3): (3) in, Representing attributes Relative to attributes The weights; This indicates the total number of all attributes of the sample.
5. The method for repairing missing values in medical data based on multiple reset reliability as described in claim 1, wherein step 8 is characterized in that, The specific network transmission functions are as follows: The transfer formula for the next level of the input layer is as follows (5): (5) The transfer formula between hidden layers is as follows (6): (6) When the predicted value is a continuous value, the output value of the network is as shown in equation (7): (7) When the predicted value is a binary classification attribute, the output transfer function of the network is formula (8); when the predicted value is a multi-class classification attribute, the output transfer function of the network is formula (9). (8) (9) In equations (5), (6), (7), (8), and (9), The confidence level of incomplete samples is The This represents the confidence level assigned to a sample when predicting the i-th attribute of the k-th sample; This represents the ReLU activation function; Represents the sigmoid activation function; Represents the softmax activation function; Indicating the prediction of the first When the attribute is , the input layer of the neural network to the next layer is . The output of each neuron; This indicates the second hidden layer. Each neuron predicts attributes Output at time; This represents the output value of the network model; Represents the first input sample Each attribute is connected to the second layer of the network. The transmission weights between neurons; This represents the first hidden layer. The first neuron is connected to the second hidden layer. The transmission weights between neurons; This indicates the second hidden layer. The attribute to be predicted from each neuron to the output layer Transmission weights between them; Indicates the first The first input sample One attribute; This refers to the bias of the network model. There are a total of hidden layers. One neuron; This indicates the number of attributes in the sample.
6. The method for repairing missing values in medical data based on multiple reset reliability as described in claim 1, wherein in step 10, the following is characterized in that... The 'early stopping' strategy is introduced during model training to determine the optimal number of training iterations to obtain the best results. For example, too few training iterations will cause underfitting, while too many will cause overfitting. To solve the overfitting problem, an early stopping strategy is introduced. After each epoch, test results are obtained on the validation set. As the number of epochs increases to a certain value, the error on the validation set will change from a decreasing trend to an increasing trend. At this point, training is stopped, and the epoch at this time is the optimal number of training iterations.
Citation Information
Patent Citations
KNN-based improved missing data filling algorithm
CN106407464A
Pipeline defect detection method based on multi-scale features of convolutional neural network
CN113052834A