Method for identifying early-stage diabetic patient based on physiological and biochemical indexes
By screening 13 physiological and biochemical indicators and using BP neural network model, the problem that diabetes diagnosis methods in the existing technology cannot fully explore complex patterns is solved, and high accuracy and reliability of early diabetes recognition is achieved, and it has high practical application value.
Patent Information
- Application Number
- CN202411633746.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-04-18
AI Technical Summary
The existing diabetes diagnosis methods rely on limited physiological indicators and simple statistical models, and cannot fully explore the complex patterns and potential risk factors hidden in medical data, resulting in insufficient accuracy and reliability of early diabetes identification.
By collecting and organizing large-scale clinical data, 13 physiological and biochemical indicators were screened out, and training was adopted using the BP neural network model. Combining feature engineering and data preprocessing, a machine learning model can identify early diabetes patients was developed.
It improves the accuracy and reliability of early diabetes recognition, can assist doctors in formulating personalized prevention and treatment strategies, simplifies feature input, and improves the recall and accuracy of the model.
Smart Images

Figure CN119851930A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical health, and in particular to a method for identifying early-stage diabetic patients based on physiological and biochemical indicators. Background Art
[0002] Diabetes is a chronic metabolic disease characterized by high blood sugar levels. Long-term high blood sugar levels can lead to a variety of complications, including cardiovascular disease, neuropathy, and nephropathy, which seriously threaten the patient's life and health. Existing methods for diagnosing diabetes mainly rely on doctors to analyze and interpret the patient's various test indicators. Although this can detect diabetes, it still has many limitations, such as increasing the burden on the medical system; traditional diagnostic methods often rely on limited physiological indicators and simple statistical models, and cannot fully explore the complex patterns and potential risk factors hidden in medical data. Therefore, developing an early diabetes identification model based on machine learning and making full use of high-dimensional clinical data has become an urgent need in the current medical field. Summary of the invention
[0003] Purpose of the invention: The purpose of the present invention is to provide a method for identifying early diabetic patients based on physiological and biochemical indicators.
[0004] Technical solution: The present invention comprises the following steps:
[0005] S1: Data collection: Large-scale clinical data sets from medical centers at different levels were collected and organized. Data quality for model training and testing was ensured by cleaning the data and processing missing values.
[0006] S2: Data analysis and preprocessing: By performing chi-square tests on discrete variables and Pearson correlation analysis on continuous variables, the most valuable features were selected from 17 indicators. By comparing different feature engineering techniques, 13 physiological and biochemical indicators with the most comprehensive information were selected as the original input of the model while ensuring the model effect.
[0007] S3: Model establishment: A BP neural network model is used, and the model includes an input layer, 6 hidden layers and an output layer;
[0008] S4: Model training: Divide the source data into training set and test set according to 7:3 for model training. The training epoch is 70 and the batch_size is 16. During the training process, 10% of the training data is used as the validation set to evaluate the performance.
[0009] S5: Result evaluation: Six methods including BP neural network, logistic regression, support vector machine, random forest, gradient boosting decision tree and graph convolutional neural network were used to identify early diabetes patients, and the patients were identified by comprehensively comparing the evaluation index results of each model.
[0010] Furthermore, the 13 physiological and biochemical indicators in step S2 include: age, systolic blood pressure, diastolic blood pressure, heart rate, waist circumference, BMI, fasting blood glucose, uric acid, low-density lipoprotein cholesterol, triglycerides, high-density lipoprotein cholesterol, EGFR and family history of diabetes.
[0011] Furthermore, the indicator data used in step S2 includes discrete variables, and the one-hot encoding technology is used to transform the original input format in the data preprocessing stage, so that the actual input dimension of the model is expanded to 15.
[0012] Furthermore, the BP neural network structure in step S3 is as follows:
[0013] Input layer: According to the number of features of the input data, the input dimension of the model is 15;
[0014] The first hidden layer is a fully connected Dense layer with 64 neurons and uses ReLU as the activation function.
[0015] The second hidden layer: Dense layer, contains 32 neurons and uses ReLU as the activation function;
[0016] The third hidden layer: Regularized Dropout layer, which randomly discards the output of the previous layer with a probability of 0.5 during training;
[0017] The fourth hidden layer: Dense layer, contains 16 neurons and uses ReLU as the activation function;
[0018] The fifth hidden layer: Dropout layer, which randomly discards the output of the previous layer with a probability of 0.5 during training;
[0019] The sixth hidden layer: Dense layer, contains 8 neurons and uses ReLU as the activation function;
[0020] Output layer: contains 1 neuron, uses sigmoid activation function, and is used for the output of binary classification tasks.
[0021] Furthermore, the fully connected Dense layer adopts GlorotUniform and Zeros initializers.
[0022] Furthermore, the training process of the model in step S4 is divided into the following steps:
[0023] S41: At the beginning of each epoch, the training set and the corresponding result labels are divided into N batches of size 16;
[0024] S42: For each batch, the input model is forward propagated to obtain the classification probability value;
[0025] S43: For each batch, use binary cross entropy to calculate the loss between the predicted value and the true value, and evaluate the model performance;
[0026] S44: Use Adam optimizer to update weight parameters to minimize the binary cross entropy of the loss function;
[0027] S45: When each epoch is completed, the model uses 10% of the training data as a validation set to evaluate the loss function and the AUC value.
[0028] S46: Repeat steps S41-S44 until the number of epochs exceeds 70;
[0029] Furthermore, in step S43, the loss value of each batch is accumulated to obtain the average loss value of each training cycle.
[0030] Furthermore, in step S43, the model performance is evaluated according to the AUC value, and the performance evaluation function is:
[0031]
[0032] Among them, y i is the label value of the i-th sample, which is 0 or 1. is the model's predicted value for the i-th sample, that is, the probability that the sample label value is 1, and n is the number of samples.
[0033] Furthermore, the AUC value is the area under the receiver operating characteristic curve (ROC).
[0034] Furthermore, in step S5, three indicators, namely, accuracy, recall rate and AUC value, are selected as comprehensive evaluation criteria.
[0035] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: the present invention develops a classification model that can accurately identify the risk of early diabetes in individuals by comprehensively considering the multi-dimensional clinical data of patients, thereby improving the accuracy and reliability of early diabetes identification; and can assist doctors in formulating personalized prevention and treatment strategies through the recognition results of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of the present invention;
[0037] Figure 2 Comparison chart of the importance of continuous variables in the input data set;
[0038] Figure 3 It is a correlation plot between continuous independent variables in the input data set;
[0039] Figure 4 It is the chi-square test plot for the categorical variables in the input data set;
[0040] Figure 5 is the composition structure of the BP neural network model;
[0041] Figure 6 It is the receiver operating characteristic curve (ROC) diagram of the BP neural network model;
[0042] Figure 7 Receiver operating characteristic curve (ROC) plot for the logistic regression model;
[0043] Figure 8 Receiver operating characteristic curve (ROC) graph of the support vector machine model;
[0044] Fig. 9 Receiver operating characteristic curve (ROC) graph of the random forest model;
[0045] Fig.10 It is the receiver operating characteristic curve (ROC) graph of the gradient boosting decision tree model;
[0046] Fig.11 The receiver operating characteristic curve (ROC) graph of the convolutional neural network model. DETAILED DESCRIPTION
[0047] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0048] The present invention is implemented based on the open source library pytorch of deep learning.
[0049] The dataset used in this invention comes from multiple medical centers at different levels, covering a large amount of diabetes clinical data. The number of samples in the dataset is 15,014 in total, and the indicator types of the samples include biochemical parameters, physiological parameters, and family medical history of the patients.
[0050] like Figure 1 As shown, the neural network model for identifying early diabetic patients through physiological and biochemical index inputs described in the present invention includes four parts: data analysis, preprocessing, training and testing. The most important part is the training phase, while the testing phase is to test the performance of the model in various aspects on another test data set for the trained model. Each part will be explained one by one below.
[0051] The main purpose of the data analysis phase is to analyze the characteristics of the input data and screen the variables. The present invention uses methods such as Pearson correlation analysis and chi-square test to achieve the above requirements. For continuous variables, the correlation between each variable and the dependent variable of diabetes is first calculated. According to the results, Figure 2 As shown in the figure, we can see that the two variables "creatinine Scr" and "urea nitrogen" have the weakest correlation with the dependent variable, so the above variables can be screened out. Next, calculate the Pearson correlation between each variable. According to the results, Figure 3 As shown in the figure, it is found that there is a high correlation between "low-density LDL-C" and "total cholesterol TC", and only one of them can be selected. According to the comparison of model effects, the latter is selected to be screened out. For categorical variables, such as Figure 4 As shown, the present invention uses the chi-square test to perform the importance ratio, and the final test results are shown in Table 1.
[0052] Table 1 Chi-square test results
[0053] Categorical variables Chi-square statistic P-value familydm 4.916345 0.085591 sex 1.960961 0.161411
[0054] For "fami1ydm", its chi-square value is high, but the p-value exceeds the commonly used significance level of 0.05, indicating that it is not significant, so it is impossible to determine whether there is a significant association between family history of diabetes and the presence or absence of diabetes, so it is chosen to be retained. For "sex", its chi-square value is low and the p-value is high (exceeding 0.05), indicating that the association between gender and the occurrence of diabetes is even less significant, so the variable is removed. Finally, the characteristics screened by the present invention are: age, systolic blood pressure, diastolic blood pressure, heart rate, waist circumference, BMI, fasting blood sugar, uric acid, low-density lipoprotein cholesterol, triglycerides, high-density lipoprotein cholesterol, EGFR and family history of diabetes.
[0055] In the data preprocessing stage, the present invention uses a removal method to handle missing values. For the categorical variable family history of diabetes, one-hot encoding is used for processing, and the independent variable dimension is increased from 13 to 15. One-hot encoding can convert categorical variables into numerical features so that these features can be used by machine learning algorithms while avoiding the introduction of false order information. Through this conversion, the model will more accurately understand and process the categorical variables in the data. In addition, before training, the present invention will also standardize each variable so that the scale of each variable is consistent, thereby ensuring that the impact of each feature on the model during model training will not be different due to the size of its numerical range.
[0056] Before the training phase, the model is first established, such as Figure 5As shown, the Dropout layer and the Dense layer are combined to represent that the BP neural network model constructed by the present invention has 8 parts, an input layer of dimension 15, a hidden Dense layer containing 64 neurons, a Dense layer containing 32 neurons, a Dropout layer, a Dropout layer containing 16 neurons, a Dropout layer, a Dense layer containing 8 neurons and an output layer activated by Sigmoid.
[0057] For each Dense layer, the present invention uses ReLU as the activation function, which has the advantages of being simple and effective, providing nonlinear mapping, alleviating the gradient vanishing problem, and introducing sparse activation. In order to initialize the weights and bias values in the Dense layer, the present invention uses GlorotUniform and Zeros initializers. The former can effectively deal with the gradient vanishing and gradient explosion problems between different layers, which helps to accelerate convergence and improve model performance, and the latter will initialize the bias value to zero. In addition, weight L2 regularization will also be used in the Dense layer, which will make the weights smoother by imposing penalties on large weights, help control the complexity of the model, and reduce the risk of overfitting. For the Dropout layer, the drop rate is set to 0.5, which can randomly discard a part of neurons during training, which helps to prevent overfitting and enhance the generalization ability of the model.
[0058] In the model training stage, the total data after preprocessing is 15002. After the data set is divided into a training set and a test set at a ratio of 7:3, the dimension of the independent variable training set is (10501, 15), and the dimension of the independent variable test set is (4501, 15). Adam is used as the optimizer during training. It is an optimization algorithm with adaptive learning rate. It updates the network weights by calculating the first-order moment and second-order moment estimation of the gradient, and can obtain better performance with less hyperparameter adjustment. The loss function is binary cross entropy, which is a common loss function for binary classification tasks and is used to measure the difference between the model prediction value and the true value. In addition, the present invention uses the AUC value as an evaluation indicator in the training process. It does not directly affect the optimization process of the model, but can be used to monitor the classification performance during the model training process.
[0059] The epoch of the training process is set to 70, and batch_size is 16, which means that the model will completely traverse the training data set 70 times, and at each iteration, the model will use 16 samples to calculate the gradient and update the weight. In addition, validation_sp1it is 0.1, which means that 10% of the training data is separated for validation. In this way, the generalization ability of the model can be evaluated during the training process.
[0060] In the test phase, since the number of positive samples in the training set and the test set accounted for 32% each, there was an obvious data imbalance phenomenon. Therefore, the present invention selected the three indicators of accuracy, recall rate, and AUC value as comprehensive evaluation criteria. Although accuracy is an important indicator, it is easily affected by the majority class in an unbalanced data set. In diabetes identification, the cost of missed diagnosis is much higher than that of misdiagnosis, so the recall rate needs to be introduced for evaluation, which shows the model's ability to identify diseased samples. The AUC value is a comprehensive indicator, which is used to indicate the overall classification performance of the model.
[0061] The present invention balances the two categories by setting a threshold, thereby improving the recall rate of the model, ensuring that as many patients as possible are identified, and improving the practicality of the model. After multiple experimental comparisons, it was finally determined that when the threshold value was 0.0555, the model had the best classification effect on the test set, with an accuracy of 0.704, a recall rate of 0.801, and an AUC value of 0.815. The ROC curve is as follows: Figure 6 To verify the classification performance of the present invention, the model was compared with five algorithms, including logistic regression, support vector machine, random forest, gradient boosting decision tree and convolutional neural network. The results are shown in Table 2. The ROC curves of each model were calculated as follows. The logistic regression model Figure 7 As shown in Figure 8 As shown, the random forest model is Fig. 9 As shown, the gradient boosting decision tree model is Fig.10 As shown, the convolutional neural network model is shown in Fig.11 By comparing the above ROC curves, it can be concluded that the BP neural network of the present invention performs well in terms of AUC value and recall rate, showing that it has higher recognition ability and stability in classification tasks.
[0062] Table 2 Comparison of the model of the present invention with other machine learning methods
[0063] Model Accuracy Recall AUC value BP Neural Network 0.704 0.801 0.815 Logistic Regression 0.669 0.781 0.809 Support Vector Machine 0.677 0.602 0.666 Random Forest 0.682 0.792 0.802 Gradient Boosting Decision Tree 0.704 0.774 0.809 Graph Convolutional Neural Networks 0.710 0.715 0.785
[0064] In summary, the present invention discloses a neural network model and method for identifying early diabetic patients through physiological and biochemical index input, and describes the entire establishment process. First, in the data analysis stage, important features are screened out by Pearson correlation analysis and chi-square test, including 13 indicators such as age, systolic blood pressure, diastolic blood pressure, heart rate, waist circumference, and BMI. In the data preprocessing stage, missing values are processed, and unique hot encoding and standardized processing data are used. In the model establishment stage, a BP neural network model including 4 Dense layers and 2 Dropout layers is built. The Dense layer uses the ReLU activation function, combined with the GlorotUniform initializer and L2 regularization, and the Dropout layer discard rate is set to 0.5 to prevent overfitting. The Adam optimizer and binary cross entropy loss function are used in the training stage, and the epoch is set to 70 and the bach size is set to 16. In the test stage, accuracy, recall rate and AUC values are used as evaluation indicators, and the practicality of the model is improved by setting thresholds. The final experimental results show that the comprehensive effect of the model on the test set is better than other machine learning models. The method of the present invention simplifies feature input, improves the recall rate and accuracy of the model, and has high practical application value.
Claims
1. A method for identifying early diabetic patients based on physiological and biochemical indicators, characterized in that: The steps include: S1: Data collection: Large-scale clinical data sets from medical centers at different levels were collected and organized. Data quality for model training and testing was ensured by cleaning the data and processing missing values. S2: Data analysis and preprocessing: By performing chi-square tests on discrete variables and Pearson correlation analysis on continuous variables, the most valuable features were selected from 17 indicators. By comparing different feature engineering techniques, 13 physiological and biochemical indicators with the most comprehensive information were selected as the original input of the model while ensuring the model effect. S3: Model establishment: A BP neural network model is used, and the model includes an input layer, 6 hidden layers and an output layer; S4: Model training: Divide the source data into training set and test set according to 7:3 for model training. The training epoch is 70 and the batch_size is 16. During the training process, 10% of the training data is used as the validation set to evaluate the performance. S5: Result evaluation: Six methods including BP neural network, logistic regression, support vector machine, random forest, gradient boosting decision tree and graph convolutional neural network were used to identify early diabetes patients, and the patients were identified by comprehensively comparing the evaluation index results of each model.
2. The method for identifying early diabetic patients based on physiological and biochemical indicators according to claim 1, characterized in that: The 13 physiological and biochemical indicators in step S2 include: age, systolic blood pressure, diastolic blood pressure, heart rate, waist circumference, BMI, fasting blood glucose, uric acid, low-density lipoprotein cholesterol, triglycerides, high-density lipoprotein cholesterol, EGFR and family history of diabetes.
3. The method for identifying early diabetic patients based on physiological and biochemical indicators according to claim 1, characterized in that: The indicator data used in step S2 contains discrete variables. In the data preprocessing stage, the one-hot encoding technology is used to transform the original input format so that the actual input dimension of the model is expanded to 15.
4. The method for identifying early diabetic patients based on physiological and biochemical indicators according to claim 1, characterized in that: The BP neural network structure in step S3 is as follows: Input layer: According to the number of features of the input data, the input dimension of the model is 15; The first hidden layer is a fully connected Dense layer with 64 neurons and ReLU as the activation function. The second hidden layer: Dense layer, contains 32 neurons and uses ReLU as the activation function; The third hidden layer: Regularized Dropout layer, which randomly discards the output of the previous layer with a probability of 0.5 during training; The fourth hidden layer: Dense layer, contains 16 neurons and uses ReLU as the activation function; The fifth hidden layer: Dropout layer, which randomly discards the output of the previous layer with a probability of 0.5 during training; The sixth hidden layer: Dense layer, contains 8 neurons and uses ReLU as the activation function; Output layer: contains 1 neuron, uses sigmoid activation function, and is used for the output of binary classification tasks.
5. The method for identifying early-stage diabetic patients based on physiological and biochemical indicators according to claim 1, characterized in that: The fully connected Dense layer uses GlorotUniform and Zeros initializers.
6. The method for identifying early-stage diabetic patients based on physiological and biochemical indicators according to claim 1, characterized in that: The training process of the model in step S4 is divided into the following steps: S41: At the beginning of each epoch, the training set and the corresponding result labels are divided into N batches of size 16; S42: For each batch, the input model is forward propagated to obtain the classification probability value; S43: For each batch, use binary cross entropy to calculate the loss between the predicted value and the true value, and evaluate the model performance; S44: Use Adam optimizer to update weight parameters to minimize the binary cross entropy of the loss function; S45: When each epoch is completed, the model uses 10% of the training data as a validation set to evaluate the loss function and the AUC value. S46: Repeat steps S41-S44 until the number of epochs exceeds 70.
7. The method for identifying early-stage diabetic patients based on physiological and biochemical indicators according to claim 6, characterized in that: In step S43, the loss value of each batch is accumulated to obtain the average loss value of each training cycle.
8. The method for identifying early-stage diabetic patients based on physiological and biochemical indicators according to claim 6, characterized in that: In step S43, the model performance is evaluated according to the AUC value, and the performance evaluation function is: Among them, y i is the label value of the i-th sample, which is 0 or 1. is the model's predicted value for the i-th sample, that is, the probability that the sample label value is 1, and n is the number of samples.
9. The method for identifying early-stage diabetic patients based on physiological and biochemical indicators according to claim 8, characterized in that: The AUC value is the area under the receiver operating characteristic curve (ROC).
10. The method for identifying early-stage diabetic patients based on physiological and biochemical indicators according to claim 1, characterized in that: In step S5, three indicators, namely, accuracy, recall rate and AUC value, are selected as comprehensive evaluation criteria.
Citation Information
Patent Citations
Depression patient identification system and identification method thereof
CN111899869A
Diabetes screening method and system based on muscle strength
CN115295157A
Cerebral stroke END risk prediction model establishment method and device, END risk prediction system, electronic equipment and medium
CN116403714A
Diabetes prediction method and system based on PCA-PSO-BP algorithm
CN117095810A
Diabetic peripheral neuropathy prediction method and system in disease and syndrome combination mode
CN117316459A
Cited By
Clinical data-based colonoscope operation nursing scheme determination method and system
CN120108631A