A method for verifying laboratory data based on ensemble learning and changing decision threshold
Through the method of integrating learning and changing decision thresholds, combined with multiple single classifiers and clustering algorithms, the problem of low classification accuracy in traditional laboratory data verification methods is solved, and higher classification accuracy and unbalanced data are achieved. Processing capability.
Patent Information
- Application Number
- CN202010612164.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2040-06-29
AI Technical Summary
Traditional test data verification methods rely on doctors’ experience and external environment, and single classifiers are difficult to ensure the classification accuracy of test data, especially when the data types are diverse and complex.
Using an integrated learning and changing decision threshold method, the data acquisition, cleaning and classification modules are established between the remote terminal and the central server, combined with KNN, decision tree, support vector machine and logistic regression algorithm as the base classifier, and FCM fuzzing is used The clustering algorithm calculates the weights and adjusts the threshold according to the number of samples during the decision-making stage, combining multi-index evaluation to ensure the accuracy of the classification results.
The classification accuracy of the assay data is improved, the processing ability of unbalanced data sets is enhanced, and the reliability and accuracy of the classification results are improved through multi-angle evaluation.
Smart Images

Figure CN111858568B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of big data and relates to a method for verifying test data based on integrated learning and changing decision thresholds. Background Art
[0002] The accuracy of traditional laboratory data depends on the doctor's experience and the external laboratory environment. The interference of the external environment will also have an adverse effect on the laboratory data. With the continuous development of machine learning, scholars have begun to study the accuracy verification methods of laboratory data based on machine learning in recent years. However, the types of data are diverse and becoming more and more complex and diverse. The verification of laboratory data based on a single classifier can no longer guarantee the accuracy of its classification. Summary of the invention
[0003] The purpose of the present invention is to provide a method for verifying laboratory data based on integrated learning and changing decision thresholds, which solves the technical problem of effectively verifying the classification accuracy of laboratory data.
[0004] To achieve the above object, the present invention adopts the following technical solution:
[0005] A method for verifying test data based on integrated learning and changing decision thresholds comprises the following steps:
[0006] Step 1: Establish several remote terminals and a central server, and all remote terminals communicate with the central server through the Internet;
[0007] Establishing a data collection module, a data cleaning module and a classification module in the remote terminal;
[0008] Establishing comparative data sets and multi-index evaluation modules in the central server;
[0009] Step 2: The remote terminal obtains body fluid test data through the data acquisition module, establishes a body fluid data set, and cleans the data in the body fluid data set in the data cleaning module, including the following steps:
[0010] Step S1: Process missing values and abnormal values in the body fluid test data, remove abnormal data, and obtain a preprocessed data set;
[0011] Step S2: convert the data in the preprocessed data set into data at the same level by mean-variance normalization to obtain the preprocessed data set;
[0012] Step S3: Divide 70% of the data in the preprocessed data set into a training set, and then divide 30% of the data into a test set;
[0013] Step 3: The classification module selects four different single classifiers, namely KNN, decision tree, support vector machine and logistic regression algorithm, as base classifiers and combines them to obtain an integrated classifier;
[0014] Step 4: The remote terminal reads the comparison data set in the central service;
[0015] Step 5: The classification module calculates the base classifier weights, including the following steps:
[0016] Step S4: clustering the samples in the training set into two categories of samples using the FCM fuzzy clustering algorithm;
[0017] Step S5: The base classifiers classify the two types of samples respectively, and compare them with the actual labels in the comparison data set to obtain the classification error rate e of each base classifier;
[0018] Step S6: According to the formula Calculate the weight w of each base classifier;
[0019] Step 6: The classification module calculates the Euclidean distance from each test sample in the test set to each cluster center, and uses the reciprocal of the Euclidean distance as the similarity S between each test sample and the two types of samples obtained in step S4, and uses the similarity S as the similarity value of the test sample;
[0020] Step 7: The classification module calculates the exclusive weight W of the test sample i by the following formula i :
[0021] W i = similarity S × weight w;
[0022] Calculate each test sample to obtain the exclusive weight W of each test sample relative to each base classifier i ;
[0023] Step 8: The test sample will get a classification probability p on each base classifier, and the exclusive weight W of the test sample i Multiplying by the classification probability p, the final probabilities P1 and P0 of classifying the test sample into the two types of samples obtained in step S4 are obtained;
[0024] The two types of samples are set to be 1-type samples and 0-type samples, respectively, and the number of samples they contain is N1 and N0, respectively. According to the number of samples N1 and N0, the decision threshold is changed: when (P1÷P0)>(N1÷N0) is satisfied, the test sample is predicted as a 1-type sample; otherwise, it is a 0-type sample;
[0025] Step 9: The remote terminal packages the classification results and body fluid test data obtained in step 8 and sends them to the central server. The central server stores the classification results and uses a multi-indicator evaluation module to evaluate the accuracy of the classification results from multiple angles based on multiple different indicators such as accuracy ACC, precision Precision, recall rate Recall, F1-score, AUC, sensitivity TPR and specificity TNR.
[0026] Preferably, the remote terminal is a tablet computer, a computer terminal or a smart phone.
[0027] Preferably, the body fluid test data is acquired by a test center device and sent to the remote terminal via a mobile network or WIFI.
[0028] The laboratory data verification method based on ensemble learning and changing the decision threshold described in the present invention solves the technical problem of effectively verifying the classification accuracy of laboratory data. The present invention combines clustering algorithms, the idea of ensemble learning and several methods of changing the decision threshold to obtain a new strong classifier, and learns based on existing laboratory data to obtain a classification model, pre-classifies new laboratory data to increase its accuracy. By combining four different single classifiers, it has stronger classification ability. For the problem of data imbalance in disease data sets, in the final decision stage, the classification accuracy is improved by changing the decision threshold, and the classification results are evaluated from multiple angles through multiple indicators to better understand the accuracy of the classification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a system architecture diagram of the present invention;
[0030] Figure 2 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0031] like Figure 1-Figure 2 A method for verifying test data based on integrated learning and changing decision thresholds is shown, comprising the following steps:
[0032] Step 1: Establish several remote terminals and a central server, and all remote terminals communicate with the central server through the Internet;
[0033] Establishing a data collection module, a data cleaning module and a classification module in the remote terminal;
[0034] Establishing comparative data sets and multi-index evaluation modules in the central server;
[0035] Step 2: The remote terminal obtains body fluid test data through the data acquisition module, establishes a body fluid data set, and cleans the data in the body fluid data set in the data cleaning module, including the following steps:
[0036] Step S1: Process missing values and abnormal values in the body fluid test data, remove abnormal data, and obtain a preprocessed data set;
[0037] Step S2: convert the data in the preprocessed data set into data at the same level by mean-variance normalization to obtain the preprocessed data set;
[0038] Step S3: Divide 70% of the data in the preprocessed data set into a training set, and then divide 30% of the data into a test set;
[0039] Step 3: The classification module selects four different single classifiers, namely KNN, decision tree, support vector machine and logistic regression algorithm, as base classifiers and combines them to obtain an integrated classifier;
[0040] The present invention classifies four base classifier branches, calculates the results of the four base classifiers by different weight distribution, etc., obtains the final classification result, and then integrates them together.
[0041] Step 4: The remote terminal reads the comparison data set in the central service;
[0042] Step 5: The classification module calculates the base classifier weights, including the following steps:
[0043] Step S4: clustering the samples in the training set into two categories of samples using the FCM fuzzy clustering algorithm;
[0044] Step S5: The base classifiers classify the two types of samples respectively, and compare them with the actual labels in the comparison data set to obtain the classification error rate e of each base classifier;
[0045] Step S6: According to the formula Calculate the weight w of each base classifier;
[0046] Step 6: The classification module calculates the Euclidean distance from each test sample in the test set to each cluster center, and uses the reciprocal of the Euclidean distance as the similarity S between each test sample and the two types of samples obtained in step S4, and uses the similarity S as the similarity value of the test sample;
[0047] Step 7: The classification module calculates the exclusive weight W of the test sample i by the following formula i :
[0048] W i = similarity S × weight w;
[0049] Calculate each test sample to obtain the exclusive weight W of each test sample relative to each base classifier i;
[0050] Step 8: The test sample will get a classification probability p on each base classifier, and the exclusive weight W of the test sample i Multiplying by the classification probability p, the final probabilities P1 and P0 of classifying the test sample into the two types of samples obtained in step S4 are obtained;
[0051] The two types of samples are set to be 1-type samples and 0-type samples, respectively, and the number of samples they contain is N1 and N0, respectively. According to the number of samples N1 and N0, the decision threshold is changed: when (P1÷P0)>(N1÷N0) is satisfied, the test sample is predicted as a 1-type sample; otherwise, it is a 0-type sample;
[0052] Step 9: The remote terminal packages the classification results and body fluid test data obtained in step 8 and sends them to the central server. The central server stores the classification results and uses a multi-indicator evaluation module to evaluate the accuracy of the classification results from multiple angles based on multiple different indicators such as accuracy ACC, precision Precision, recall rate Recall, F1-score, AUC, sensitivity TPR and specificity TNR.
[0053] ACC is the ratio of all correctly classified samples to all samples; Precision is the ratio of positive samples predicted to be positive; Recall is the ratio of all positive samples found; F1 score is an indicator of the combined precision and recall; AUC is the area under the ROC curve; TPR is the probability of detecting positive samples in the diseased (positive) population. (The ability to detect patients with disease); TNR is the probability of detecting negative samples in the disease-free (negative) population. (The ability to detect patients without disease).
[0054] Preferably, the remote terminal is a tablet computer, a computer terminal or a smart phone.
[0055] Preferably, the body fluid test data is acquired by a test center device and sent to the remote terminal via a mobile network or WIFI.
[0056] The laboratory data verification method based on ensemble learning and changing the decision threshold described in the present invention solves the technical problem of effectively verifying the classification accuracy of laboratory data. The present invention combines clustering algorithms, the idea of ensemble learning and several methods of changing the decision threshold to obtain a new strong classifier, and obtains a classification model based on existing laboratory data. The new laboratory data is pre-classified to increase its accuracy. By combining four different single classifiers, it has stronger classification ability. For the problem of data imbalance in disease data sets, in the final decision stage, the classification accuracy is improved by changing the decision threshold, and the classification results are evaluated from multiple indicators and multiple angles to better understand the accuracy of the classification results.
Claims
1. A method for verifying laboratory data based on ensemble learning and changing decision thresholds, characterized in that: The steps include: Step 1: Establish several remote terminals and a central server, and all remote terminals communicate with the central server through the Internet; Establishing a data collection module, a data cleaning module and a classification module in the remote terminal; Establishing comparative data sets and multi-index evaluation modules in the central server; Step 2: The remote terminal obtains body fluid test data through the data acquisition module, establishes a body fluid data set, and cleans the data in the body fluid data set in the data cleaning module, including the following steps: Step S1: Process missing values and abnormal values in body fluid test data, remove abnormal data, and obtain a preprocessed data set; Step S2: convert the data in the preprocessed data set into data at the same level by mean-variance normalization to obtain the preprocessed data set; Step S3: Divide 70% of the data in the preprocessed data set into a training set, and then divide 30% of the data into a test set; Step 3: The classification module selects four different single classifiers, namely KNN, decision tree, support vector machine and logistic regression algorithm, as base classifiers and combines them to obtain an integrated classifier; Step 4: The remote terminal reads the comparison data set in the central service; Step 5: The classification module calculates the base classifier weights, including the following steps: Step S4: clustering the samples in the training set into two categories of samples using the FCM fuzzy clustering algorithm; Step S5: The base classifiers classify the two types of samples respectively, and compare them with the actual labels in the comparison data set to obtain the classification error rate e of each base classifier; Step S6: According to the formula Calculate the weight w of each base classifier; step 6: The classification module calculates the Euclidean distance from each test sample in the test set to each cluster center, takes the reciprocal of the Euclidean distance as the similarity S between each test sample and the two types of samples obtained in step S4, and takes the similarity S as the similarity value of the test sample; Step 7: The classification module calculates the exclusive weight W of the test sample i by the following formula i W i = similarity S × weight w; Calculate each test sample to obtain the exclusive weight W of each test sample relative to each base classifier i ; Step 8: The test sample will get a classification probability p on each base classifier, and the exclusive weight W of the test sample i Multiplying by the classification probability p, the final probabilities P1 and P0 of classifying the test sample into the two types of samples obtained in step S4 are obtained; The two types of samples are set to be 1-type samples and 0-type samples, respectively, and the number of samples they contain is N1 and N0, respectively. According to the number of samples N1 and N0, the decision threshold is changed: when (P1÷P0)>(N1÷N0) is satisfied, the test sample is predicted as a 1-type sample; otherwise, it is a 0-type sample; Step 9: The remote terminal packages the classification results and body fluid test data obtained in step 8 and sends them to the central server. The central server stores the classification results and uses a multi-indicator evaluation module to evaluate the accuracy of the classification results from multiple angles based on multiple different indicators such as accuracy ACC, precision Precision, recall rate Recall, F1-score, AUC, sensitivity TPR and specificity TNR.
2. A method for verifying test data based on ensemble learning and changing decision thresholds as claimed in claim 1, characterized in that: The remote terminal is a tablet computer, a computer terminal or a smart phone.
3. The method for verifying test data based on ensemble learning and changing decision threshold according to claim 1, characterized in that: The body fluid test data is acquired by the test center equipment and sent to the remote terminal via the mobile network or WIFI.
