Medical detection data classification model training method, classification method, device and equipment
By increasing the weights of minority and hard-to-distinguish sample data in the gradient boosting tree algorithm and filling in missing indicator values in the sample data, the problem of low accuracy in medical test data classification models is solved, and the classification accuracy of the model is improved.
Patent Information
- Application Number
- CN202210663419.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-06-13
AI Technical Summary
The imbalance between the number of positive and negative samples in medical testing data leads to an inaccurate classification model, resulting in low classification accuracy.
The gradient boosting tree algorithm is adopted to increase the weight of minority class and hard-to-distinguish sample data when calculating pseudo residuals. The improved gradient boosting tree algorithm is used to learn the sample data to generate a medical test data classification model and fill in missing indicator values in the sample data.
It improved the accuracy of the medical testing data classification model, especially the ability to distinguish minority class samples and difficult-to-distinguish samples, thus improving the overall performance of the model.
Smart Images

Figure CN114970738B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a method for training a medical test data classification model, a method for classifying medical test data, an apparatus, and equipment. Background Technology
[0002] During a patient's medical treatment process, medical testing data is generated, such as biochemical test data after biochemical indicators are tested.
[0003] Currently, combining artificial intelligence technology with medical testing data can transform this data into clinically usable knowledge. For example, by inputting medical testing data into a classification model, classification results can be obtained. These classification results can provide doctors with a reference for clinical diagnosis.
[0004] However, due to the imbalance between the number of positive and negative samples in medical test data, the classification model for medical test data trained is not accurate enough, resulting in a low classification accuracy for medical test data. Summary of the Invention
[0005] In view of this, embodiments of this application provide a method for training a medical testing data classification model, a method, apparatus, and equipment for classifying medical testing data, which trains a medical testing data classification model with high recognition accuracy, and the classification of medical testing data based on the medical testing data classification model is more accurate.
[0006] To address the above problems, the technical solutions provided in this application are as follows:
[0007] A method for training a medical testing data classification model, the method comprising:
[0008] Acquire medical testing data, which includes the values of multiple testing indicators;
[0009] The medical testing data and the corresponding classification labels are combined to form sample data, wherein the classification labels include positive sample labels and negative sample labels;
[0010] The gradient boosting tree algorithm is used to learn from the sample data to generate a medical testing data classification model. In each round of learning of the gradient boosting tree algorithm, when calculating the pseudo residual, the weights of minority class samples and hard-to-class samples are increased. The minority class samples are those that include the positive sample labels, and the hard-to-class samples are those whose predicted values meet the conditions when calculating the pseudo residual.
[0011] In one possible implementation, the step of using the gradient boosting tree algorithm to learn the sample data and generate a medical testing data classification model includes:
[0012] Construct base learners;
[0013] The pseudo-residual is calculated based on the classification label of the sample data, the predicted value of the sample data, the first adjustment parameter, and the second adjustment parameter. The predicted value of the sample data is obtained by inputting the medical test data in the sample data into the previously obtained learner. When calculating the pseudo-residual for the first time, the previously obtained learner is the base learner. The first adjustment parameter is used to increase the weight of minority class sample data in the sample data, and the second adjustment parameter is used to increase the weight of difficult-to-distinguish sample data in the sample data.
[0014] A regression tree is learned by fitting the pseudo-residuals;
[0015] Using the regression tree and the previously obtained learner, a new learner is obtained;
[0016] Repeat the steps of calculating pseudo-residuals based on the classification labels of the sample data, the predicted probability values of the sample data, the first adjustment parameter, and the second adjustment parameter, and then proceed until the stopping condition is met, thereby generating a medical testing data classification model.
[0017] In one possible implementation, the formula for calculating the pseudo-residual is:
[0018]
[0019] Among them, y i The classification labels for the sample data. The predicted value of the sample data is α, where α is the first adjustment parameter. and This is the second adjustment parameter;
[0020] Used to increase the weight of hard-to-distinguish sample data in sample data that includes positive sample labels. Used to increase the weight of hard-to-distinguish sample data in sample data that includes negative sample labels.
[0021] In one possible implementation, the method further includes:
[0022] If the sample data contains missing values for the detection indicators, the missing indicator values in the sample data are filled in.
[0023] In one possible implementation, filling in the missing indicator values in the sample data includes:
[0024] For the first sample data including positive sample labels and the second sample data including negative sample labels, the detection indicators are sorted according to the missing rate of the indicator values of the detection indicators;
[0025] The missing index values in the first target detection index are initially filled according to the median value of the normal range of the first target detection index, where the first target detection index is each of the detection indexes.
[0026] For the first sample data, detection indicators are selected as second target detection indicators in descending order of the missing rate. The currently filled indicator values of the second target detection indicator in the original first sample data lacking the second target detection indicator are removed. The indicator values of other detection indicators in each original first sample data lacking the second target detection indicator are input into a first regression prediction model to obtain the predicted indicator value for the second target detection of that first sample data, and the second target detection of that first sample data is filled. The process of selecting detection indicators as second target detection indicators in descending order of the missing rate and subsequent steps is repeated until all detection indicators with missing values are selected.
[0027] For the second sample data, detection indicators are selected as the third target detection indicators according to the missing rate from high to low. The currently filled indicator values of the third target detection indicator in the original second sample data that lacks the third target detection indicator are removed. The indicator values of other detection indicators in each original second sample data that lacks the third target detection indicator are input into the second regression prediction model to obtain the predicted indicator value of the third target detection for the second sample data, and the third target detection for the second sample data is filled. The process of selecting detection indicators as the third target detection indicators according to the missing rate from high to low and subsequent steps is repeated until all detection indicators with missing indicator values are selected.
[0028] In one possible implementation, acquiring medical test data includes:
[0029] Obtain biochemical test data and medical imaging reports;
[0030] Extract the values of biochemical indicators from the biochemical test data;
[0031] Extract the indicator values corresponding to the preset text from the medical imaging report;
[0032] The values of the biochemical indicators and the corresponding values of the preset text are used as the values of the detection indicators to generate medical testing data.
[0033] A method for classifying medical test data, the method comprising:
[0034] Obtain medical test data to be classified;
[0035] The medical test data to be classified is input into the medical test data classification model to obtain the classification result of the medical test data to be classified; the medical test data classification model is trained according to the above-mentioned training method for the medical test data classification model.
[0036] A training device for a medical testing data classification model, the device comprising:
[0037] The first acquisition unit is used to acquire medical test data, which includes the index values of multiple test indicators.
[0038] A generation unit is used to combine the medical test data and the corresponding classification labels to form sample data, wherein the classification labels include positive sample labels and negative sample labels.
[0039] The training unit is used to learn the sample data using the gradient boosting tree algorithm to generate a medical testing data classification model. During each round of learning of the gradient boosting tree algorithm, when calculating the pseudo residual, the weights of minority class samples and hard-to-class samples in the sample data are increased. The minority class samples are those including the positive sample labels, and the hard-to-class samples are those whose predicted values meet the conditions when calculating the pseudo residual.
[0040] A medical testing data classification device, the device comprising:
[0041] The second acquisition unit is used to acquire medical test data to be classified.
[0042] A classification unit is used to input the medical test data to be classified into a medical test data classification model to obtain the classification result of the medical test data to be classified; the medical test data classification model is trained according to the above-mentioned training method for the medical test data classification model.
[0043] A training device for a medical testing data classification model includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the training method for the medical testing data classification model as described above.
[0044] A medical test data classification device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the medical test data classification method described above.
[0045] A computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform either the training method for the medical test data classification model described above, or the medical test data classification method described above.
[0046] Therefore, the embodiments of this application have the following beneficial effects:
[0047] In this embodiment, medical testing data for training is first obtained. This medical testing data corresponds to classification labels with positive and negative sample labels. The medical testing data and their corresponding classification labels are then combined to form sample data. During the learning process using the gradient boosting tree algorithm on the sample data, in the step of calculating the pseudo-residuals, the weights of minority class samples and hard-to-distinguish samples are increased. This improves the ability of the trained medical testing data classification model to distinguish between minority class and hard-to-distinguish samples, further enhancing the accuracy of the medical testing data classification model. Attached Figure Description
[0048] Figure 1 A schematic diagram illustrating an exemplary scenario provided in an embodiment of this application;
[0049] Figure 2 A flowchart illustrating a training method for a medical testing data classification model provided in this application embodiment;
[0050] Figure 3 This is a schematic diagram of the statistical results of the predicted values of the sample data in the embodiments of this application;
[0051] Figure 4 This is a schematic diagram showing the value of the second adjustment parameter in an embodiment of this application;
[0052] Figure 5 This is a schematic diagram showing the value of the second adjustment parameter in an embodiment of this application;
[0053] Figure 6 A flowchart illustrating a medical testing data classification method provided in this application embodiment;
[0054] Figure 7 A schematic diagram illustrating another exemplary scenario provided in this application embodiment;
[0055] Figure 8 A schematic diagram of the structure of a training device for a medical testing data classification model provided in an embodiment of this application;
[0056] Figure 9This is a schematic diagram of a medical testing data classification device provided in an embodiment of this application. Detailed Implementation
[0057] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0058] To facilitate understanding and explanation of the technical solutions provided in the embodiments of this application, the background technology of the embodiments of this application will be introduced below.
[0059] Currently, medical test data is categorized by inputting it into a medical test data classification model. The classification results can then provide doctors with a reference for clinical diagnosis.
[0060] In one application scenario, the classification of medical testing data can be used for risk classification of rare diseases. Rare diseases are those with very low incidence rates and are extremely uncommon. Effective risk warning for rare diseases is currently a crucial step in optimizing the diagnosis and treatment process for rare diseases. By inputting medical testing data into a medical testing data classification model, the classification results are obtained, and the probability values included in the classification results can predict the potential risk of a certain type of rare disease.
[0061] It is important to note that the classification results of medical test data can be used as reference data for doctors. Doctors can use other test results to make further diagnoses. However, the classification results of medical test data cannot be used as diagnostic results.
[0062] However, due to the imbalance between the number of positive and negative samples in medical test data, the classification model for medical test data trained is not accurate enough, resulting in a low classification accuracy for medical test data.
[0063] Based on this, embodiments of this application provide a training method for a medical testing data classification model, a medical testing data classification method, an apparatus, and a device. In this training method, a gradient-corrected boosting approach is used. During the learning process of the sample data using the gradient boosting tree algorithm, the weight of minority class samples is increased, i.e., the proportion of minority class samples in the overall loss of the classification problem is increased. Simultaneously, the weight of difficult-to-classify samples is increased, i.e., the proportion of difficult-to-classify samples in the overall loss of the classification problem is increased, and the interference of outlier samples is suppressed, thereby further improving the performance of the medical testing data classification model.
[0064] To facilitate understanding of the medical testing data classification model training method provided in the embodiments of this application, combined with Figure 1 Exemplary application scenarios will be described. Figure 1This is a schematic diagram of an exemplary scenario provided in an embodiment of this application.
[0065] First, medical testing data for training is acquired. This data includes classification labels, both positive and negative. Then, sample data is generated from the medical testing data and their corresponding classification labels. This embodiment improves the pseudo-residual calculation method in the gradient boosting tree algorithm, using the improved algorithm to learn from the sample data and generate a medical testing data classification model. Inputting the medical testing data to be classified into the trained medical testing data classification model yields the classification result.
[0066] It should be noted that, Figure 1 The block diagram shown is only an example for illustration, and the medical test data classification model training method provided in this application embodiment is not limited to the above example.
[0067] Based on the above description, this application provides a specific implementation method for training a medical testing data classification model.
[0068] See Figure 2 , Figure 2 This is a flowchart illustrating a method for training a medical testing data classification model, as provided in an embodiment of this application. Figure 2 As shown, the method includes S201-S203:
[0069] S201: Obtain medical testing data, which includes the values of multiple testing indicators.
[0070] After a patient undergoes relevant medical examinations, medical test data is generated. For each specific category within a trained medical test data classification model, corresponding medical test data for different patients is obtained. For example, if the model is used to classify blood conditions, then blood-related medical test data is obtained. If the model is used to predict the risk of a rare disease, then medical test data related to that rare disease is obtained.
[0071] Medical testing data includes the values of multiple testing indicators. The values of these indicators are usually numerical, and therefore, the values of these indicators fall within a normal range.
[0072] The sources of medical testing data can include biochemical test data generated after conducting biochemical tests and medical imaging reports generated after conducting medical imaging tests. In one possible implementation, acquiring medical testing data can include:
[0073] Acquire biochemical test data and medical imaging reports; extract biochemical indicator values from the biochemical test data; extract indicator values corresponding to preset text from the medical imaging reports; use the biochemical indicator values and the indicator values corresponding to the preset text as the test indicator values to generate medical test data.
[0074] In other words, biochemical indicator values can be extracted from biochemical test data and used as indicator values for medical test data. Similarly, indicator values corresponding to preset text in medical imaging reports can be extracted using regular expression matching, semantic recognition, and other methods and used as indicator values for medical test data.
[0075] Furthermore, when the indicator value corresponding to the preset text in a medical imaging report is not numerical, the indicator can be converted into a numerical value through semantic recognition of the relevant text. For example, if the medical imaging report text is: "No fluid-filled dark area seen in the pericardial cavity," then the indicator value for the detection indicator of whether a fluid-filled dark area exists in the pericardial cavity is "not seen," and this indicator value can be converted to 0.
[0076] It is understood that the values of the test indicators in medical test data can be entirely biochemical indicators, entirely indicators corresponding to preset text extracted from medical imaging reports, or a combination of both. This application does not limit the types of test indicator values included in the medical test data.
[0077] The following example illustrates this with a practical application. We will use a medical testing data classification model to predict the risk of the rare disease "amyloidosis" as an example. We collected 530 amyloidosis samples and 4500 non-amyloidosis samples from a multi-center rare disease amyloidosis big data platform. We obtained the age, several biochemical test data, and echocardiogram reports of the control group. The non-amyloidosis sample data was relatively abundant.
[0078] The specific biochemical indicators include: troponin I, N-terminal precursor brain natriuretic peptide, ejection fraction, serum creatinine, albumin, total bilirubin, and alkaline phosphatase. The normal range values for each indicator are shown in the table below:
[0079] detection indicators Lower limit of normal range Upper limit of normal range Troponin I 0 0.0198 N-terminal precursor brain natriuretic peptide 0 300 serum creatinine 45 84 albumin 35 53 Total bilirubin 3.4 20.5 alkaline phosphatase 40 150
[0080] Echocardiogram reports are saved in text format in the original database. An example of a single data entry format is shown below:
[0081] Two-dimensional measurement (mm):
[0082] Aortic root diameter: 28 mm; Left atrial diameter: 28 mm; Right ventricular diameter: 20 mm
[0083] Interventricular septal thickness: 9 mm; Left ventricular end-diastolic diameter: 47 mm; Left ventricular posterior wall thickness: 8 mm; Pulmonary artery diameter: 23 mm.
[0084] Doppler measurements: Peak forward blood flow velocity at each valve orifice (m / s)
[0085] Mitral valve: E peak 1.0, A peak 0.8; Tricuspid valve: 0.7; Aortic valve: 1.1; Pulmonary valve: 0.9
[0086] Cardiac function measurement:
[0087] Left ventricular end-diastolic volume (EDV): 100 (ml) Left ventricular end-systolic volume (ESV): 38 (ml) Stroke volume (SV): 62 (ml) Ejection fraction (EF): 62%
[0088] The diameters of all cardiac chambers are within the normal range. The left ventricular walls show good concentric motion without any segmental motion abnormalities. The aortic valve shows localized thickening and increased echogenicity; its opening is unrestricted, and mild regurgitation is detected upon closure. Mild regurgitation signal is detected at the mitral valve. The pericardium is not thickened, and no fluid-filled areas are seen in the pericardial cavity.
[0089] Regular expressions were used to extract the values corresponding to the three preset texts: "interventricular septal thickness," "left ventricular posterior wall thickness," and "ejection fraction." In the example above, these values are 9, 8, and 62, respectively. The normal ranges for these three indicators are shown in the table below.
[0090] detection indicators Lower limit of normal range Upper limit of normal range Interventricular septal thickness 6 12 Left ventricular posterior wall thickness 6 12 Ejection fraction 50 70
[0091] By integrating the values of 10 test indicators, including age, troponin I, N-terminal pro-brain natriuretic peptide, serum creatinine, albumin, total bilirubin, alkaline phosphatase, interventricular septal thickness, left ventricular posterior wall thickness, and ejection fraction, into a single medical test data set, a large amount of medical test data from different patients can be obtained.
[0092] S202: The medical test data and the corresponding classification labels are combined to form sample data. The classification labels include positive sample labels and negative sample labels.
[0093] Each piece of medical test data corresponds to a classification label, which includes positive and negative sample labels. In this embodiment, medical test data with positive sample labels can be considered as minority class sample data, meaning that medical test data with positive sample labels is less than medical test data with negative sample labels. The medical test data and their corresponding classification labels are used to form the training sample data.
[0094] Based on the above example, the classification label for the medical test data of patients with amyloidosis can be marked as 1, and the classification label for the medical test data of the control group can be marked as 0.
[0095] The i-th sample data is represented as follows:
[0096] Where x (i) Indicates the index value of the detection indicator; L (i) Label the classification data of this sample data. The classification label value is {0, 1}, where 0 indicates non-amyloid degeneration sample and 1 indicates amyloid degeneration sample.
[0097] S203: Use the gradient boosting tree algorithm to learn from the sample data and generate a medical test data classification model; for each round of learning of the gradient boosting tree algorithm, when calculating the pseudo residual, increase the weight of minority class sample data and increase the weight of hard-to-distinguish sample data. Minority class sample data is sample data including positive sample labels, and hard-to-distinguish sample data is sample data whose predicted value meets the conditions when calculating the pseudo residual.
[0098] GBDT (Gradient Boosting Decision Tree) is an algorithm belonging to the boosting category of ensemble algorithms and is a relatively practical algorithm in machine learning. This application's embodiments improve the method for calculating pseudo-residuals in each round of learning within the Gradient Boosting Decision Tree algorithm.
[0099] In the medical field, sample data often exhibits a significant imbalance between positive and negative samples, thus the sample data can be categorized into minority class and majority class sample data. In this embodiment, medical test data including positive sample labels represents the minority class sample data, while medical test data including negative sample labels represents the majority class sample data.
[0100] Simultaneously, sample data can be categorized into difficult-to-classify and easy-to-classify samples. Easy-to-classify samples are those whose predicted values (i.e., predicted probabilities) are more likely to yield classification results during the learning process. For example, when classifying whether a sample is positive, a predicted value close to 1 indicates that the sample is highly likely to be positive, meaning it is an easy-to-classify sample. Conversely, a predicted value around 0.5 indicates that it is difficult to distinguish whether the sample is positive or negative, meaning it is a difficult-to-classify sample. See also... Figure 3 As shown, the statistical results of the number of samples with different prediction probability values are displayed when predicting positive sample data. It can be seen that in most datasets, the number of easily separable samples is much greater than the number of difficult-to-separate samples.
[0101] To increase the weight of minority class samples in the classification model, enhance the ability to learn classification rules from difficult-to-classify samples, and suppress the interference of outliers, this application employs a gradient boosting method with an added correction mechanism. When improving the method of calculating pseudo-residuals, coefficients are added to the pseudo-residuals to improve the distinguishing ability between minority and difficult-to-classify samples. Specifically, on the one hand, the weight of minority class samples is increased, increasing their proportion of the overall loss in the classification problem. On the other hand, the weight of difficult-to-classify samples is increased, further increasing their proportion of the overall loss in the classification problem and suppressing the interference of outliers; conversely, the weight of easily classifiable samples is reduced, thus decreasing their proportion of the overall loss in the classification problem.
[0102] By learning from the sample data using an improved gradient boosting tree algorithm, a medical testing data classification model can be generated, thereby improving the performance of the medical testing data classification model.
[0103] Based on embodiments S201-S203 of this application, medical testing data for training is first obtained. This medical testing data corresponds to classification labels with positive and negative sample labels. The medical testing data and their corresponding classification labels are then combined to form sample data. During the learning process using the gradient boosting tree algorithm on the sample data, in the step of calculating the pseudo-residuals, the weights of minority class samples and hard-to-distinguish samples in the sample data are increased. This improves the ability of the trained medical testing data classification model to distinguish between minority class and hard-to-distinguish samples, further enhancing the accuracy of the medical testing data classification model.
[0104] Specifically, in one possible implementation, S203 utilizes the gradient boosting tree algorithm to learn from the sample data, and the implementation of generating a medical testing data classification model may include the following steps A1-A4:
[0105] A1: Construct the base learner.
[0106] The initialization of the first base learner F0(X) can be expressed as follows:
[0107]
[0108] Where P(Y=1|X) represents the proportion of samples where y=1, and P(y=1|X)≠1. Then the probability that each sample data point is 1 is...
[0109] If the number of sample data including positive samples is the same as the number of sample data including negative samples, then F0(X) = 0. F0(X) is a base learner initialized with prior information, where the probability value of each sample data is the same.
[0110] A2: Calculate the pseudo residuals based on the classification labels of the sample data, the predicted values of the sample data, the first adjustment parameter, and the second adjustment parameter; the predicted values of the sample data are obtained by inputting the medical test data in the sample data into the previously obtained learner. When calculating the pseudo residuals for the first time, the previously obtained learner is used as the base learner; the first adjustment parameter is used to increase the weight of minority class sample data in the sample data, and the second adjustment parameter is used to increase the weight of hard-to-distinguish sample data in the sample data.
[0111] Let the predicted value of the i-th sample data be... The classification label of the i-th sample data is y. i .Will Regarding F t (X i Substituting the function into the commonly used loss function for binary classification:
[0112]
[0113] get:
[0114]
[0115] The pseudo-residuals that need to be fitted to the (t+1)th regression tree can be expressed as:
[0116]
[0117] In this embodiment of the application, two adjustment parameters are added to the pseudo residual, including a first adjustment parameter α and a first adjustment parameter sin sine function.
[0118] In one possible implementation, the formula for calculating the pseudo-residual is:
[0119]
[0120] Among them, y i Let i be the classification label of the i-th sample data. Let be the predicted value of the i-th sample data, and α be the first adjustment parameter. and This is the second adjustment parameter; Used to increase the weight of hard-to-distinguish sample data in sample data that includes positive sample labels. Used to increase the weight of hard-to-distinguish sample data in sample data that includes negative sample labels.
[0121] In other words, α∈(0,1) is used to adjust the weight of imbalanced sample data. For minority class sample data, the value of α is increased so that it occupies a larger weight during model training. In this embodiment, α = 0.75 can be taken. This application embodiment does not limit the value of α.
[0122] The sine function is used to adjust the loss weights for easily distinguishable and difficult-to-distinguish samples. Easier-to-distinguish samples have a smaller weight in the overall loss, while more difficult-to-distinguish samples have a larger weight. However, extremely difficult-to-distinguish samples should not be given the most attention to prevent performance degradation due to excessive focus on outliers. In the embodiments of this application, the coefficients... This is used to reduce the weight of easily separable samples with a label of 1 (i.e., positive sample label) and the noise interference from outlier samples, which means increasing the weight of difficult-to-separate sample data with a label of 1. See also Figure 4 As shown, it illustrates The predicted value corresponds to the change in value, with the horizontal axis representing the predicted value and the vertical axis representing the change in value. The value of . Coefficient This is used to reduce the weight of easily distinguishable samples with a label of 0 (i.e., negative sample labels) and the noise interference from outlier samples, which means increasing the weight of difficult-to-distinguish sample data with a label of 0. See also Figure 5 As shown, it illustrates The predicted value corresponds to the change in value, with the horizontal axis representing the predicted value and the vertical axis representing the change in value. The value of .
[0123] A3: Learn a regression tree by fitting pseudo residuals.
[0124] A4: Using the regression tree and the learner obtained in the previous step, a new learner is obtained.
[0125] A5: Repeat the process of calculating pseudo-residuals based on the classification labels of the sample data, the predicted probability values of the sample data, the first adjustment parameter, and the second adjustment parameter, and then proceed with subsequent steps until the stopping condition is met, thus generating a medical testing data classification model.
[0126] A regression tree can be learned by fitting pseudo-residuals. This regression tree is then used to update the learner generated in the previous learning round, resulting in a new learner for the current learning round. Steps A2-A4 are then repeated until the number of trees reaches a specified threshold or the model performance reaches a specified metric, resulting in the final medical testing data classification model.
[0127] This application uses a gradient correction boosting method to increase the proportion of minority class sample data in the overall loss of the classification problem. At the same time, it uses a sine function to reduce the proportion of easily separable sample data in the overall loss and suppress the interference of outlier samples, thereby further improving the performance of the medical test data classification model.
[0128] After multiple experiments, the medical testing data classification model trained in this embodiment achieved an average accuracy of 92.6% on the test set. The results of multiple experiments showed no significant deviation, and the medical testing data classification model generally exhibited a relatively stable state. This represents an improvement of approximately 2% in accuracy compared to the original gradient boosting tree model, demonstrating a certain degree of improvement.
[0129] In addition, before training the medical testing data classification model, the sample data can be preprocessed after acquisition. In practical applications, the fill rate of each sample data can be checked. If the fill rate of a sample data is less than or equal to a preset threshold, for example, less than or equal to 50%, the indicator values of that sample data are severely missing, and the sample data needs to be deleted. If the fill rate is greater than the preset threshold, and if the sample data has missing indicator values for the detection indicators, the missing indicator values in the sample data are filled in. The purpose of this process is to predict the missing values as accurately as possible, providing high-quality sample data for model training.
[0130] In one possible implementation, imputing missing indicator values in the sample data may include steps B1-B4:
[0131] B1: For the first sample data including positive sample labels and the second sample data including negative sample labels, the detection indicators are sorted according to the missing rate of the indicator values.
[0132] For the first sample data including positive samples, the detection indicators are ranked according to the missing value rate of the detection indicator. For the second sample data including negative samples, the detection indicators are ranked according to the missing value rate of the detection indicators. For example, if there are 10 detection indicators in total, and the third detection indicator has the most missing values in all the first sample data including positive samples, then the third detection indicator is ranked first.
[0133] B2: Initially fill in the missing index values in the first target detection index according to the median value of the normal range of the first target detection index, where the first target detection index is each of the detection indicators.
[0134] Initial imputation is performed for missing values. For each detection indicator, if the indicator has a normal range, the midpoint of the normal range is used for imputation. For example, the lower limit of the normal range for the j-th detection indicator is... The upper limit of the normal range is The missing values for this detection indicator are then filled as follows: For values without a normal range (such as age), the median can be used to fill the gap.
[0135] In addition, each initially filled index value is marked to indicate that the index value can be revised in subsequent steps.
[0136] B3: For the first sample data, select detection indicators as the second target detection indicators according to the missing rate from high to low. Remove the currently filled indicator values of the second target detection indicators from the original first sample data with missing second target detection indicators. Input the indicator values of other detection indicators from the first sample data with each original missing second target detection indicator into the first regression prediction model to obtain the predicted indicator value of the second target detection for the first sample data, and fill the second target detection for the first sample data. Repeat the steps of selecting detection indicators as the second target detection indicators according to the missing rate from high to low and subsequent steps until all detection indicators with missing values are selected.
[0137] In this embodiment, the purpose of sorting the detection indicators is to start filling in the missing values from those indicators with the most missing values. Then, for the first sample data, detection indicators are selected sequentially. Using a random forest regression prediction model, with the selected detection indicator as the predicted value and other detection indicators as feature values, regression prediction is performed on the sample data in the original data where the selected detection indicator has missing values, and the prediction results are used to fill in the missing items. The first regression prediction model uses the sample data in the first sample data where the detection indicator has filled values for regression modeling.
[0138] In the specific implementation, after selecting the second target detection indicator to be filled, a first sample data with the original missing second target detection indicator is obtained. The filled indicator values of the second target detection indicator in the first sample data are removed (e.g., the initial filled values are removed). Then, the indicator values of other detection indicators of the first sample data are used for regression prediction to obtain the indicator value of the second target detection indicator of the first sample data. Then, the filling of the second target detection indicator for other first sample data is completed in sequence.
[0139] For example, given 10 detection indicators, in the first sample data including all positive samples, the third indicator has the most missing values. The imputation process begins with the third indicator. In the first sample data, a sample with a missing third indicator is obtained. The missing values of the other indicators in that sample are input into the regression prediction model to obtain the third indicator value for imputation. This process is repeated for all samples in the first sample data with a missing third indicator. Then, the indicator with the second most missing values is selected for imputation, and so on, until all indicators are selected, completing the imputation process for the first sample data.
[0140] B4: For the second sample data, select detection indicators as the third target detection indicators according to the missing rate from high to low. Remove the currently filled indicator values of the third target detection indicators from the original second sample data with missing third target detection indicators. Input the indicator values of other detection indicators from the second sample data with each original missing third target detection indicator into the second regression prediction model to obtain the predicted indicator value of the third target detection for the second sample data, and fill in the third target detection for the second sample data. Repeat the steps of selecting detection indicators as the third target detection indicators according to the missing rate from high to low and subsequent steps until all detection indicators with missing indicator values are selected.
[0141] Similarly, for the second sample data, detection indicators are selected sequentially. A random forest regression prediction model is used, with the selected detection indicator as the predicted value and the other detection indicators as feature values, to perform regression prediction on the sample data in the original data where the selected detection indicator has missing values, and the prediction results are used to fill in the missing terms. The second regression prediction model then uses the sample data in the second sample data where the detection indicator has filled values for regression modeling.
[0142] In the specific implementation, after selecting the third target detection indicator to be filled, a second sample data with the original missing third target detection indicator is obtained. The filled indicator values of the third target detection indicator in the second sample data are removed (e.g., the initial filled values are removed). Then, the indicator values of other detection indicators of the second sample data are used for regression prediction to obtain the indicator value of the third target detection indicator of the second sample data. Then, the filling of the third target detection indicator for other second sample data is completed in sequence.
[0143] By using steps B1-B4 above, missing indicator values can be predicted as accurately as possible, providing high-quality sample data for the generation of medical testing data classification models.
[0144] In addition, steps B3 and B4 above can be repeated until the specified number of iterations is reached. That is, through multiple rounds of iterative filling, the predicted index value in each round is more accurate than the previous round, thus achieving accurate filling of missing values in the detection index.
[0145] Based on the above-described embodiments of the training method for the medical testing data classification model, this application also provides a medical testing data classification method. See [link to previous document]. Figure 6 , Figure 6 A flowchart illustrating a medical testing data classification method provided in this application embodiment. Figure 6 As shown, the method includes S601-S602:
[0146] S601: Obtain medical test data to be classified.
[0147] After a patient undergoes relevant medical examinations, medical test data is generated. This data can be categorized to obtain the uncategorized medical test data. The uncategorized medical test data includes the values of multiple test indicators, which are typically numerical values.
[0148] S602: Input the medical test data to be classified into the medical test data classification model to obtain the classification result of the medical test data to be classified; the medical test data classification model is trained according to the above-mentioned training method of the medical test data classification model.
[0149] Inputting the medical test data to be classified into the medical test data classification model yields a classification result, which is a binary classification result, indicating whether the data belongs to a positive or negative sample. This classification result may also include a corresponding predicted probability value. The medical test data classification model is trained using the training method provided in the above embodiments; relevant explanations can be found in the above embodiments and will not be repeated here.
[0150] In practical applications, classification of medical test data can be used to predict rare diseases. It is important to emphasize that this classification result is only one indicator for doctors' reference; doctors need to combine it with other test results for a comprehensive diagnosis.
[0151] The following describes the training method for the medical testing data classification model and the medical testing data classification method provided in this application embodiment, using practical application scenarios as examples. See [link to relevant documentation]. Figure 7 The diagram shown illustrates another exemplary scenario of an embodiment of this application.
[0152] Medical testing data can be obtained through HIS (Hospital Information System), LIS (Laboratory Information Management System), and big data platforms. This data includes biochemical data (i.e., biochemical test data) and medical imaging reports (such as color Doppler ultrasound reports). Relevant testing indicators are extracted from the medical imaging reports, and the values of these indicators are fused together to obtain the medical testing data. Sample data is composed of the medical testing data and corresponding classification labels. After populating the sample data, a classification model is constructed using gradient correction and boosting techniques. In practical applications, this medical testing data classification model can be published as a rare disease risk grading service. Real-time patient data (i.e., the medical testing data to be classified) is obtained and input into the medical testing data classification model to obtain high-risk or low-risk classification results. This classification result is provided to doctors for reference and diagnosis. Predicting the risk level of rare diseases using the medical testing data to be classified helps break down barriers between departments and provides doctors with more effective reference information.
[0153] See Figure 8 , Figure 8 This is a schematic diagram of the structure of a training device for a medical testing data classification model provided in an embodiment of this application. Figure 8 As shown, the training device for this medical test data classification model includes:
[0154] The first acquisition unit 801 is used to acquire medical test data, which includes the index values of multiple test indicators.
[0155] The generation unit 802 is used to combine the medical test data and the corresponding classification labels to form sample data, wherein the classification labels include positive sample labels and negative sample labels.
[0156] Training unit 803 is used to learn the sample data using the gradient boosting tree algorithm to generate a medical testing data classification model. In each round of learning of the gradient boosting tree algorithm, when calculating the pseudo residual, the weight of minority class sample data and the weight of hard-to-distinguish sample data in the sample data are increased. The minority class sample data is the sample data including the positive sample label, and the hard-to-distinguish sample data is the sample data whose predicted value meets the conditions when calculating the pseudo residual.
[0157] In one possible implementation, the training unit includes:
[0158] Construct sub-units for building base learners;
[0159] The calculation subunit is used to calculate pseudo-residuals based on the classification labels of the sample data, the predicted values of the sample data, a first adjustment parameter, and a second adjustment parameter. The predicted values of the sample data are obtained by inputting the medical test data in the sample data into the previously obtained learner. When calculating the pseudo-residuals for the first time, the previously obtained learner is the base learner. The first adjustment parameter is used to increase the weight of minority class sample data in the sample data, and the second adjustment parameter is used to increase the weight of difficult-to-class sample data in the sample data.
[0160] A learning subunit is used to learn a regression tree by fitting the pseudo residuals;
[0161] The updated subunit is used to obtain a new learner using the regression tree and the previously obtained learner;
[0162] The repeat execution subunit is used to repeatedly execute the steps of the calculation subunit in calculating the pseudo residual based on the classification label of the sample data, the predicted probability value of the sample data, the first adjustment parameter, and the second adjustment parameter, and the subsequent subunits, until the stopping condition is met, thereby generating a medical test data classification model.
[0163] In one possible implementation, the formula for calculating the pseudo-residual is:
[0164]
[0165] Among them, y i The classification labels for the sample data. The predicted value of the sample data is α, where α is the first adjustment parameter. and This is the second adjustment parameter;
[0166] Used to increase the weight of hard-to-distinguish sample data in sample data that includes positive sample labels. Used to increase the weight of hard-to-distinguish sample data in sample data that includes negative sample labels.
[0167] In one possible implementation, the device further includes:
[0168] A filling unit is used to fill in the missing indicator values in the sample data if there are missing indicator values of the detection indicator in the sample data.
[0169] In one possible implementation, the filling unit includes:
[0170] The sorting subunit is used to sort the detection indicators according to the missing rate of the indicator values of the first sample data including positive sample labels and the second sample data including negative sample labels, respectively.
[0171] The first filling subunit is used to initially fill the missing index values in the first target detection index according to the median value of the normal range of the first target detection index, wherein the first target detection index is each of the detection indexes;
[0172] The second filling subunit is used to select detection indicators as second target detection indicators for the first sample data according to the missing rate from high to low, remove the currently filled indicator values of the second target detection indicators in the original first sample data that are missing the second target detection indicators, input the indicator values of other detection indicators in each original first sample data that are missing the second target detection indicator into the first regression prediction model to obtain the predicted indicator value of the second target detection of the first sample data, and fill the second target detection of the first sample data; repeat the steps of selecting detection indicators as second target detection indicators according to the missing rate from high to low and subsequent steps until all detection indicators with missing indicator values are selected;
[0173] The third filling subunit is used to select detection indicators as third target detection indicators for the second sample data according to the missing rate from high to low, remove the currently filled indicator values of the third target detection indicator in the original second sample data that lacks the third target detection indicator; input the indicator values of other detection indicators in each original second sample data that lacks the third target detection indicator into the second regression prediction model to obtain the predicted indicator value of the third target detection for the second sample data, and fill the third target detection for the second sample data; repeat the steps of selecting detection indicators as third target detection indicators according to the missing rate from high to low and subsequent steps until all detection indicators with missing indicator values are selected.
[0174] In one possible implementation, the acquiring unit includes:
[0175] The acquisition subunit is used to acquire biochemical test data and medical imaging reports;
[0176] The first extraction subunit is used to extract the index values of biochemical indicators from the biochemical detection data;
[0177] The second extraction subunit is used to extract the indicator value corresponding to the preset text from the medical image report;
[0178] The generation subunit is used to generate medical test data by taking the index values of the biochemical indicators and the index values corresponding to the preset text as the index values of the detection indicators.
[0179] It should be noted that the technical details of the medical test data classification model training device provided in this application embodiment can be found in the relevant embodiments of the above-mentioned medical test data classification model training method, and will not be repeated here.
[0180] See Figure 9 , Figure 9 This is a schematic diagram of a medical testing data classification device provided in an embodiment of this application. Figure 9 As shown, the medical test data classification device includes:
[0181] The second acquisition unit 901 is used to acquire medical test data to be classified.
[0182] The classification unit 902 is used to input the medical test data to be classified into the medical test data classification model to obtain the classification result of the medical test data to be classified; the medical test data classification model is trained by the above-mentioned training method of the medical test data classification model.
[0183] It should be noted that the technical details of the medical test data classification device provided in this application embodiment can be found in the relevant embodiments of the above-mentioned medical test data classification method, and will not be repeated here.
[0184] In addition, this application embodiment also provides a training device for a medical test data classification model, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the training method for the medical test data classification model as described above.
[0185] This application embodiment also provides a medical test data classification device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the medical test data classification method as described above.
[0186] This application also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the training method for the medical testing data classification model described above, or to perform the medical testing data classification method described above.
[0187] In this embodiment, medical testing data for training is first obtained. This medical testing data corresponds to classification labels with positive and negative sample labels. The medical testing data and their corresponding classification labels are then combined to form sample data. During the learning process using the gradient boosting tree algorithm on the sample data, in the step of calculating the pseudo-residuals, the weights of minority class samples and hard-to-distinguish samples are increased. This improves the ability of the trained medical testing data classification model to distinguish between minority class and hard-to-distinguish samples, further enhancing the accuracy of the medical testing data classification model. The classification results of the medical testing data to be classified obtained using this medical testing data classification model are also more accurate.
[0188] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0189] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0190] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0191] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0192] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A training method for a medical testing data classification model, characterized in that, The method includes: Acquire medical testing data, which includes biochemical testing data and medical imaging reports, and the medical testing data includes the values of multiple testing indicators; The medical testing data and the corresponding classification labels are combined to form sample data, wherein the classification labels include positive sample labels and negative sample labels; The gradient boosting tree algorithm is used to learn from the sample data to generate a medical testing data classification model. In each round of learning of the gradient boosting tree algorithm, when calculating the pseudo residual, the weight of minority class sample data and the weight of hard-to-distinguish sample data are increased. The minority class sample data are sample data including the positive sample label, and the hard-to-distinguish sample data are sample data whose predicted values meet the conditions when calculating the pseudo residual. The formula for calculating the pseudo residual is: ; in, The classification labels for the sample data. The predicted value for the sample data. This is the first adjustment parameter. and This is the second adjustment parameter; Used to increase the weight of hard-to-distinguish sample data in sample data that includes positive sample labels. Used to increase the weight of hard-to-distinguish sample data in sample data that includes negative sample labels.
2. The method according to claim 1, characterized in that, The step of using the gradient boosting tree algorithm to learn from the sample data and generate a medical testing data classification model includes: Construct base learners; The pseudo-residual is calculated based on the classification label of the sample data, the predicted value of the sample data, the first adjustment parameter, and the second adjustment parameter. The predicted value of the sample data is obtained by inputting the medical test data in the sample data into the previously obtained learner. When calculating the pseudo-residual for the first time, the previously obtained learner is the base learner. The first adjustment parameter is used to increase the weight of minority class sample data in the sample data, and the second adjustment parameter is used to increase the weight of difficult-to-distinguish sample data in the sample data. A regression tree is learned by fitting the pseudo-residuals; Using the regression tree and the previously obtained learner, a new learner is obtained; Repeat the steps of calculating pseudo-residuals based on the classification labels of the sample data, the predicted probability values of the sample data, the first adjustment parameter, and the second adjustment parameter, and then proceed until the stopping condition is met, thereby generating a medical testing data classification model.
3. The method according to claim 1, characterized in that, The method further includes: If the sample data contains missing values for the detection indicators, the missing indicator values in the sample data are filled in.
4. The method according to claim 3, characterized in that, The process of filling in missing indicator values in the sample data includes: For the first sample data including positive sample labels and the second sample data including negative sample labels, the detection indicators are sorted according to the missing rate of the indicator values of the detection indicators; The missing index values in the first target detection index are initially filled according to the median value of the normal range of the first target detection index, where the first target detection index is each of the detection indexes. For the first sample data, detection indicators are selected as second target detection indicators in descending order of the missing rate. The currently filled indicator values of the second target detection indicator in the original first sample data lacking the second target detection indicator are removed. The indicator values of other detection indicators in each original first sample data lacking the second target detection indicator are input into a first regression prediction model to obtain the predicted indicator value for the second target detection of that first sample data, and the second target detection of that first sample data is filled. The process of selecting detection indicators as second target detection indicators in descending order of the missing rate and subsequent steps is repeated until all detection indicators with missing values are selected. For the second sample data, detection indicators are selected as the third target detection indicators according to the missing rate from high to low. The currently filled indicator values of the third target detection indicator in the original second sample data that lacks the third target detection indicator are removed. The indicator values of other detection indicators in each original second sample data that lacks the third target detection indicator are input into the second regression prediction model to obtain the predicted indicator value of the third target detection for the second sample data, and the third target detection for the second sample data is filled. The process of selecting detection indicators as the third target detection indicators according to the missing rate from high to low and subsequent steps is repeated until all detection indicators with missing indicator values are selected.
5. The method according to claim 1, characterized in that, The acquisition of medical test data includes: Obtain biochemical test data and medical imaging reports; Extract the values of biochemical indicators from the biochemical test data; Extract the indicator values corresponding to the preset text from the medical imaging report; The values of the biochemical indicators and the corresponding values of the preset text are used as the values of the detection indicators to generate medical testing data.
6. A method for classifying medical test data, characterized in that, The method includes: Obtain medical test data to be classified; The medical test data to be classified is input into the medical test data classification model to obtain the classification result of the medical test data to be classified; the medical test data classification model is trained by the training method of the medical test data classification model according to any one of claims 1-5.
7. A training device for a medical testing data classification model, characterized in that, The device includes: The first acquisition unit is used to acquire medical testing data, which includes biochemical testing data and medical imaging reports, and includes the index values of multiple testing indicators. A generation unit is used to combine the medical test data and the corresponding classification labels to form sample data, wherein the classification labels include positive sample labels and negative sample labels. The training unit is used to learn the sample data using the gradient boosting tree algorithm to generate a medical test data classification model. In each round of learning for the gradient boosting tree algorithm, when calculating the pseudo residual, the weight of minority class sample data and the weight of hard-to-distinguish sample data in the sample data are increased. The minority class sample data is the sample data including the positive sample label, and the hard-to-distinguish sample data is the sample data whose predicted value meets the conditions when calculating the pseudo residual. The formula for calculating the pseudo residual is: ; in, The classification labels for the sample data. The predicted value for the sample data. This is the first adjustment parameter. and This is the second adjustment parameter; Used to increase the weight of hard-to-distinguish sample data in sample data that includes positive sample labels. Used to increase the weight of hard-to-distinguish sample data in sample data that includes negative sample labels.
8. A medical testing data classification device, characterized in that, The device includes: The second acquisition unit is used to acquire medical test data to be classified. A classification unit is used to input the medical test data to be classified into a medical test data classification model to obtain the classification result of the medical test data to be classified; the medical test data classification model is trained by the training method of the medical test data classification model according to any one of claims 1-5.
9. A training device for a medical testing data classification model, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements a training method for a medical test data classification model as described in any one of claims 1-5.
10. A medical testing data classification device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the medical test data classification method as described in claim 6.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the training method for the medical testing data classification model as described in any one of claims 1-5, or to perform the medical testing data classification method as described in claim 6.
Citation Information
Patent Citations
A method for predicting a sewage outlet index based on a random forest and a gradient lifting tree
CN109408774A
Cigarette loose end rate prediction method and system based on improved gradient improvement decision tree
CN110245802A