Liver disease multi-classification risk prediction method and system based on machine learning
By performing univariate regression and multicollinearity tests on biochemical indicators, various machine learning models were constructed to screen out significantly correlated factors and dynamically adjust input features. This solved the problems of insufficient accuracy and stability in the existing technology for predicting liver disease risk, and achieved more efficient multi-category liver disease risk prediction and precise health guidance.
Patent Information
- Application Number
- CN202511445674.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2025-11-07
AI Technical Summary
Existing methods for predicting liver disease risk rely on traditional clinical indicators, which cannot fully reflect an individual's metabolic status and lack the ability to address multicollinearity issues among features, resulting in insufficient accuracy and stability of the models when predicting the risk of multiple categories of liver diseases.
By collecting biochemical indicators, performing univariate regression analysis and multicollinearity tests, we screened out significantly related potential risk factors, constructed multiple machine learning models for training, selected the benchmark model with the best performance, and built a dynamic judgment model based on contribution to achieve flexible classification of fatty liver disease of different degrees.
It improves the stability and accuracy of the model, ensures the independence of risk factors, enhances the reliability and adaptability of prediction results, and can better cope with complex clinical situations, providing precise health guidance.
Smart Images

Figure CN120910669A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of biomedical technology, in particular to a liver disease multi-classification risk prediction method and system based on machine learning. BACKGROUND
[0002] With the changes in lifestyle and dietary structure, metabolic-related fatty liver disease (MAFLD) has gradually become a serious public health problem worldwide. MAFLD is a disease characterized by liver fat accumulation, although it may have no obvious symptoms in the early stage, but its potential health risks are huge, which can lead to liver fibrosis, cirrhosis, and even hepatocellular carcinoma. Therefore, early identification of high-risk individuals and intervention is an important strategy to reduce the incidence of disease and improve long-term health outcomes. However, existing risk prediction methods often rely on traditional clinical indicators such as body mass index (BMI), blood glucose level and blood lipids, which cannot fully reflect the metabolic status of individuals.
[0003] In recent years, with the rapid development of omics technology, especially the application of adipokine and amino acidomics, a new way has been opened up for the early identification of metabolic diseases.
[0004] In the prior art, the publication number CN118072956A discloses a biomarker combination for predicting the incidence of metabolic-related fatty liver disease in adulthood from childhood, as well as a screening method and prediction system. Based on a large prospective cohort from childhood to adulthood, 117 characteristic data in five dimensions such as adipokine and amino acidomics data in children's serum or plasma are collected, and a marker combination for predicting the risk of metabolic-related fatty liver disease in adulthood from childhood is screened out using machine learning. The simplest biomarker combination is glutamine, serine and high molecular adiponectin. The ROC-AUC of the model based on this combination is 0.86, while the ROC-AUC of the model based on the best combination is 0.92, which can accurately evaluate whether a child will develop metabolic-related fatty liver disease in adulthood and identify high-risk children. However, the feature screening process in this scheme lacks step-by-step testing and optimization mechanism, and there is no mention of handling the problem of multiple collinearity between features, which can lead to redundant or highly correlated features in the model training process, affecting the accuracy and stability of the model. At the same time, the marker combination is fixed and used as a unified input to build a single model for prediction, which cannot reflect the influence of different risk factors in different fatty liver disease classification, and this fixed architecture may not perform well in predicting complex and multi-class liver disease risks, making it difficult to achieve more flexible classification discrimination.
[0005] The above information disclosed in the background section is only used to enhance the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0006] The present application aims to provide a liver disease multi-classification risk prediction method and system based on machine learning to solve the problems raised in the background art.
[0007] To achieve the above-mentioned purpose, the present application provides the following technical solutions: A liver disease multi-classification risk prediction method based on machine learning, the specific steps comprising: Collecting the degree of fatty liver disease diagnosis results and multiple biochemical indicators of a plurality of subjects to form a training sample set, performing single factor regression analysis on each biochemical indicator, screening out the biochemical indicators significantly related to fatty liver disease as potential risk factors; Performing multiple collinearity test on the potential risk factors to obtain the variance inflation factor of each potential risk factor, and according to the variance inflation factor, screening out the factors meeting the collinearity requirement according to the preset threshold as important risk factors; Building multiple machine learning classification models of different frameworks, and training each model to learn the mapping relationship between the important risk factors and the degree of fatty liver disease, and selecting the machine learning classification model with the optimal performance index as the benchmark model; Obtaining the contribution degree of each important risk factor in the judgment of different degrees of fatty liver disease in the trained benchmark model, sorting the important risk factors based on the contribution degree, and determining the classification significant factors according to the contribution value change range; Based on the framework of the benchmark model, building a no-mild fatty liver disease judgment model and a moderate-severe fatty liver disease judgment model, determining the moderate-severe interval based on the classification significant factor data of the moderate-severe fatty liver disease patients, and based on whether the classification significant factor of the patient to be analyzed falls into the moderate-severe interval, preferentially calling different judgment models to perform fatty liver disease judgment.
[0008] Further, the degree of fatty liver disease includes no fatty liver disease, mild fatty liver disease and moderate-severe fatty liver disease, and the multiple biochemical indicators specifically include age, gender, height, weight, waist circumference, systolic pressure, diastolic pressure, body mass index, neutrophil count, neutrophil ratio, lymphocyte count, lymphocyte percentage, monocyte count, red blood cell count, red blood cell distribution width, platelet, total bilirubin, direct bilirubin, indirect bilirubin, glucose, total cholesterol, triglyceride, high-density lipoprotein, low-density lipoprotein, glycosylated hemoglobin, uric acid and serum homocysteine; the collected multiple biochemical indicators are pretreated, and the pretreated data is stored in the training sample set.
[0009] Further, the single factor regression analysis is performed on each biochemical indicator to calculate the significance probability value of each biochemical indicator and the degree of fatty liver disease. The logic for screening the biochemical indicators significantly related to fatty liver disease based on the significance probability value is as follows: a significance threshold is set, and the biochemical indicators with a significance probability value less than the significance threshold are regarded as potential risk factors.
[0010] Further, the potential risk factors are subjected to multicollinearity test, and the variance inflation factor of each potential risk factor is obtained. The formula for calculating the variance inflation factor is as follows: ; In the formula, VIFj is the variance inflation factor of the jth potential risk factor, Rj2 is the determination coefficient obtained by linear regression of the jth potential risk factor as the dependent variable and the remaining potential risk factors as the independent variables, where j is the index of the potential risk factor; The logic for screening the factors meeting the collinearity requirement according to the preset threshold is as follows: if , it is determined that the jth potential risk factor has serious multicollinearity and is removed; If , it is determined that the jth potential risk factor does not have serious multicollinearity and is recorded as an important risk factor. In the formula, VIFj is the variance inflation factor of the jth potential risk factor,
[0011] Further, the machine learning classification model specifically includes a decision tree model, a random forest model, a logistic regression model, a gradient boosting model, an extreme gradient boosting model, a light gradient boosting model, a categorical feature gradient boosting model, an extremely random tree model, and an adaptive boosting algorithm model. The performance indicators of each model specifically include accuracy, sensitivity, specificity, positive predictive value, negative predictive value, F1 score, and area under the receiver operating characteristic curve. The specific logic for optimizing the hyperparameters of each classification model is as follows: determine the value range of the corresponding hyperparameters in each classification model, use the cross-validation strategy, take the classification accuracy as the optimization indicator, and determine the optimal hyperparameter combination of each classification model. According to the optimal hyperparameter combination, set the hyperparameters of each classification model. The logic for determining the benchmark model is as follows: divide the data in the training sample set into two parts, including the training set and the validation set. Train each classification model using the important risk factor data and the corresponding fatty liver disease degree in the training set until the set training round is reached, and then terminate the training to complete the training. Verify each trained classification model using the important risk factor data and the corresponding fatty liver disease degree in the validation set, extract the performance indicators of each model during the verification process, and select the classification model corresponding to the maximum value of the sum of the accuracy and the area under the receiver operating characteristic curve as the benchmark model.
[0012] Furthermore, the method for obtaining the contribution of each important risk factor in the judgment of different degrees of fatty liver disease during the training of the benchmark model is as follows: calculate the shap value of each important risk factor under each degree of fatty liver disease, characterize its contribution by the shap value of each important risk factor, and arrange each important risk factor in descending order of contribution for each degree of fatty liver disease to obtain three important risk factor sequences corresponding one-to-one with no fatty liver disease, mild fatty liver disease and moderate to severe fatty liver disease; The specific logic for determining significant risk factors based on the magnitude of contribution value changes is as follows: The contribution dispersion of each important risk factor under different degrees of fatty liver disease is calculated. A comprehensive change index is then calculated by combining the contribution value dispersion with the ranking dispersion in the important risk factor sequence. The specific formula used is as follows: ; In the formula, Let q be the comprehensive change index of the qth important risk factor. Let be the dispersion of the contribution value of the q-th important risk factor. Let be the rank variance of the q-th important risk factor among the three important risk factor sequences, used to characterize the rank dispersion, where q is the index of the important risk factor. and These are the weighting coefficients for the dispersion of contribution values and the dispersion of ranking, respectively. and and All are greater than 0; The dispersion of the contribution value of the qth important risk factor The formula used for the calculation is: ; In the formula, Let q be the average shap value of the qth important risk factor. This refers to the overall classification of the severity of fatty liver disease. and , representing the shap value of the qth important risk factor in the severity of fatty liver disease in the kth and gth categories, respectively. k and g are both indices of the severity categories of fatty liver disease. Important risk factors with a comprehensive change index greater than the classification threshold are considered as significant classification factors.
[0013] Furthermore, the significant classification factors specifically include diastolic blood pressure and high-density lipoprotein. Two judgment models based on the baseline model architecture are trained, namely, a judgment model for no-mild fatty liver disease and a judgment model for moderate-to-severe fatty liver disease. The input of the moderate-to-severe fatty liver disease judgment model and the no-mild fatty liver disease judgment model is the important risk factor in the corresponding important risk factor sequence respectively, the output of the moderate-to-severe fatty liver disease judgment model is that the patient has moderate-to-severe fatty liver disease or the patient does not have moderate-to-severe fatty liver disease, and the output of the no-mild fatty liver disease judgment model is that the patient has mild fatty liver disease or the patient does not have fatty liver disease. The logic for determining the moderate-to-severe interval is that the moderate-to-severe interval includes a diastolic blood pressure value interval and a high-density lipoprotein value interval, the maximum and minimum values of diastolic blood pressure and high-density lipoprotein of all patients with moderate-to-severe fatty liver disease in the training sample set are collected, and the corresponding value interval is established, wherein the diastolic blood pressure value interval is specifically , and the high-density lipoprotein value interval is specifically , wherein and are the minimum and maximum values of the diastolic blood pressure value interval respectively, and are the minimum and maximum values of the high-density lipoprotein value interval respectively. The high-density lipoprotein and diastolic blood pressure values of the patient to be detected are collected, and it is judged whether they fall within the corresponding value interval, if any of the high-density lipoprotein and diastolic blood pressure values falls within the corresponding value interval, the moderate-to-severe fatty liver disease judgment model is called preferentially, otherwise the no-mild fatty liver disease judgment model is called preferentially.
[0014] The application also provides a liver disease multi-classification risk prediction system based on machine learning, which is used to execute the liver disease multi-classification risk prediction method based on machine learning. The training sample collection module is used to collect the fatty liver disease degree diagnosis results and multiple biochemical indexes of a plurality of subjects, form a training sample set, perform single factor regression analysis on each biochemical index, and screen out the biochemical indexes significantly related to fatty liver disease as potential risk factors. The multiple collinearity analysis module is used to perform multiple collinearity test on the potential risk factors, obtain the variance inflation factor of each potential risk factor, and screen out the factors meeting the collinearity requirement as important risk factors according to the preset threshold value. The optimal model selection module is used to construct a plurality of machine learning classification models of different frameworks, and train the models one by one to learn the mapping relationship between the important risk factors and the degree of fatty liver disease, and select the machine learning classification model with the optimal performance index as the benchmark model. The contribution analysis module is used to obtain the contribution degrees of each important risk factor in the trained benchmark model in the judgment of different degrees of fatty liver disease, sort the important risk factors based on the contribution degrees, and determine the classification significant factors according to the contribution value change range; The classification model calling module is used to construct a no-mild fatty liver disease judgment model and a moderate-to-severe fatty liver disease judgment model based on the benchmark model framework, determine a moderate-to-severe interval based on the classification significant factor data of the moderate-to-severe fatty liver disease patients, and preferentially call different judgment models to perform fatty liver disease judgment based on whether the classification significant factors of the patient to be analyzed fall into the moderate-to-severe interval.
[0015] Compared with the prior art, the present application has the following advantages: Through the systematic feature screening process, especially the multiple collinearity test, the independence and significance of the selected risk factors in statistics are ensured, the stability and accuracy of the model are improved, and the overfitting problem caused by feature redundancy is avoided; Secondly, a plurality of machine learning models are compared and optimized, so that the model selection process is more scientific and comprehensive, the hyperparameters of different models are optimized, the process of finally determining the benchmark model is ensured, the reliability of the prediction result is ensured, and the model can better cope with complex situations under different sample characteristics and clinical backgrounds; Finally, based on the dynamic selection mechanism of the contribution degree, the scheme has higher flexibility and adaptability in the classification task, the contribution value of each risk factor is continuously monitored, the input features can be adjusted in real time, more accurate judgments are provided in the classification and prediction of different types of fatty liver disease, and the dynamic selection mechanism not only improves the accuracy of the prediction result, but also provides more accurate health guidance for patients, so that individual needs can be better met in clinical intervention. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 The figure is a schematic diagram of the overall method of the present application; Figure 2 The figure is a bar chart of the contribution degrees of the important risk factors of no fatty liver disease; Figure 3 The figure is a bar chart of the contribution degrees of the important risk factors of mild fatty liver disease; Figure 4 The figure is a bar chart of the contribution degrees of the important risk factors of moderate-to-severe fatty liver disease; Figure 5 The figure is a schematic diagram of the overall system structure of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical scheme and advantages of the present application clearer and more apparent, the present application is further described in detail below with reference to specific embodiments.
[0018] It should be noted that unless otherwise defined, technical terms or scientific terms used in the present application shall have the common meaning to those skilled in the art of the present application. The terms "first", "second", and similar terms used in the present application do not denote any order, number or importance, but are only used to distinguish different components. The terms "include", "contain" and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "up", "down", "left", "right" and the like are only used to indicate relative positional relationships, and when the absolute positions of the described objects change, the relative positional relationships may also change accordingly.
[0019] Embodiments: Please refer to Figures 1-4 The present application provides a technical solution: A liver disease multi-classification risk prediction method based on machine learning, the specific steps comprising: Step 1: Collect the diagnosis results of the degree of fatty liver disease of a plurality of subjects and a plurality of biochemical indicators to form a training sample set, perform single factor regression analysis on each biochemical indicator, and screen out biochemical indicators significantly related to fatty liver disease as potential risk factors.
[0020] The data is from a certain third-grade hospital in Handan City. The sample screening conditions are as follows, condition 1: body mass index > 23 kg / m 2 (Overweight / obesity standard for Asian population). Condition 2: contains 5 sub-conditions, at least meets two of them, (1) waist circumference: male > 90 cm, female > 80 cm; (2) blood pressure: systolic pressure > 130 mmHg and diastolic pressure > 85 mmHg; (3) triglycerides ≥ 1.70 mmol / L, (4) high-density lipoprotein, male < 1.0 mmol / L, female < 1.3 mmol / L; (5) 5.6 mmol / L < glucose < 5.9 mmol / L. Finally, metabolic-related fatty liver disease samples that meet condition 1 or more than 2 sub-conditions of condition 2 are selected, a total of 22,462 subject individuals' health examination data are included. The data collection complies with the principles of the Helsinki Declaration, all examination information is desensitized, and patient privacy identifiers are excluded.
[0021] The collected data is converted into a format, and the electronic medical record is extracted into an excel table form. The data is included in the standard, which is: age 18-100 years old; complete population statistics, anthropometry, blood biochemical indicators and liver ultrasound records; the missing rate of characteristic value is less than 30%, and the category data is labeled coding, such as gender: 0 for female, 1 for male.
[0022] The degree of fatty liver disease includes no fatty liver disease, mild fatty liver disease and moderate to severe fatty liver disease, and the multiple biochemical indicators specifically include age, gender, height, weight, waist circumference, systolic blood pressure, diastolic blood pressure, body mass index, neutrophil count, neutrophil ratio, lymphocyte count, lymphocyte percentage, monocyte count, red blood cell count, red blood cell distribution width, platelet, total bilirubin, direct bilirubin, indirect bilirubin, glucose, total cholesterol, triglyceride, high-density lipoprotein, low-density lipoprotein, glycosylated hemoglobin, uric acid and serum homocysteine.
[0023] The collected multiple biochemical indicators are preprocessed, and the preprocessed data is stored in the training sample set. The preprocessing includes missing value processing and data standardization, wherein the specific logic of the missing value processing is: directly eliminating the data set with missing values; Among them, all data standardization except classification characteristic data adopts Z-score standardization processing, the specific method is: subtracting the mean of each biochemical indicator and dividing by its standard deviation, converting the biochemical indicator into a standard normal distribution with a mean of 0 and a standard deviation of 1, which helps to improve the convergence speed and prediction performance of the model.
[0024] Traditional MAFLD binary prediction models, such as distinguishing between normal and fatty liver status, cannot fully reflect the continuous degree of disease severity, such as normal, mild and moderate to severe liver steatosis. This oversimplified approach limits the fine assessment of disease progression risk, the optimization of personalized treatment strategies and the comprehensive evaluation of precise intervention effects. Therefore, the outcome variable is divided into no fatty liver disease, mild fatty liver disease and moderate to severe fatty liver disease, which can more comprehensively reflect the continuous gradient change of MAFLD severity compared with the traditional binary classification method.
[0025] Single factor regression analysis is performed on each biochemical indicator to calculate the significance probability value of each biochemical indicator and the degree of fatty liver disease. The significance probability value is used to characterize the correlation, and the formula for calculating the significance probability value of each biochemical indicator and the fatty liver disease is: ; In the formula, is the significance probability value of the ith biochemical indicator, is the cumulative distribution function of the standard normal distribution, represents the absolute value of the i-th biochemical indicator test statistic, where i is the index of the biochemical indicator; It should be noted that, represents the association significance between the biochemical indicator and fatty liver disease. In statistical inference, the significance probability value is usually used to determine whether to reject the null hypothesis, where The smaller the value, the more significant the relationship between the biochemical indicator and fatty liver disease, indicating that it may be an important risk factor when The value of the biochemical indicator is close to 1, indicating that the relationship between the biochemical indicator and fatty liver disease is not significant, indicating that the biochemical indicator may not have a significant impact on the occurrence and development of fatty liver disease.
[0026] where is usually a statistical quantity calculated in hypothesis testing, reflecting the difference between sample data and hypothesis value. It is obtained by standardizing the difference between the sample mean or other statistical quantity and the population mean or expected value. Specifically, The larger the value, the more significant the relationship between the biochemical indicator and fatty liver disease in the sample.
[0027] is the cumulative distribution function of the standard normal distribution, representing the probability that a random variable is less than or equal to a certain value, in this formula, as input, reflects the tail probability corresponding to the statistical quantity with a large absolute value under the standard normal distribution.
[0028] where the i-th biochemical indicator test statistic The formula for calculating is: ; In the formula, is the regression coefficient of the i-th biochemical indicator, is the standard error of the regression coefficient of the i-th biochemical indicator; The logic for screening biochemical indicators significantly associated with fatty liver disease based on the significance probability value is as follows: Set a significance threshold, and biochemical indicators with a significance probability value less than the significance threshold are considered potential risk factors.
[0029] where the regression coefficient of the i-th biochemical indicator The way to obtain is to construct a suitable regression model, such as linear regression, logistic regression, etc. For multi-classification prediction of fatty liver disease, the logistic regression model is a common choice, and the regression coefficient is estimated by maximum likelihood estimation or least squares method, etc. ; Standard error It measures the variability of the regression coefficient estimates, quantifying the uncertainty of the regression coefficients, specifically calculated using mean squared error. The logic behind screening biochemical indicators significantly associated with fatty liver disease based on significance probability values is as follows: a significance threshold is set, and biochemical indicators with significance probability values less than the threshold are considered potential risk factors. The significance threshold is typically set to 0.05.
[0030] Step 2: Perform multicollinearity test on potential risk factors to obtain the variance inflation factor of each potential risk factor. Based on the variance inflation factor, select factors that meet the collinearity requirement according to the preset threshold and use them as important risk factors.
[0031] A multicollinearity test was performed on the potential risk factors to obtain the variance inflation factor for each potential risk factor. The formula used to calculate the variance inflation factor is as follows: ; In the formula, Let be the variance inflation factor of the j-th potential risk factor. The coefficient of determination is the result of linear regression with the j-th potential risk factor as the dependent variable and the remaining potential risk factors as independent variables, where j is the index of the potential risk factor. It should be noted that the variance inflation factor of the j-th potential risk factor is... It measures the first The extent to which the variance of a potential risk factor expands due to the influence of other potential risk factors. Specifically, VIF represents how much the variance of the regression coefficient increases in the presence of multicollinearity compared to the absence of multicollinearity. Specific This indicates that there is no multicollinearity and the potential risk factors are independent. In this case, the j-th potential risk factor is independent of the other independent variables. like It is generally believed that mild multicollinearity exists, which may have a slight impact on the stability of the model, but is not a serious problem. This indicates the presence of moderate multicollinearity, which may lead to inaccurate estimation of regression coefficients and warrants attention. This is usually considered to be due to severe multicollinearity. In this case, special attention is needed, and it may be necessary to consider deleting or merging some independent variables to reduce the impact of multicollinearity on the model.
[0032] The logic behind filtering factors that meet the collinearity requirement based on a preset threshold is as follows: If If the j-th potential hazard factor is found to have severe multicollinearity, it is removed. like , judge that the jth potential risk factor does not exist serious multicollinearity, denoted as an important risk factor; In the formula, is a collinearity degree threshold, wherein the collinearity degree threshold is generally set to be between 6 and 10.
[0033] Finally, 16 important risk factors are determined, and the results show that age, gender, waist circumference, systolic pressure, diastolic pressure, body mass index, monocyte count, red blood cell count, red blood cell distribution width, platelet, glucose, triglyceride, high-density lipoprotein, low-density lipoprotein, and serum homocysteine are important risk factors.
[0034] Step 3: Constructing a plurality of machine learning classification models of different frameworks, and training the models one by one to learn the mapping relationship between the important risk factors and the degree of fatty liver disease, and selecting the machine learning classification model with the optimal performance index as the benchmark model.
[0035] The machine learning classification model specifically includes a decision tree model, a random forest model, a logistic regression model, a gradient boosting model, an extreme gradient boosting model, a light gradient boosting model, a categorical feature gradient boosting model, an extremely random tree model, and an adaptive boosting algorithm model. The performance indicators of each type of model specifically include accuracy, sensitivity, specificity, positive predictive value, negative predictive value, F1 score, and area under the receiver operating characteristic curve. The accuracy evaluates the overall prediction accuracy of the model, the sensitivity focuses on the missed diagnosis rate, which is suitable for medical diagnosis scenarios, the specificity focuses on the misdiagnosis rate, which is suitable for screening healthy populations, the positive predictive value and the negative predictive value reflect the reliability of the model in positive and negative class prediction, the F1 score is suitable for class imbalance scenarios, the AUC-ROC comprehensively evaluates the ability of the model to distinguish between positive and negative classes, and is suitable for comparing multiple models.
[0036] The specific logic for optimizing the hyperparameters of each classification model is as follows: determine the value range of the corresponding hyperparameters in each classification model, use the cross-validation strategy, take the classification accuracy as the optimization indicator, and determine the optimal hyperparameter combination of each classification model; set the hyperparameters of each classification model according to the optimal hyperparameter combination; The parameter grid for tuning includes: n_estimators: [100, 200] (number of weak learners), learning_rate: [0.05, 0.1] (learning rate), max_depth: [5, 10, -1] (maximum depth of base learners), num_leaves: [15, 31, 63] (number of leaf nodes per tree), class_weight: [None, 'balanced'] (class weight setting). The cross-validation strategy is 10-fold stratified cross-validation (StratifiedKFold, n_splits=10), which ensures consistent class distribution in each fold, effectively reducing model variance and overfitting risk. Finally, by comparing the performance of all parameter combinations, the set of parameters with the best performance in cross-validation is selected as the final model's hyperparameter configuration.
[0037] The logic for determining the reference model is as follows: divide the data in the training sample set into two parts, including the training set and the validation set. Train each classification model using the important risk factor data in the training set and the corresponding degree of fatty liver disease until the set training round is reached. Then, terminate the training to complete the training. Verify each trained classification model using the important risk factor data in the validation set and the corresponding degree of fatty liver disease. Extract the performance indicators of each model during the verification process. Select the classification model with the maximum sum of accuracy and area under the receiver operating characteristic curve as the reference model.
[0038] Among them, after the above evaluation, the LightGBM algorithm model has the best effect, so the LightGBM algorithm model is used as the reference model.
[0039] Step 4: Obtain the contribution of each important risk factor in the reference model after training to the judgment of different degrees of fatty liver disease. Sort the important risk factors based on their contribution, and determine the classification significant factors according to the contribution value change range.
[0040] The method for obtaining the contribution of each important risk factor in the reference model training process to the judgment of different degrees of fatty liver disease is as follows: calculate the shap value of each important risk factor under each degree of fatty liver disease. The shap value of each important risk factor represents its contribution, and for each degree of fatty liver disease, the important risk factors are ranked in descending order of contribution to obtain three important risk factor sequences corresponding to no fatty liver disease, mild fatty liver disease, and moderate to severe fatty liver disease. The specific logic for determining significant risk factors based on the magnitude of contribution value changes is as follows: The contribution dispersion of each important risk factor under different degrees of fatty liver disease is calculated. A comprehensive change index is then calculated by combining the contribution value dispersion with the ranking dispersion in the important risk factor sequence. The specific formula used is as follows: ; In the formula, Let q be the comprehensive change index of the qth important risk factor. Let be the dispersion of the contribution value of the q-th important risk factor. Let be the rank variance of the q-th important risk factor among the three important risk factor sequences, used to characterize the rank dispersion, where q is the index of the important risk factor. and These are the weighting coefficients for the dispersion of contribution values and the dispersion of ranking, respectively. and and All are greater than 0; It should be noted that the composite change index of the qth important risk factor This reflects the stability of this factor under different assessments of fatty liver disease. The larger the value, the more significant the number. The more unstable the impact of a key risk factor under different assessments, the more likely it is that the key risk factor may lead to different results in the assessment of fatty liver disease under different circumstances.
[0041] The formula helps assess the importance and stability of risk factors in the assessment of different degrees of fatty liver disease by comprehensively considering changes in contribution value and ranking.
[0042] in It is the first The dispersion of the contribution values of key risk factors under different assessments indicates the degree of change in the contribution value of that factor to the assessment of fatty liver disease. A larger dispersion indicates a greater variation in the impact of that factor under different degrees of fatty liver disease assessments. The dispersion reflects the variability of risk factors in different situations, and is analyzed using a logarithmic function. This can smooth out the impact and avoid over-amplifying the effects of small changes.
[0043] Indicates the first The ranking variance of a key risk factor is used to characterize the fluctuation of its ranking across multiple assessments. The larger the ranking variance, the greater the variation in the relative importance of that factor across different judgments.
[0044] The dispersion of the contribution value of the qth important risk factor The formula used for the calculation is: ; In the formula, is the average shap value of the qth important risk factor, is the total category of the degree of fatty liver disease, and respectively represent the shap value of the qth important risk factor in the kth and gth category of the degree of fatty liver disease, k and g are both the index of the category of the degree of fatty liver disease, and the important risk factor with a comprehensive change index greater than the classification threshold is classified as a significant factor.
[0045] It should be noted that by calculating the dispersion of shap value, the influence of each risk factor under different categories of fatty liver disease can be effectively reflected. This setting allows us to identify factors that have inconsistent effects under different disease severity; By accumulating the absolute value of the difference, we can evaluate the influence of a risk factor as a whole, rather than just its performance in a specific category. This method helps to identify factors that may have a significant impact in multiple situations, and by standardizing, we can ensure that the dispersion of different risk factors is comparable, preventing some factors with larger shap values or more categories from dominating the calculation, making the results more interpretable and fair.
[0046] The formula is based on the theory of shap value and contribution value dispersion. Shap value provides a fair way to evaluate feature importance, which can quantify the specific influence of features on model prediction, while contribution value dispersion is a concept in statistics, aiming to measure the variability and uncertainty of data, i.e. shap value.
[0047] Step 5: Based on the benchmark model framework, build no-mild fatty liver disease judgment model and moderate-to-severe fatty liver disease judgment model, determine the moderate-to-severe interval based on the classification significant factor data of moderate-to-severe fatty liver disease patients, and based on whether the classification significant factor of the patient to be analyzed falls into the moderate-to-severe interval, preferentially call different judgment models to perform fatty liver disease judgment.
[0048] The classification significant factors specifically include diastolic blood pressure and high-density lipoprotein, and two judgment models based on the benchmark model framework are trained, which are no-mild fatty liver disease judgment model and moderate-to-severe fatty liver disease judgment model, respectively. The input of the moderate-to-severe fatty liver disease judgment model and the no-mild fatty liver disease judgment model is the important risk factor whose shap value in the corresponding important risk factor sequence is greater than the preset contribution threshold, respectively. The output of the moderate-to-severe fatty liver disease judgment model is that the patient has moderate-to-severe fatty liver disease or the patient does not have moderate-to-severe fatty liver disease. The output of the no-mild fatty liver disease judgment model is that the patient has mild fatty liver disease or the patient does not have fatty liver disease. The preset contribution threshold is set according to expert experience, and is generally set to 0.01 to 0.03. The logic for determining the moderate-to-severe interval is that the moderate-to-severe interval includes a diastolic blood pressure value interval and a high-density lipoprotein value interval. The maximum and minimum values of diastolic blood pressure and high-density lipoprotein of all patients with moderate-to-severe fatty liver disease in the training sample set are collected, and the corresponding value interval is established. The diastolic blood pressure value interval is specifically , and the high-density lipoprotein value interval is specifically , wherein and are the minimum and maximum values of the diastolic blood pressure value interval, respectively, and are the minimum and maximum values of the high-density lipoprotein value interval, respectively. The high-density lipoprotein and diastolic blood pressure values of the patient to be detected are collected, and it is judged whether they fall within the corresponding value interval. If any of the high-density lipoprotein and diastolic blood pressure values falls within the corresponding value interval, the moderate-to-severe fatty liver disease judgment model is called first, otherwise the no-mild fatty liver disease judgment model is called first.
[0049] By constructing two independent judgment models for no-mild fatty liver disease and moderate-to-severe fatty liver disease, more accurate classification can be achieved. This hierarchical classification method enables patients with different severity of fatty liver disease to receive more targeted diagnosis and treatment recommendations, thereby improving the accuracy of clinical decision-making. According to whether the classification significant factor of the patient to be analyzed falls within the moderate-to-severe interval, different judgment models are called first. This dynamic judgment mechanism enables the system to flexibly select the most suitable model according to the specific situation of the patient, thereby improving the efficiency and accuracy of judgment and reducing the risk of misdiagnosis.
[0050] Please refer to Figure 5 , the application also provides a liver disease multi-classification risk prediction system based on machine learning, which is used to execute the liver disease multi-classification risk prediction method based on machine learning described above, comprising: The training sample collection module is configured to collect the diagnosis results of the degree of fatty liver disease and a plurality of biochemical indexes of a plurality of subjects to form a training sample set, perform single-factor regression analysis on each biochemical index, and screen out biochemical indexes that are significantly related to the fatty liver disease as potential risk factors; The multiple collinearity analysis module is configured to perform multiple collinearity test on the potential risk factors, obtain a variance inflation factor of each potential risk factor, and screen out factors that meet the collinearity requirement according to the preset threshold value as important risk factors according to the variance inflation factor; The optimal model selection module is configured to construct a plurality of machine learning classification models of different frameworks, train the models one by one to learn the mapping relationship between the important risk factors and the degree of fatty liver disease, and select a machine learning classification model with the optimal performance index as a benchmark model. The contribution analysis module is configured to obtain the contribution of each important risk factor in the trained benchmark model to the judgment of fatty liver disease of different degrees, sort the important risk factors based on the contribution, and determine a classification significant factor according to the contribution value change range. The classification model calling module is configured to construct a no-mild fatty liver disease judgment model and a moderate-to-severe fatty liver disease judgment model based on the framework of the benchmark model, determine a moderate-to-severe interval based on the classification significant factor data of the moderate-to-severe fatty liver disease patients, and preferentially call different judgment models to perform fatty liver disease judgment based on whether the classification significant factor of the patient to be analyzed falls into the moderate-to-severe interval.
[0051] The above formulas are all dimensionless numerical calculations, and the formulas are obtained by software simulation of a large amount of data to obtain a formula of the most recent real situation. The preset parameters in the formula are set by a person skilled in the art according to the actual situation.
[0052] The above embodiments can be realized wholly or partially by software, hardware, firmware or any combination thereof. When realized by software, the above embodiments can be realized in the form of a computer program product wholly or partially. Those skilled in the art can realize that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized by hardware or software methods depends on the specific application and design constraints of the technical solutions.
[0053] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, which can be located in one place or distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0054] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.
Claims
1. A machine learning-based method for multi-class risk prediction of liver disease, characterized in that, The specific steps include: Collecting the diagnosis results of the degree of fatty liver disease and a plurality of biochemical indicators of a plurality of subjects to form a training sample set, performing single factor regression analysis on each biochemical indicator, screening out biochemical indicators significantly related to fatty liver disease as potential risk factors; Performing multiple collinearity test on the potential risk factors to obtain the variance inflation factor of each potential risk factor, and screening out factors meeting the collinearity requirement according to the preset threshold value as important risk factors according to the variance inflation factor. Constructing a plurality of machine learning classification models of different frameworks, and training the models one by one to learn the mapping relationship between the important risk factors and the degree of fatty liver disease, and selecting the machine learning classification model with the optimal performance index as the benchmark model. Obtaining the contribution of each important risk factor in the trained benchmark model to the judgment of fatty liver disease of different degrees, sorting the important risk factors based on the contribution, and determining the classification significant factors according to the contribution value change range. Based on the framework of the benchmark model, a no-mild fatty liver disease judgment model and a moderate-severe fatty liver disease judgment model are constructed, the moderate-severe interval is determined based on the classification significant factor data of the moderate-severe fatty liver disease patients, and whether the classification significant factor of the patient to be analyzed falls into the moderate-severe interval is determined, and different judgment models are called to perform fatty liver disease judgment. 2.The method of claim 1, wherein: The degree of fatty liver disease includes no fatty liver disease, mild fatty liver disease and moderate-severe fatty liver disease, and the plurality of biochemical indicators specifically include age, gender, height, weight, waist circumference, systolic pressure, diastolic pressure, body mass index, neutrophil count, neutrophil ratio, lymphocyte count, lymphocyte percentage, monocyte count, red blood cell count, red blood cell distribution width, platelet, total bilirubin, direct bilirubin, indirect bilirubin, glucose, total cholesterol, triglyceride, high-density lipoprotein, low-density lipoprotein, glycosylated hemoglobin, uric acid and serum homocysteine; the plurality of collected biochemical indicators are pretreated, and the pretreated data is stored in the training sample set. 3.The method of claim 2, wherein: Performing single factor regression analysis on each biochemical indicator to calculate the significance probability value of each biochemical indicator and the degree of fatty liver disease; The logic for screening out biochemical indicators significantly related to fatty liver disease based on the significance probability value is as follows: setting a significance threshold, and taking the biochemical indicators with a significance probability value less than the significance threshold as potential risk factors. 4.The method of claim 3, wherein: Performing multiple collinearity test on the potential risk factors to obtain the variance inflation factor of each potential risk factor, and the formula for calculating the variance inflation factor is: ; wherein is the variance inflation factor for the jth potential risk factor, is the determination coefficient when performing linear regression with the jth potential risk factor as the dependent variable and the remaining potential risk factors as the independent variables, where j is the index of the potential risk factor. The logic for screening out factors meeting the collinearity requirement according to the preset threshold is: if , it is judged that the jth potential risk factor has serious multicollinearity, and is removed; If , judge the jth potential risk factor does not exist serious multicollinearity, recorded as an important risk factor; In the formula, is a collinearity degree threshold value.
5. The machine learning-based method for predicting the risk of multiple classification of liver diseases according to claim 4, characterized in that: The machine learning classification model specifically includes a decision tree model, a random forest model, a logistic regression model, a gradient boosting model, an extreme gradient boosting model, a light gradient boosting model, a categorical feature gradient boosting model, an extremely random tree model, and an adaptive boosting algorithm model, and the performance indicators of each model specifically include accuracy, sensitivity, specificity, positive predictive value, negative predictive value, F1 score and area under the receiver operating characteristic curve. The specific logic for optimizing the hyperparameters of each classification model is: determining the value range of the corresponding hyperparameters in each classification model, using the cross-validation strategy, and determining the optimal hyperparameter combination of each classification model by taking the classification accuracy as the optimization index; and setting the hyperparameters of each classification model according to the optimal hyperparameter combination; The specific logic for determining the reference model is: dividing the data in the training sample set into two parts, including a training set and a validation set, training each classification model through the important risk factor data and the corresponding degree of fatty liver disease in the training set until the set training round is reached, and then terminating the training to complete the training, verifying each trained classification model through the important risk factor data and the corresponding degree of fatty liver disease in the validation set, extracting the performance indicators of each classification model during the verification process, and selecting the classification model corresponding to the maximum value of the sum of the accuracy and the area under the receiver operating characteristic curve as the reference model. 6.The method of claim 2, wherein the method further comprises: determining a risk score of the patient based on the classification result. The method for obtaining the contribution degree of each important risk factor in the reference model after completing the training is: calculating the shap value of each important risk factor under each degree of fatty liver disease, representing the contribution degree of each important risk factor through the shap value, and arranging each important risk factor in descending order according to the contribution degree for each degree of fatty liver disease to obtain three important risk factor sequences corresponding to no fatty liver disease, mild fatty liver disease, and moderate-to-severe fatty liver disease, respectively; The specific logic for determining the classification significant factor according to the contribution value change amplitude is: calculating the contribution dispersion of each important risk factor in the judgment of different degrees of fatty liver disease, and comprehensively calculating the comprehensive change index by combining the contribution value dispersion with the ranking dispersion in the important risk factor sequence, and the specific formula is: ; wherein, is the composite change index of the qth important risk factor, is the contribution value dispersion of the qth important risk factor, is the ranking variance of the qth important risk factor in the sequence of three important risk factors, used to characterize the ranking dispersion, where q is the index of the important risk factor, and are the weight coefficients of the contribution value dispersion and the ranking dispersion, respectively, where and and are both greater than 0. where the contribution value of the qth important risk factor is dispersed The formula on which the calculation is based is: ; wherein, is the average shap value of the qth important risk factor, is the total category of the degree of fatty liver disease, and respectively represent the shap value of the qth important risk factor in the kth category and the gth category of the degree of fatty liver disease, k and g are both the index of the category of the degree of fatty liver disease, and the important risk factor with a comprehensive change index greater than the classification threshold is classified as a significant factor.
7. The machine learning-based method for predicting the risk of multiple classification of liver diseases according to claim 6, characterized in that: The classification significant factor specifically includes diastolic blood pressure and high-density lipoprotein, and two judgment models based on the reference model architecture are trained, which are the no-mild fatty liver disease judgment model and the moderate-to-severe fatty liver disease judgment model, respectively; The inputs of the moderate-to-severe fatty liver disease and no-mild fatty liver disease judgment models are the important risk factors in the corresponding important risk factor sequence, and the output of the moderate-to-severe fatty liver disease judgment model is: the patient has moderate-to-severe fatty liver disease or the patient does not have moderate-to-severe fatty liver disease, and the output of the no-mild fatty liver disease judgment model is: the patient has mild fatty liver disease or the patient does not have fatty liver disease; The logic on which the moderate-to-severe interval is based is that the moderate-to-severe interval includes a diastolic blood pressure value interval and a high-density lipoprotein value interval, the maximum value and the minimum value of diastolic blood pressure and high-density lipoprotein of all moderate-to-severe fatty liver disease patients in the training sample set are collected, and a corresponding value interval is established, wherein the diastolic blood pressure value interval is specifically , and the high-density lipoprotein value interval is specifically , wherein and are the minimum value and the maximum value of the diastolic blood pressure value interval, respectively, and are the minimum value and the maximum value of the high-density lipoprotein value interval, respectively. The high-density lipoprotein and diastolic blood pressure values of the patient to be detected are collected, and it is judged whether they fall into the corresponding numerical interval, if any of the high-density lipoprotein and diastolic blood pressure values falls into the corresponding numerical interval, the moderate-to-severe fatty liver disease judgment model is called preferentially, otherwise the no-mild fatty liver disease judgment model is called preferentially. 8.A machine learning based liver disease multi-classification risk prediction system, characterized in that: The machine learning-based liver disease multi-classification risk prediction system is used to execute the machine learning-based liver disease multi-classification risk prediction method of any one of claims 1-7, comprising: The training sample collection module is configured to collect the diagnosis results of the degree of fatty liver disease and a plurality of biochemical indexes of a plurality of subjects to form a training sample set, perform single-factor regression analysis on each biochemical index, and screen out biochemical indexes that are significantly related to the fatty liver disease as potential risk factors; The multiple collinearity analysis module is configured to perform multiple collinearity test on the potential risk factors, obtain a variance inflation factor of each potential risk factor, and screen out factors that meet the collinearity requirement according to the variance inflation factor and a preset threshold as important risk factors; The optimal model selection module is configured to construct a plurality of machine learning classification models of different frameworks, train the models one by one to learn the mapping relationship between the important risk factors and the degree of fatty liver disease, and select a machine learning classification model with the optimal performance index as a benchmark model; The contribution degree analysis module is configured to obtain the contribution degrees of each important risk factor in the determination of the degree of fatty liver disease in the trained benchmark model, sort the important risk factors based on the contribution degrees, and determine classification significant factors according to the contribution value change range; The classification model calling module is configured to construct a no-mild fatty liver disease determination model and a moderate-to-severe fatty liver disease determination model based on the framework of the benchmark model, determine a moderate-to-severe interval based on the classification significant factor data of the moderate-to-severe fatty liver disease patients, and preferentially call different determination models to perform fatty liver disease determination based on whether the classification significant factors of the patient to be analyzed fall into the moderate-to-severe interval.
Citation Information
Patent Citations
Biomarker combination for predicting attack risk of metabolism-related fatty liver disease in adult period from children period, and screening method and prediction system thereof
CN118072956A
Method and system for analyzing and predicting risk of non-alcoholic fatty liver
CN115116615A
Multi-liver pathology assessment method and system based on machine learning
CN119905274A
Cardiovascular disease risk prediction method and system based on dietary multi-modal data and integrated learning
CN120544887A
Multi-classification auxiliary prediction method and system for metabolism-related fatty liver diseases, electronic equipment and storage medium
CN120744638A
Cited By
Acute shock early recognition and typing system based on multi-parameter fusion
CN121483630A
