Training method and prediction method of diabetic nephropathy risk prediction model, device and medium

By collecting and standardizing multi-dimensional data, and combining iterative training of the random forest model, the problem of missed diagnoses in DKD risk prediction was solved, the accuracy and stability of the model were improved, and a visualized risk guidance map and intervention suggestions were provided, enabling early and accurate assessment and personalized intervention.

CN121528555BActive Publication Date: 2026-03-24ZHUJIANG HOSPITAL OF SOUTHERN MEDICAL UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies for DKD risk prediction suffer from limitations of traditional biomarkers, resulting in a high rate of missed diagnoses. Furthermore, machine learning models lack stability and clinical reliability in data processing and feature selection, making it difficult to achieve accurate early assessments.

Method used

By collecting multi-dimensional feature data, standardizing and constructing composite features, iteratively training the random forest model, using sampling with replacement and logistic regression to screen key features, optimizing decision tree split points, and generating a diabetic nephropathy risk prediction model.

Benefits of technology

It improves the accuracy and stability of DKD identification, reduces the model's generalization error and overfitting risk, provides a visualized risk guidance map and intervention suggestions, and enhances the model's clinical acceptability and practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121528555B_ABST
    Figure CN121528555B_ABST
Patent Text Reader

Abstract

The application provides a training method and a prediction method of a diabetic nephropathy risk prediction model, equipment and a medium, and the training method comprises the following steps: collecting characteristic original data of a plurality of target type diabetic patients in different dimensions and performing standardization processing to obtain characteristic standard data, calculating a pre-constructed composite feature based on the characteristic standard data, and constructing a characteristic data set according to the composite feature data and the characteristic standard data; performing sampling with replacement on the characteristic data set, and calculating a characteristic coefficient of each characteristic in each iteration process, counting key characteristics with a probability greater than a preset threshold in the iteration process according to the characteristic coefficient, and constructing a key characteristic data set based on the characteristic standard data of the key characteristics; and inputting the key characteristic data set into a random forest model for iterative training until a preset training number is reached or a loss function reaches a preset threshold, so that the diabetic nephropathy risk prediction model is obtained. The application can improve the recognition accuracy of diabetic nephropathy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine learning and artificial intelligence, in particular to a training method and a prediction method of a diabetic kidney disease risk prediction model, a device and a medium. BACKGROUND

[0002] Diabetic kidney disease (DKD) is the most severe microvascular complication of type 2 diabetes and the leading cause of end-stage renal disease worldwide. Its pathogenesis involves multiple dimensions such as glucose and lipid metabolism disorders, oxidative stress, chronic microinflammation, and abnormal hemodynamics. Therefore, accurately identifying high-risk groups in the subclinical stage or early stage of the disease and implementing targeted interventions to delay disease progression are the core and key of DKD prevention and control.

[0003] Currently, DKD risk prediction mainly relies on traditional biomarkers such as urine albumin / creatinine ratio and estimated glomerular filtration rate (EGFR). However, these indicators have obvious limitations: about 20%-30% of DKD patients do not have proteinuria increase when EGFR decreases, which easily leads to missed diagnosis of non-proteinuric DKD. Moreover, a single indicator cannot comprehensively reflect the complex pathophysiological state of the disease, making it difficult to achieve early and accurate assessment. To solve this problem, the academic community introduced machine learning technology to build a multivariate prediction model. However, existing solutions still face multiple bottlenecks in clinical translation. Traditional Lasso (Least Absolute Shrinkage and Selection Operator) regression has randomness when dealing with highly correlated features, which leads to instability in the screening results of the model on different data subsets, reducing the clinical credibility. In the data preprocessing stage, the rigid standardization process destroys the physical distribution of the original data, making the model threshold lose its clinical intuitive meaning, while simple outlier processing causes information loss. SUMMARY

[0004] The present application aims to provide a training method and a prediction method of a diabetic kidney disease risk prediction model, a device and a medium to solve the above technical problems and improve the accuracy of diabetic kidney disease identification.

[0005] To solve the above technical problems, the present application provides a training method of a diabetic kidney disease risk prediction model, comprising:

[0006] The training method of the diabetic kidney disease risk prediction model comprises:

[0007] The feature raw data of a plurality of target type diabetic patients in different dimensions is collected, the feature raw data is standardized to obtain feature standard data, and a composite feature pre-constructed based on the feature standard data is calculated, and a feature data set is constructed based on the composite feature data and the feature standard data obtained;

[0008] The feature data set is sampled with replacement based on a preset number of iterations, and the feature coefficients of each feature in each iteration process are calculated, the key features with a probability of being selected greater than a preset threshold in the iteration process are counted based on the feature coefficients, and a key feature data set is constructed based on the feature standard data of the key features;

[0009] The key feature data set is input into a random forest model for iterative training until a preset number of training times is reached or a loss function reaches a preset threshold, and a diabetic nephropathy risk prediction model is obtained; wherein the random forest model includes a plurality of decision trees, and the minimum Gini impurity is used as the target to traverse all possible split points of each key feature in the decision tree, and the prediction results of each decision tree are combined to generate a DKD incidence prediction probability of the diabetic patient.

[0010] In the above scheme, the multi-dimensional feature raw data is collected to comprehensively cover the key information related to the DKD incidence of the patient. Based on the standardization processing, the dimensional differences and abnormal interference of different dimensions are eliminated, and the potential association between single features is deeply mined by constructing a composite feature, so that the feature data set is comprehensive and targeted, laying a high-quality data foundation for accurate identification. In the feature screening link, the key features with strong stability and correlation are selected by the preset number of iterations of the sampling with replacement and the feature coefficient statistics combined with the feature selection probability threshold, the redundant information and interference factors are effectively eliminated, the core features with high contribution to DKD incidence prediction are focused, the model structure is simplified, the prediction deviation caused by irrelevant features is avoided, the disease-related signals are concentrated, and the identification accuracy is greatly improved. Relying on the random forest model for iterative training, the decision tree split point is optimized with the minimum Gini impurity as the target, the non-linear relationship and complex interaction between key features are captured, the generalization error and overfitting risk of a single model are reduced through the collaborative prediction of multiple decision trees, and the adaptation ability and prediction stability of the model to complex data are improved.

[0011] In one implementation, the feature raw data of a plurality of target type diabetic patients in different dimensions is collected, the feature raw data is standardized to obtain feature standard data, and specifically includes:

[0012] The feature raw data of a plurality of target type diabetic patients in different dimensions is collected; wherein the type of dimension includes population and physical feature dimension, kidney function index dimension, glucose and lipid metabolism index dimension, endocrine and liver function index dimension, immune inflammation and blood routine dimension;

[0013] The missing rate of the original data of each feature is calculated, and for the original data with a missing rate lower than a preset threshold, the missing values are filled by random sampling to obtain initial complete data. The data in the initial complete data are sequentially traversed and set to a missing state. A regression model is constructed with all other data as a prediction variable. The missing values are filled by extracting data variables in the established regression model by a prediction mean matching method, and the missing value processing of the original data is completed.

[0014] The upper and lower bounds of the data of each feature are calculated according to the quartile method. The original data exceeding the upper bound of the data or being less than the lower bound of the data are truncated by the upper and lower bounds of the data, and the abnormal value processing of the original data is completed.

[0015] The feature standard data is obtained according to the missing value processing result and the abnormal value processing result.

[0016] In the above scheme, the multi-dimensional feature acquisition range is used to comprehensively cover the core pathological dimensions related to DKD onset, and to provide rich and disease mechanism-matched data basis for the model. The hierarchical processing mode of “random sampling filling + regression model prediction + mean matching” is used for missing value processing, which not only preserves the covariance structure between variables, but also avoids the generation of false data, ensuring the integrity and authenticity of the data. The abnormal values are processed by the quartile method to truncate, which retains the sample size while eliminating extreme noise, avoiding excessive loss of information.

[0017] In an implementation manner, a composite feature is calculated based on the feature standard data, and a feature data set is constructed according to the obtained composite feature data and the feature standard data, specifically including:

[0018] A first composite feature is constructed based on monocytes and high-density lipoprotein cholesterol. The expression of the first composite feature is:

[0019] ;

[0020] In the formula, is the first composite feature, is the monocyte; is the high-density lipoprotein cholesterol; is a smoothing factor, ;

[0021] A second composite feature is constructed based on platelets, neutrophils and lymphocytes. The expression of the second composite feature is:

[0022] ;

[0023] In the formula, is the second composite feature; Platelets; For neutrophils, Lymphocytes; As a smoothing factor, ;

[0024] Calculate the corresponding first composite feature data and second composite feature data based on the characteristic standard data of diabetic patients;

[0025] A feature dataset is constructed based on the first composite feature data, the second composite feature data, and the feature standard data.

[0026] In the above scheme, composite features are constructed based on the core pathological mechanism of DKD. MHR integrates the pro-inflammatory effect of monocytes and the anti-inflammatory function of HDLC, while SII integrates indicators related to thrombosis, inflammatory response, and immune regulation. This approach can capture deep pathological imbalances that cannot be reflected by a single indicator, thereby improving the clinical relevance and predictive efficacy of the features. The introduction of a smoothing factor effectively avoids division-by-zero errors during the calculation process, enhancing the robustness of feature calculation. By integrating composite features with original standard data to construct a feature dataset, a full coverage of "basic indicators + mechanism-derived indicators" is achieved, providing crucial support for subsequent screening of high-value features and improving the model's predictive accuracy.

[0027] In one implementation, the feature dataset is sampled with replacement based on a preset number of iterations, and the feature coefficients of each feature are calculated in each iteration. Key features with a selection probability greater than a preset threshold are statistically analyzed based on these feature coefficients. A key feature dataset is then constructed based on the feature standard data of these key features, specifically including:

[0028] In each iteration, an updated feature dataset of the same size is generated from the feature dataset through sampling with replacement. A corresponding Logistic regression model is then constructed for each updated feature dataset. The expression for the Logistic regression model is:

[0029] ;

[0030] In the formula, For the first The characteristic coefficients of the Logistic regression model in the next iteration. This represents the regression coefficient vector of the model; The number of samples in the feature dataset. For the first The true label of each sample; For the first The predicted probability of a sample experiencing DKD is calculated using the Sigmoid function; The shrinkage factor was determined through internal 10-fold cross-validation. The total number of features; Let be the penalty factor for the j-th feature; The regression coefficient is the value corresponding to the j-th feature.

[0031] After the iteration is completed, the number of times the regression coefficient is not zero during the iteration is counted. Based on the statistical results, the selection probability of each feature is generated, and features with a selection probability greater than a preset threshold are retained as key features. Among them, a regression coefficient not being zero indicates that the feature was selected by the model in this iteration.

[0032] Construct a key feature dataset based on the feature standard data corresponding to the key features.

[0033] In the above scheme, multiple rounds of sampling with replacement are used to generate updated feature datasets, simulating different data distribution scenarios and enhancing the stability of feature selection. Feature coefficients are calculated using a logistic regression model with a penalty factor, and the penalty factor can be used to flexibly adjust the selection weight of different features, making the selection results more in line with clinical logic. By statistically analyzing the frequency of non-zero feature coefficients, key features are selected, effectively eliminating redundant and spurious features, ensuring that the selected key features have strong correlation and high stability. The final key feature dataset reduces the complexity of model training and improves the model's generalization ability and clinical interpretability.

[0034] In one implementation, the random forest model contains several decision trees. With the objective of minimizing Gini impurity, it traverses all possible split points for each key feature within the decision trees. The prediction results from each decision tree are then combined to generate the predicted probability of DKD (Diabetic Kidney Disease) in diabetic patients. Specifically, this includes:

[0035] Receive standard feature data for each key feature, and traverse all possible split points for each feature in the decision tree with the goal of minimizing Gini impurity;

[0036] The expression for Gini impurity is:

[0037] ;

[0038] In the formula, For nodes The impurity of the gin; For nodes The probability of belonging to DKD or not belonging to DKD;

[0039] Calculate the weighted Gini impurity of the left and right child nodes after splitting, and select the child node with the largest Gini gain for splitting; where Gini gain is the difference between Gini impurity and weighted Gini impurity;

[0040] The prediction results of each decision tree are obtained based on the splitting results of each decision tree. The predicted probability of developing diabetes mellitus (DKD) in diabetic patients is generated based on the mean of the prediction results. The expression for the predicted probability of developing DKD is as follows:

[0041] ;

[0042] In the formula, For the sample The predicted probability; The total number of decision trees; For the first The prediction results of the decision tree.

[0043] In the above scheme, a random forest model is used as the core of prediction. By integrating multiple decision trees for prediction, the risk of overfitting of a single decision tree is effectively reduced, and the robustness of the model is improved. Optimizing node splitting with the goal of minimizing Gini impurity can accurately capture the nonlinear relationships and complex interactions between key features, significantly improving prediction accuracy compared to traditional linear models. By traversing all possible split points and selecting the splitting method with the largest Gini gain, the scientific nature of the decision tree construction is ensured. Using the mean of the prediction results of multiple decision trees as the final probability further smooths the prediction error, making the DKD incidence prediction probability more reliable and providing accurate quantitative basis for clinical risk assessment.

[0044] In one implementation, after generating the predicted probability of DKD in diabetic patients by combining the prediction results of each decision tree, a visual risk guidance map is also generated based on the SHAP value of each key feature.

[0045] Calculate the SHAP value for each key feature; where the SHAP value characterizes the marginal contribution of the key feature to the prediction result; the expression for the SHAP value is:

[0046] ;

[0047] In the formula, For the j-th feature pair of samples The SHAP value; For key feature set; The feature subset is a combination of features randomly selected from the remaining key features after excluding the j-th feature from the key feature set F. When the random forest model only inputs a subset of features When the j-th feature is used, for the sample The predicted probability of DKD incidence; For random forest models, only a subset of features S is input to the samples. The predicted probability of DKD incidence;

[0048] Calculate the average absolute value of the SHAP of all samples in the key feature dataset and sort them. Generate a feature importance bar chart based on the sorting results. The feature importance bar chart identifies a predetermined number of key features that rank highly as high-risk contribution factors.

[0049] For a single sample, an individual risk attribution force steering map is generated based on the SHAP of each key feature, and the contribution direction and strength of each key feature are displayed based on the individual risk attribution force steering map.

[0050] The above scheme introduces SHAP values ​​to quantify the marginal contribution of key features to the prediction results, clearly defining whether each feature increases or decreases risk, and the intensity of its contribution, thus breaking the black box of the model. Feature importance bar charts can quickly identify core risk factors at the population level, providing a focus for clinical screening. Individual risk attribution-guided graphs intuitively present the personalized risk sources of individual patients, enabling doctors to accurately identify the risk drivers and protective factors for each patient. The entire visualization scheme transforms the abstract model decision-making process into intuitive and easy-to-understand charts, validating the model's rationality and providing a clear basis for generating personalized intervention recommendations, thereby improving the model's clinical acceptability and practicality.

[0051] In one implementation, the training method for the diabetic nephropathy risk prediction model also includes generating intervention suggestions based on a visualized risk guidance map, specifically:

[0052] When the characteristic standard data of high-risk contributing factors exceed the clinical normal range, direct risk warnings and direct intervention suggestions for key characteristics are generated.

[0053] When clinical indicators are normal, but key feature data related to clinical indicators is abnormal and the key feature SHAP value is positive, a occult lesion warning is generated.

[0054] When the characteristic standard data of high-risk contribution factors exceed the clinical normal range and there are preset demographic characteristics, dynamic threshold adjustment suggestions are generated.

[0055] The above scheme constructs three types of precise intervention rules based on a visualized risk-guided map, achieving a closed loop from "risk prediction" to "intervention recommendations." Direct risk warning generates targeted intervention plans for overt abnormal indicators, enabling rapid control of clear risks; occult lesion warning uncovers potential pathological states by associating abnormal features, effectively avoiding missed diagnoses in traditional screening and buying time for early intervention; dynamic threshold adjustment recommendations optimize intervention targets by combining patient demographic characteristics, avoiding a "one-size-fits-all" treatment approach and improving the safety and suitability of intervention plans. All three types of recommendations closely align with clinical practice, transforming model results into actionable diagnostic and treatment strategies, thus enhancing the model's clinical translational value.

[0056] Secondly, this application also provides methods for predicting the risk of diabetic nephropathy, including:

[0057] Collect key feature data of patients and perform standardization processing to obtain key feature standard data;

[0058] Key feature standard data are input into the diabetic nephropathy risk prediction model constructed using the training method described above, so that the diabetic nephropathy risk prediction model can generate the predicted probability of DKD onset for patients.

[0059] Thirdly, this application also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the training method of the diabetic nephropathy risk prediction model as described above.

[0060] Fourthly, this application also provides a computer-readable storage medium, which includes a stored computer program, wherein, when the computer program is running, a method for training the above-mentioned diabetic nephropathy risk prediction model is executed on the device where the computer-readable storage medium is located. Attached Figure Description

[0061] Figure 1 This is a flowchart illustrating a training method for a diabetic nephropathy risk prediction model provided in one embodiment of the present invention.

[0062] Figure 2 This is an example diagram illustrating the importance of a feature according to one embodiment of the present invention;

[0063] Figure 3 This is an example diagram illustrating an individual risk attribution orientation provided in one embodiment of the present invention;

[0064] Figure 4 This is a flowchart illustrating a method for predicting the risk of diabetic nephropathy provided in one embodiment of the present invention. Detailed Implementation

[0065] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0066] The terms "first" and "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0067] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0068] Example 1

[0069] See Figure 1 , Figure 1 This is a flowchart illustrating a training method for a diabetic nephropathy risk prediction model according to an embodiment of the present invention. The embodiment of the present invention provides a training method for a diabetic nephropathy risk prediction model, including steps 101 to 103, each step being as follows:

[0070] Step 101: Collect raw feature data of several target type diabetic patients in different dimensions, standardize the raw feature data to obtain feature standard data, calculate the pre-constructed composite features based on the feature standard data, and construct a feature dataset based on the obtained composite feature data and feature standard data.

[0071] In this embodiment of the invention, multi-dimensional raw clinical data of diabetic patients are first collected, and standardized feature standard data are obtained through standardization processing. Then, composite features are calculated based on these data, and finally, the feature standard data and composite feature data are merged to form a complete feature dataset.

[0072] In one embodiment, raw feature data of several target type diabetic patients in different dimensions are collected, and the raw feature data are standardized to obtain standard feature data. Specifically, this includes: collecting raw feature data of target type diabetic patients in different dimensions; wherein, the types of dimensions include population and physical characteristics, renal function indicators, glucose and lipid metabolism indicators, endocrine and liver function indicators, and immune inflammation and blood routine indicators; calculating the missing value rate of raw data for each feature; for raw data with a missing value rate lower than a preset threshold, the missing values ​​are filled by random sampling to obtain initial complete data; sequentially traversing the data in the initial complete data and setting them as missing states; constructing a regression model with all other data as predictor variables; filling missing values ​​by extracting data variables from the established regression model using the predictive mean matching method to complete the missing value processing of the raw data; calculating the upper and lower bounds of data for each feature according to the quartile method; using the upper and lower bounds, shortening the raw data that exceeds the upper bound or is less than the lower bound to complete the outlier processing of the raw data; and obtaining the standard feature data based on the missing value processing results and the outlier processing results.

[0073] In this embodiment of the invention, raw indicators covering five core dimensions are extracted from the clinical data of patients with the target type of diabetes: (1) Population and physical characteristics dimension: including basic information such as age, gender, height, weight, and BMI; (2) Kidney function indicators dimension: covering indicators that directly reflect the kidney status, such as creatinine, urine albumin / creatinine ratio (ACR), and estimated glomerular filtration rate (EGFR); (3) Glucose and lipid metabolism indicators dimension: including indicators related to the core pathology of diabetes, such as glycated hemoglobin (HBA1C), fasting blood glucose, total cholesterol, and high-density lipoprotein (HDL-C); (4) Endocrine and liver function indicators dimension: involving endocrine and metabolic organ function indicators such as thyroid function (e.g., FT3) and alanine aminotransferase (ALT); (5) Immune inflammation and blood routine dimension: including blood routine indicators related to inflammatory response, such as monocyte count, neutrophil count, and platelet count. By covering these dimensions, it is ensured that the raw data can comprehensively reflect the multi-mechanism pathological characteristics of diabetic nephropathy. It should be noted that certain inclusion and exclusion criteria need to be followed when collecting patient data. Inclusion criteria were: patients must meet the diagnostic criteria of the "Guidelines for the Prevention and Treatment of Type 2 Diabetes in China (2023 Edition)," be aged 18-85 years, have at least 5 years of follow-up records, or be diagnosed with DKD within 5 years. Exclusion criteria were: patients with baseline DKD or other primary kidney diseases, persistent proteinuria / eGFR <60mL / min / 1.73m², malignant tumors / severe infections / autoimmune diseases, and missing key variables >10%. For example, 3000 patients diagnosed with type 2 diabetes between 2015 and 2020 were screened from the Zhujiang Hospital data lake, of which 900 patients developed DKD within 5 years and 2100 patients did not. 52 indicators, including age, sex, serum creatinine, ACR, HBA1C, monocyte count, and HDLC, were extracted for each patient. 200 patients with missing key variables >10% were excluded, resulting in complete characteristic raw data for 2800 patients.

[0074] Then, a "multiple imputation + predicted mean matching" method is used to fill in the missing feature data. First, features with a missing rate below a preset threshold are selected, and all missing values ​​are filled in through random sampling to obtain preliminary complete data. Next, for each variable in the initial complete data, its actual missing values ​​are restored to a "missing state," and a regression model is constructed to predict the missing value using indicators from all other dimensions as input variables. Finally, using the "predicted mean matching method," several "candidate donors" closest to the predicted value are selected from the model's prediction results, and the actual values ​​of the donors are randomly selected to fill the missing positions. For example, 3000 patients with type 2 diabetes were selected as the research subjects, and 52 raw data items were collected from dimensions such as demographic and physical characteristics, renal function indicators, glucose and lipid metabolism indicators, endocrine and liver function indicators, immune inflammation, and blood routine indicators. The missing rate of each feature was calculated, a preset threshold of 10% was set, and 48 features with a missing rate below 10% were selected. All missing values ​​were filled in by random sampling of these features to obtain the initial complete data. Then, each data item in the initial complete data was set to the missing state. A multiple linear regression model was constructed with the other 47 features as predictors. The five closest candidate values ​​were selected from the model prediction results by the prediction mean matching method. One missing value was randomly selected to fill the missing position to complete the missing value processing.

[0075] Furthermore, extreme outliers in the data are corrected through statistical boundary constraints: First, quartiles are calculated for the raw data of each feature: the lower quartile Q1 is the 25th percentile, and the upper quartile Q3 is the 75th percentile, and the interquartile range (IQR) is calculated as Q3 - Q1; then, outlier boundaries are set: the lower bound is Q1 - 1.5 × IQR, and the upper bound is Q3 + 1.5 × IQR; finally, raw data exceeding the upper bound or falling below the lower bound are "tailed," that is, values ​​exceeding the upper bound are replaced with the upper bound, and values ​​falling below the lower bound are replaced with the lower bound. This method not only eliminates the interference of extreme outliers but also preserves the sample size, avoiding information loss caused by directly deleting outliers. All feature data after missing value imputation and outlier tailing are summarized to obtain the feature standard data. This data retains the biological significance of the original clinical indicators and eliminates the impact of data quality issues on subsequent model training, forming the basis for constructing subsequent feature datasets. For example, taking serum creatinine as an example, Q1=65μmol / L, Q3=95μmol / L, IQR=30μmol / L, set the lower limit = 65-1.5×30=20μmol / L, and the upper limit = 95+1.5×30=140μmol / L. Replace the values ​​in the data below 20μmol / L with 20μmol / L, and replace the values ​​above 140μmol / L with 140μmol / L, thus completing the outlier reduction processing for all features.

[0076] In one embodiment, a pre-constructed composite feature is calculated based on feature standard data, and a feature dataset is constructed based on the obtained composite feature data and feature standard data, specifically including:

[0077] The first composite feature is constructed based on monocytes and high-density lipoprotein cholesterol; the expression for the first composite feature is:

[0078] ;

[0079] In the formula, This is the first composite feature. It is a mononuclear cell; High-density lipoprotein cholesterol; As a smoothing factor, ;

[0080] A second composite feature is constructed based on platelets, neutrophils, and lymphocytes; the expression for the second composite feature is:

[0081] ;

[0082] In the formula, This is the second composite feature; Platelets; For neutrophils, Lymphocytes; As a smoothing factor, ;

[0083] Calculate the corresponding first composite feature data and second composite feature data based on the characteristic standard data of diabetic patients; construct a feature dataset based on the first composite feature data, second composite feature data and characteristic standard data.

[0084] In this embodiment of the invention, monocytes (MONO) and high-density lipoprotein cholesterol (HDLC) are selected from the characteristic standard data. Monocytes are the main source of pro-inflammatory and oxidative stress, while HDLC has anti-inflammatory and antioxidant functions. The ratio of the two can accurately capture pathological imbalances that cannot be reflected by a single indicator. The core of the first composite feature, MHR, is to integrate pro-inflammatory and anti-inflammatory capabilities, reflecting the body's oxidative / antioxidative balance. The smoothing factor prevents division by zero errors when HDLC is 0 or when missing values ​​are filled to 0, ensuring the robustness of the calculation process. Platelets (PLT), neutrophils (NEUT), and lymphocytes (LYMPH) are extracted from the characteristic standard data. PLT reflects the tendency to form blood clots, NEUT represents the intensity of non-specific inflammation, and LYMPH reflects the ability to regulate the immune system. The combination of the three can comprehensively cover the immune-inflammatory mechanisms related to the progression of DKD. The second composite feature, SII, namely the systemic immune-inflammatory index, focuses on the synergistic imbalance of thrombosis, inflammatory response, and immune regulation, and is a comprehensive quantification of the immune-inflammatory state. The core function of the smoothing factor is to avoid calculation anomalies when the LYMPH value is 0, ensuring the stability of the indicator calculation. For a single patient, the measured values ​​of MONO, HDLC, PLT, NEUT, and LYMPH are extracted from the feature standard data and substituted into the expressions of the two composite features to calculate the patient's MHR and SII values ​​one by one. All original dimensions in the feature standard data are retained, and the calculated first composite feature data (MHR) and second composite feature data (SII) are added as new dimensions to the original feature set to obtain the final feature dataset.

[0085] Step 102: Sampling with replacement on the feature dataset based on a preset number of iterations, and calculating the feature coefficients of each feature in each iteration. Based on the feature coefficients, the key features that are selected with a probability greater than a preset threshold during the iteration are counted. The key feature dataset is constructed based on the feature standard data of the key features.

[0086] In this embodiment of the invention, the core features are determined by Bootstrap-Lasso: each time, a new sample set is generated by sampling with replacement from the feature dataset, and the coefficient of each feature is calculated by Lasso regression; the frequency of non-zero feature coefficients in all iterations is counted, and features with a frequency higher than a preset threshold are selected as key features; finally, only the standard data of these key features are retained to construct a key feature dataset, thereby achieving dimensionality reduction and ensuring feature stability.

[0087] In one embodiment, the feature dataset is sampled with replacement based on a preset number of iterations, and the feature coefficients of each feature are calculated in each iteration. Key features with a selection probability greater than a preset threshold are statistically analyzed based on these feature coefficients. A key feature dataset is constructed based on the feature standard data of these key features, specifically including:

[0088] In each iteration, an updated feature dataset of the same size is generated from the feature dataset through sampling with replacement. A corresponding Logistic regression model is then constructed for each updated feature dataset. The expression for the Logistic regression model is:

[0089] ;

[0090] In the formula, For the first The characteristic coefficients of the Logistic regression model in the next iteration. This represents the regression coefficient vector of the model; The number of samples in the feature dataset. For the first The true label of each sample; For the first The predicted probability of a sample experiencing DKD is calculated using the Sigmoid function; The shrinkage factor was determined through internal 10-fold cross-validation. The total number of features; Let be the penalty factor for the j-th feature; The regression coefficient is the value corresponding to the j-th feature.

[0091] After the iteration is completed, the number of times the regression coefficient is not zero during the iteration is counted. Based on the statistical results, the selection probability of each feature is generated, and features with a selection probability greater than a preset threshold are retained as key features. Among them, a regression coefficient not being zero indicates that the feature was selected by the model in this iteration. A key feature dataset is constructed based on the feature standard data corresponding to the key features.

[0092] In this embodiment of the invention, a preset number of iterations is first set. Each iteration involves sampling with replacement from the complete feature dataset, generating an updated feature dataset with the same size as the original dataset. This sampling method allows some samples to appear repeatedly and some to remain unselected, simulating feature behavior under different data distributions and improving the robustness of subsequent screening results. For each updated feature dataset, a corresponding Logistic regression model is constructed, with the model aiming to minimize the loss function to solve for the feature coefficients. After completing all preset number of iterations, each feature is statistically analyzed, recording the number of times its regression coefficient is non-zero during the iteration process. A regression coefficient of zero indicates that it has been regularized and compressed. The "number of times the regression coefficient is non-zero" for each feature is divided by the total number of iterations to obtain the "selection frequency" of that feature. The core of this step is that only features that are consistently selected under different data distributions are considered core features highly correlated with the onset of DKD, excluding "pseudo-important features" caused by random factors. From the original feature standard data, only the column data corresponding to the key features selected in the second step are extracted, and all non-key features are removed. For example, if the preset iteration count is set to 200, and the regression coefficient of feature MHR is non-zero 142 times in 200 iterations, then its selection probability is 71%; the regression coefficient of feature CYSC is non-zero 142 times, and its selection probability is 67.5%. If the preset threshold is 60%, then features MHR with a frequency higher than this threshold are retained as key features, and the standard data corresponding to these features are extracted to construct a key feature dataset. In this embodiment of the invention, 12 highly stable key features were finally determined from the initial features: AGE (age), CYSC (cystatin C), ACR (urine albumin / creatinine ratio), CR (creatinine), EGFR (estimated filtration rate), UA (uric acid), HBA1C (glycated hemoglobin), HDLC (high-density lipoprotein), FT3 (free T3), MHR (monocyte / HDL ratio), G1O (globulin), and ALB (albumin). The selected key feature columns are retained along with the sample labels (whether DKD occurred) to construct a key feature dataset.

[0093] Step 103: Input the key feature dataset into the random forest model for iterative training until the preset number of training iterations or the loss function reaches the preset threshold to obtain the diabetic nephropathy risk prediction model; wherein, the random forest model contains several decision trees, with the goal of minimizing Gini impurity, traversing all possible split points of each key feature in the decision trees, and combining the prediction results of each decision tree to generate the predicted probability of DKD onset in diabetic patients.

[0094] In this embodiment of the invention, the key feature dataset is input into the random forest model, and the model is optimized through ensemble training of multiple decision trees; each decision tree selects feature splitting points with the goal of minimizing Gini impurity; after training, the key features of the patient to be predicted are input into all decision trees, each tree outputs the probability of disease, and the final result is the average of the probabilities of all trees, that is, the predicted probability of DKD in the patient.

[0095] In one embodiment, the random forest model contains several decision trees. With the objective of minimizing Gini impurity, it traverses all possible split points for each key feature within the decision trees. The prediction results from each decision tree are then combined to generate the predicted probability of DKD (Diabetic Kidney Disease) in diabetic patients. Specifically, this includes:

[0096] Receive standard feature data for each key feature, and traverse all possible split points for each feature in the decision tree with the goal of minimizing Gini impurity;

[0097] The expression for Gini impurity is:

[0098] ;

[0099] In the formula, For nodes The impurity of the gin; For nodes The probability of belonging to DKD or not belonging to DKD;

[0100] Calculate the weighted Gini impurity of the left and right child nodes after splitting, and select the child node with the largest Gini gain for splitting; where Gini gain is the difference between Gini impurity and weighted Gini impurity;

[0101] The prediction results of each decision tree are obtained based on the splitting results of each decision tree. The predicted probability of developing diabetes mellitus (DKD) in diabetic patients is generated based on the mean of the prediction results. The expression for the predicted probability of developing DKD is as follows:

[0102] ;

[0103] In the formula, For the sample The predicted probability; The total number of decision trees; For the first The prediction results of the decision tree.

[0104] In this embodiment of the invention, the random forest model receives the previously constructed key feature dataset, which contains only the standard data corresponding to the selected high-stability key features, ensuring that the input data is accurate and free of redundancy. For the construction of each decision tree, the model traverses all possible split points for each key feature. Here, a "split point" is the actual observed value of that feature. For example, for the age feature, the age values ​​of all patients in the dataset are used as candidate split points; for the MHR feature, the calculated MHR values ​​of all patients are used as candidate split points, ensuring that no feature boundaries that could distinguish between DKD and non-DKD are overlooked. Gini impurity is used to measure the purity of the node samples, that is, the degree of concentration of samples within a node that have either experienced DKD or not. The value ranges from 0 to 0.5, with values ​​closer to 0 indicating higher node purity and values ​​closer to 0.5 indicating lower purity. For each candidate split point, the current node is split into a left child node and a right child node, and then the weighted Gini impurity after the split is calculated; the expression for the weighted Gini impurity is: ;in, and These are the sample numbers for the left and right child nodes, respectively. , These represent the Gini impurities of the left and right child nodes, respectively. The core of the weighting method is to allocate weights according to the proportion of the child node's sample size to the parent node's sample size, avoiding splitting bias caused by excessively small sample sizes of factor nodes. The Gini gain is calculated using the following expression: A larger Gini gain indicates a more significant improvement in node purity after splitting. The model selects the candidate split point and corresponding feature with the largest Gini gain to complete the split of the current node; then, it repeats the above process for the left and right child nodes after the split until the node meets the stopping condition, such as the sample size reaching the minimum or the Gini impurity falling below the threshold. After each decision tree is built, for the input patient key feature data, it will eventually fall into a terminal node along the splitting path of the decision tree. The class proportion of the samples in the terminal node is the prediction result of the decision tree for the patient's DKD incidence. For example, if an endpoint has 80 samples and 60 of them experience DKD, then... =0.75. The ensemble forest contains several independently constructed decision trees (e.g., 100 trees). The model collects the predictions from all decision trees and takes the average as the final predicted probability of DKD for the patient. For example, if the average predicted probability of a patient from 100 decision trees is 0.42, then the predicted probability of that patient developing DKD in the future is 42%. This ensemble approach effectively reduces the risk of overfitting from a single decision tree and improves the stability and generalization ability of the prediction results.

[0105] In one embodiment, after generating the predicted probability of DKD in diabetic patients by combining the prediction results of each decision tree, the method further includes generating a visual risk guidance map based on the SHAP value of each key feature.

[0106] Calculate the SHAP value for each key feature; where the SHAP value characterizes the marginal contribution of the key feature to the prediction result; the expression for the SHAP value is:

[0107] ;

[0108] In the formula, For the j-th feature pair of samples The SHAP value; For key feature set; The feature subset is a combination of features randomly selected from the remaining key features after excluding the j-th feature from the key feature set F. When the random forest model only inputs a subset of features When the j-th feature is used, for the sample The predicted probability of DKD incidence; For random forest models, only a subset of features S is input to the samples. The predicted probability of DKD incidence;

[0109] The average absolute value of the SHAP of all samples in the key feature dataset is calculated and sorted. A feature importance bar chart is generated based on the sorting result. The feature importance bar chart identifies a predetermined number of key features with high risk contribution factors. For a single sample, an individual risk attribution force guide map is generated based on the SHAP of each key feature. The contribution direction and strength of each key feature are displayed based on the individual risk attribution force guide map.

[0110] In this embodiment of the invention, cooperative game theory logic is used to deconstruct the independent impact of each key feature on the prediction result of DKD incidence, clarifying its role and strength in "increasing risk" or "reducing risk". The essence of the SHAP value is the average marginal contribution of the j-th key feature to the prediction result of sample x, i.e., a certain diabetic patient, among all possible feature combinations. A value >0 indicates that this characteristic increases the risk of developing DKD in patients; A value less than 0 indicates that the feature reduces risk, while the absolute value corresponds to the strength of contribution. For example, a patient's MHR (Mild Kidney Disease) has a SHAP value of 0.09, meaning this feature increases the predicted probability of DKD incidence by 9 percentage points; while a HDLC (High-Risk Kidney Disease) patient's SHAP value is -0.03, indicating this feature reduces the risk by 3 percentage points. Furthermore, from a "full-sample perspective," the most influential key features for DKD prediction are selected to provide a global priority reference for clinical intervention. The specific steps are as follows: First, calculate the absolute value of the SHAP value for each key feature across all samples in the key feature dataset; then, average the absolute SHAP values ​​of each feature. The larger the average value, the more significant the overall impact of the feature on DKD incidence prediction in the entire population; then, sort all key features from highest to lowest average value; finally, generate a feature importance bar chart based on the ranking results, and label the top-ranked features as "high-risk contribution factors." See also... Figure 2 , Figure 2 This is an example diagram illustrating feature importance in one embodiment of the present invention. The diagram shows the ranking of the average absolute values ​​of the SHAP values ​​of 12 key features. After ranking, the average absolute values ​​of the SHAP values ​​of ACR, AGE, CYSC, EGFR, and HBA1C rank in the top five, thus these five features are identified as the core factors driving DKD risk at the population level. Furthermore, focusing on the "individual patient perspective" makes the "black box" decision-making process of the model transparent, helping doctors accurately locate the individual risk sources of patients. The specific process is as follows: For a diabetic patient to be analyzed, the SHAP values ​​of all key features are extracted, and a force-directed plot is generated based on these values; in the diagram, the baseline predicted value of the model (the average DKD incidence probability of all samples) is used as the baseline, with red bars representing features with positive SHAP values ​​(i.e., risk drivers; the longer the bar, the stronger the risk-increasing effect on the patient), and blue bars representing features with negative SHAP values ​​(i.e., protective factors; the longer the bar, the more significant the risk-reducing effect on the patient); the sum of the SHAP values ​​of all features ultimately points to the actual predicted probability of DKD incidence for the patient. See Figure 3 , Figure 3 This is an example diagram illustrating individual risk attribution force guidance in one embodiment of the present invention. It should be noted that the monocyte-to-HDL ratio mentioned in the diagram corresponds to the first composite characteristic described above. Red bars represent positive risk drivers, and blue bars represent negative protective factors. The attribution force guidance diagram for a certain patient shows that glomerular filtration rate and cystatin C are the main risk drivers, while high-density lipoprotein is the main protective factor. This clearly demonstrates that the core causes of this patient's high risk are inflammation and occult kidney damage, providing a clear basis for doctors to develop personalized intervention plans.

[0111] In one embodiment, the training method for the diabetic nephropathy risk prediction model further includes generating intervention suggestions based on a visualized risk guidance map. Specifically, when the characteristic standard data of a high-risk contribution factor exceeds the clinical normal range, a direct risk warning and direct intervention suggestions for key features are generated; when clinical indicators are normal, but key feature data associated with clinical indicators are abnormal and the key feature SHAP value is positive, a occult lesion warning is generated; when the characteristic standard data of a high-risk contribution factor exceeds the clinical normal range and a preset demographic feature exists, a dynamic threshold adjustment suggestion is generated.

[0112] In this embodiment of the invention, the focus is on "overtly abnormal indicators," generating actionable intervention plans for core risk factors that have clearly exceeded the clinically normal range. The core logic is: based on a feature importance bar chart to identify high-risk contributing factors, if a patient's characteristic standard data for this factor exceeds the clinically recognized normal range and its SHAP value is positive, a direct risk warning is triggered. Intervention recommendations are closely tailored to the pathological significance of this abnormal feature, ensuring relevance and operability. For example, if a patient's MHR is a high-risk contributing factor, its characteristic data is 0.5 (clinically normal range <0.4), and its SHAP value is 0.08, i.e., a positive contribution, the system will generate a warning indicating significant oxidative stress and micro-inflammatory state, and generate corresponding recommendations: 1. Adopt an anti-inflammatory diet such as the Mediterranean diet; 2. Assess the necessity of intensive statin therapy; 3. Improve immunoglobulin subset analysis and monitor the inflammatory regulatory state—direct intervention recommendations to help quickly control overt risk sources.

[0113] Then, we explore the potential risks of "superficially normal but internally abnormal" conditions to avoid missing early-stage occult lesions due to a single normal indicator. The core logic is: when a patient's main routine clinical indicators are within the normal range, but a key characteristic data strongly correlated with them is abnormal, and the SHAP value of this key characteristic is positive, an early warning of occult lesions is generated. The core value of this type of warning is to detect "compensatory lesions," where organ function is temporarily normal, but core sensitive indicators have already indicated potential damage. For example, a patient's EGFR is 85 mL / min / 1.73 m² (clinical normal range >60), but the key characteristic CYSC is 1.1 mg / L, which exceeds the normal clinical range, and the CYSC SHAP value is 0.06. Based on the result of normal EGFR but abnormally elevated CYSC, the system will generate a warning of occult glomerular filtration dysfunction, suggesting: 1. shortening the DKD follow-up cycle from annually to every 3 months; 2. strictly avoiding nephrotoxic drugs such as nonsteroidal anti-inflammatory drugs (NSAIDs); 3. supplementing the screening with warnings of sensitive indicators of renal tubular damage such as urinary retinol-binding protein (RBP) to achieve early intervention.

[0114] Furthermore, considering individual patient background differences and avoiding a one-size-fits-all intervention standard, the system generates personalized control target recommendations for scenarios where high-risk factors overlap with specific demographic characteristics. The core logic is: when the high-risk contributing factor data identified by the feature importance bar chart is abnormal, and the patient also possesses preset specific demographic characteristics, such as advanced age or pregnancy—uncontrollable background characteristics—the system will adjust the control threshold of that risk factor based on clinical guidelines and evidence-based medicine, generating safer intervention recommendations that better suit the individual's situation. For example, if a patient's HBA1C is 8.2% (the conventional control target is <7.0%, belonging to a high-risk contributing factor), and their demographic characteristic is age 78, considering that the risk of hypoglycemia outweighs the benefit of glycemic control in elderly patients, it is recommended to dynamically adjust the HBA1C control target to <8.0%, prioritizing hypoglycemic drugs with lower hypoglycemic risk, such as dipeptidyl peptidase-4 inhibitors, thus balancing the intervention effect with patient tolerability and improving the feasibility of the clinical protocol.

[0115] In this embodiment of the invention, a training device for a diabetic nephropathy risk prediction model is also provided, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the above-described training method for the diabetic nephropathy risk prediction model.

[0116] In this embodiment of the invention, a computer-readable storage medium is also provided, which includes a stored computer program, wherein the computer program controls the device where the computer-readable storage medium is located to execute the above-described training method for the diabetic nephropathy risk prediction model when it is running.

[0117] For example, a computer program can be divided into one or more modules, one or more of which are stored in memory and executed by a processor to carry out the present invention. One or more modules can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a training device for a diabetic nephropathy risk prediction model.

[0118] The training device for the diabetic nephropathy risk prediction model can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The training device for the diabetic nephropathy risk prediction model may include, but is not limited to, a processor, memory, and a display. Those skilled in the art will understand that the above-mentioned components are merely examples of training devices for the diabetic nephropathy risk prediction model and do not constitute a limitation on the training device. It may include more or fewer components, combinations of certain components, or different components; for example, the training device for the diabetic nephropathy risk prediction model may also include input / output devices, network access devices, buses, etc.

[0119] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the training device for the diabetic nephropathy risk prediction model, connecting various parts of the training device via various interfaces and lines.

[0120] The memory can be used to store computer programs and / or modules. The processor, by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory, enables various functions of the training device for the diabetic nephropathy risk prediction model. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function (such as sound playback, text conversion, etc.), etc.; the data storage area can store data created based on the use of the mobile phone (such as audio data, text message data, etc.). In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital cards (SD cards), flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0121] The training module based on the diabetic nephropathy risk prediction model, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. Those skilled in the art can understand and implement this without any inventive effort.

[0122] This invention provides a training method for a diabetic nephropathy (DKD) risk prediction model. By collecting multi-dimensional feature raw data, it comprehensively covers key information related to the onset of DKD in patients. Standardization processing eliminates dimensional differences and abnormal interference from different dimensions of data. Simultaneously, it constructs composite features to deeply mine the potential correlations between individual features, making the feature dataset both comprehensive and targeted, laying a high-quality data foundation for accurate identification. In the feature selection stage, through sampling with replacement with a preset number of iterations and feature coefficient statistics, combined with key features exhibiting strong stability and correlation based on feature selection probability thresholds, redundant information and interfering factors are effectively eliminated. The focus is on core features that contribute significantly to DKD onset prediction, simplifying the model structure and avoiding prediction bias caused by irrelevant features. This allows the model to concentrate on capturing disease-related signals, significantly improving identification accuracy. Iterative training is performed using a random forest model, optimizing decision tree split points with the goal of minimizing Gini impurity. This captures the nonlinear relationships and complex interactions between key features. Collaborative prediction using multiple decision trees reduces the generalization error and overfitting risk of a single model, improving the model's adaptability to complex data and prediction stability.

[0123] Example 2

[0124] See Figure 4 , Figure 4 This is a flowchart illustrating a method for predicting the risk of diabetic nephropathy according to an embodiment of the present invention. The method includes steps 201 to 202, each of which is detailed below:

[0125] Step 201: Collect key feature data of the patient and perform standardization processing to obtain key feature standard data.

[0126] In this embodiment of the invention, key feature data consistent with those collected from the patients to be predicted during the model training phase are acquired. These key features are highly stable indicators selected through training methods, covering core dimensions such as demographics, renal function, glucose and lipid metabolism, and immune inflammation, ensuring the data's compatibility with the model. Subsequently, the acquired raw key feature data undergoes the same standardization processing as during the training phase: for missing values, multiple imputation + prediction mean matching method, consistent with that used during training, is employed to fill in missing values, avoiding the impact of insufficient data integrity on prediction; for outliers, the boundary is calculated using the quartile method and tail reduction is performed to remove extreme noise interference. The resulting standardized key feature data is consistent with the model training data in terms of format, quality, and distribution.

[0127] Step 202: Input the key feature standard data into the diabetic nephropathy risk prediction model constructed using the training method of the diabetic nephropathy risk prediction model described in Example 1, so that the diabetic nephropathy risk prediction model generates the predicted probability of the patient's DKD onset.

[0128] In this embodiment of the invention, the risk assessment results are directly output based on the already trained model. The key feature standard data obtained in step 201 are input into the diabetic nephropathy risk prediction model constructed using the training method of Example 1. This model is an optimized random forest model, which has captured the intrinsic correlation between key features and the onset of DKD through multiple rounds of training. After receiving the data, the model performs inference through multiple decision trees: each decision tree aims to minimize Gini impurity, and judges the key feature data layer by layer based on preset splitting rules, outputting the onset prediction probability of a single tree; subsequently, the model takes the average of the prediction results of all decision trees to generate the final DKD onset prediction probability, such as 35%, 62%, etc. This probability directly reflects the risk level of a patient developing DKD in a certain period of time, providing a quantitative basis for clinical risk grading and intervention decisions.

[0129] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0130] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make several improvements and substitutions without departing from the technical principles of the present invention, and these improvements and substitutions should also be considered within the scope of protection of the present invention.

Claims

1. A training method for a diabetic nephropathy risk prediction model, characterized in that, include: Raw feature data of several target types of diabetic patients in different dimensions were collected. The raw feature data was standardized to obtain feature standard data. Based on the feature standard data, pre-constructed composite features were calculated. A feature dataset was constructed based on the obtained composite feature data and the feature standard data. Among them, the first composite feature was constructed based on monocytes and high-density lipoprotein cholesterol; the second composite feature was constructed based on platelets, neutrophils and lymphocytes. The process involves collecting raw feature data from several target types of diabetic patients across different dimensions, and then standardizing this raw feature data to obtain standardized feature data, specifically including: Raw data on the characteristics of target type diabetic patients in different dimensions were collected; wherein, the types of the dimensions include population and physical characteristics, renal function indicators, glucose and lipid metabolism indicators, endocrine and liver function indicators, immune inflammation and blood routine indicators; Calculate the missing rate of the original data for each feature. For the original data with a missing rate lower than a preset threshold, fill in the missing values ​​by random sampling to obtain the initial complete data. Iterate through the data in the initial complete data and set them as missing states. Construct a regression model with all other data as predictors. Use the prediction mean matching method to extract data variables from the established regression model to fill in the missing values, thus completing the missing value processing of the original data. The upper and lower bounds of each feature are calculated using the quartile method. The original data that exceeds the upper bound or is less than the lower bound is shortened using the upper and lower bounds to complete the outlier processing of the original data. The feature standard data is obtained based on the results of missing value processing and outlier processing. The feature dataset is sampled with replacement based on a preset number of iterations, and the feature coefficients of each feature are calculated in each iteration. Key features with a selection probability greater than a preset threshold are statistically analyzed based on these feature coefficients. A key feature dataset is constructed based on the feature standard data of these key features. Specifically, this includes: For each iteration, an updated feature dataset of the same size as the original feature dataset is generated from the original feature dataset through sampling with replacement. A corresponding Logistic regression model is then constructed for each of the updated feature datasets; wherein the expression for the Logistic regression model is: ; In the formula, For the first The characteristic coefficients of the Logistic regression model in the next iteration. This represents the regression coefficient vector of the model; The number of samples in the feature dataset. For the first The true label of each sample; For the first The predicted probability of a sample experiencing DKD is calculated using the Sigmoid function; The shrinkage factor was determined through internal 10-fold cross-validation. The total number of features; Let be the penalty factor for the j-th feature; The regression coefficient is the value corresponding to the j-th feature. After the iteration is completed, the number of times the regression coefficient is not zero during the iteration is counted. Based on the statistical results, the selection probability of each feature is generated, and features with a selection probability greater than a preset threshold are retained as key features. Among them, a regression coefficient not being zero indicates that the feature was selected by the model in this iteration. Construct the key feature dataset based on the feature standard data corresponding to the key features; The key feature dataset is input into a random forest model for iterative training until a preset number of training iterations or a preset threshold for the loss function is reached, thereby obtaining a diabetic nephropathy risk prediction model. The random forest model contains several decision trees, with the goal of minimizing Gini impurity. All possible split points of each key feature are traversed in the decision trees, and the prediction results of each decision tree are combined to generate the predicted probability of DKD onset in diabetic patients.

2. The training method for the diabetic nephropathy risk prediction model as described in claim 1, characterized in that, The calculation of pre-constructed composite features based on the feature standard data, and the construction of a feature dataset based on the obtained composite feature data and the feature standard data, specifically includes: The expression for the first composite feature is: ; In the formula, This is the first composite feature. It is a mononuclear cell; High-density lipoprotein cholesterol; As a smoothing factor, ; The expression for the second composite feature is: ; In the formula, This is the second composite feature; Platelets; For neutrophils, Lymphocytes; As a smoothing factor, ; Calculate the corresponding first composite feature data and second composite feature data based on the characteristic standard data of diabetic patients; A feature dataset is constructed based on the first composite feature data, the second composite feature data, and the feature standard data.

3. The training method for the diabetic nephropathy risk prediction model as described in claim 1, characterized in that, The random forest model contains several decision trees, aiming to minimize Gini impurity. It traverses all possible split points for each key feature within the decision trees, and combines the prediction results of each decision tree to generate the predicted probability of DKD incidence in diabetic patients. Specifically, this includes: Receive standard feature data for each key feature, and traverse all possible split points for each feature in the decision tree with the goal of minimizing Gini impurity; The expression for the Gini impurity is as follows: ; In the formula, For nodes The impurity of the gin; For nodes Category The probability of; =0 indicates that diabetic patients do not have a probability of developing DKD; =1 indicates the probability of developing DKD in diabetic patients; Calculate the weighted Gini impurity of the left and right child nodes after splitting, and select the child node with the largest Gini gain for splitting; wherein, the Gini gain is the difference between the Gini impurity and the weighted Gini impurity; The prediction results of each decision tree are obtained based on the splitting results of each decision tree. The mean of these prediction results is used to generate the predicted probability of developing Diabetic Kidney Disease (DKD) in diabetic patients. The expression for this predicted probability is: ; In the formula, For the sample The predicted probability; The total number of decision trees; For the first The prediction results of the decision tree.

4. The training method for the diabetic nephropathy risk prediction model as described in claim 1, characterized in that, After combining the prediction results of each decision tree to generate the predicted probability of DKD in diabetic patients, it also includes generating a visual risk guidance map based on the SHAP value of each key feature. Calculate the SHAP value for each of the key features; wherein the SHAP value is used to characterize the marginal contribution of the key feature to the prediction result; wherein the expression for the SHAP value is: ; In the formula, For the j-th feature pair of samples The SHAP value; For key feature set; The feature subset is a combination of features randomly selected from the remaining key features after excluding the j-th feature from the key feature set F. When the random forest model only inputs a subset of features When the j-th feature is used, for the sample The predicted probability of DKD incidence; For the random forest model, when only a feature subset S is input, the samples are... The predicted probability of DKD incidence; Calculate the average absolute value of the SHAP of all samples in the key feature dataset and sort them. Generate a feature importance bar chart based on the sorting results. The feature importance bar chart identifies a predetermined number of key features that rank highly as high-risk contribution factors. For a single sample, an individual risk attribution force steering map is generated based on the SHAP of each key feature, and the contribution direction and strength of each key feature are displayed based on the individual risk attribution force steering map.

5. The training method for the diabetic nephropathy risk prediction model as described in claim 4, characterized in that, The training method for the diabetic nephropathy risk prediction model also includes generating intervention suggestions based on the visualized risk guidance map, specifically: When the characteristic standard data of high-risk contributing factors exceed the clinical normal range, a direct risk warning and direct intervention suggestions for the key characteristics are generated. When clinical indicators are normal, but key feature data associated with the clinical indicators is abnormal and the key feature SHAP value is positive, a occult lesion warning is generated. When the characteristic standard data of high-risk contribution factors exceed the clinical normal range and there are preset demographic characteristics, dynamic threshold adjustment suggestions are generated.

6. A method for predicting the risk of diabetic nephropathy, characterized in that, include: Collect key feature data of patients and perform standardization processing to obtain key feature standard data; The key feature standard data is input into a diabetic nephropathy risk prediction model constructed using the training method of the diabetic nephropathy risk prediction model as described in any one of claims 1 to 5, so that the diabetic nephropathy risk prediction model generates the predicted probability of the patient's DKD onset.

7. A terminal device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement a training method for a diabetic nephropathy risk prediction model as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform a training method for a diabetic nephropathy risk prediction model as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Construction method and application of diabetic nephropathy risk prediction model

    CN114220540A