An influenza child severe illness risk prediction model and a construction method thereof
Patent Information
- Application Number
- CN202510851967.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2026-10-13
AI Technical Summary
然而,面对高维、复杂的医疗数据,如何有效筛选关键特征、处理非线性关系、避免过拟合以及提高模型的解释性和泛化能力,成为该领域研究的关键挑战
[0031]1.本发明通过结合数据预处理、相关性分析、Lasso回归以及多因素逻辑回归分析,实现了从初步探索到精细筛选的多阶段特征处理流程,有效识别出对预测重症风险最具影响力的特征,提高了模型的准确性和解释性。
Smart Images

Figure CN122907320A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine learning and artificial intelligence, and in particular to a model for predicting the risk of severe influenza in children and its construction method. Background Technology
[0002] In the medical field, especially in the clinical management of pediatric influenza, accurately predicting the risk of a child's condition progressing to severe illness is crucial for timely intervention, optimizing the allocation of medical resources, and improving patient prognosis. Traditional risk assessments rely heavily on physicians' experience and limited clinical indicators, lacking systematicity and objectivity, making it difficult to achieve early and accurate warnings.
[0003] With the development of medical informatization, electronic medical record systems have accumulated a large amount of patient data, making it possible to use machine learning technology to uncover potential risk factors and build predictive models. However, facing high-dimensional and complex medical data, how to effectively screen key features, handle nonlinear relationships, avoid overfitting, and improve the interpretability and generalization ability of the models has become a key challenge in this field of research. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a prediction model for the risk of severe influenza in children and its construction method.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A model for predicting the risk of severe influenza in children, which includes the following steps:
[0007] S1: Obtain raw data;
[0008] S2: Data preprocessing;
[0009] S3: Preliminary data analysis based on correlation heatmap;
[0010] S4: Feature processing;
[0011] S5: Feature selection based on lasso regression;
[0012] S6: Feature selection for multi-factor logistic regression analysis, dataset partitioning (transfer to S6A1), visualization (transfer to S6B1);
[0013] S6A1: After feature selection, data analysis is performed based on the correlation heatmap;
[0014] S6A2: Normalization process;
[0015] S6A3: Dataset partitioning;
[0016] S6B1: Optimal parameters are searched using XGBoost, Logistic, LightGBM, RandomForest, and SVM grids;
[0017] S6B2: Model Evaluation;
[0018] S6B3: shap visualization.
[0019] Preferably, in S5, based on Lasso regression, by introducing L1 regularization, the small weights in the coefficient vector are changed to 0, thereby achieving feature selection and model sparsity.
[0020] Preferably, in step S6, when performing feature selection through multivariate logistic regression analysis, if the sample size is less than a set value, univariate analysis is first performed to examine the relationship between all independent and dependent variables, and meaningless variables are filtered out before multivariate analysis is performed.
[0021] Preferably, in step S6, when performing feature selection through multi-factor logistic regression analysis, the univariate analysis methods include: t-test and chi-square test.
[0022] Preferred: In the prediction model, when the relationship between variables is non-linear and the sample data of all variables do not conform to a normal distribution, the Spearman correlation coefficient is used to measure the correlation between two variables. The Spearman correlation coefficient calculates the monotonic correlation between two statistical variables. If the two variables are not repeated and are completely monotonically correlated, then the Spearman correlation sparsity is positive or negative 1.
[0023] Preferably, in the prediction model, when using the Spearman correlation coefficient to measure the correlation between two variables, for a sample of size n, the n original data points are converted into ordinal data, and the correlation coefficient ρ is:
[0024]
[0025] Preferably, in the prediction model, when using the Spearman correlation coefficient to measure the correlation between two variables, the linkage between the variables is not considered; only the rank difference ρ between the observed variables is calculated. Then, the correlation coefficient ρ is:
[0026]
[0027] Preferably, the prediction model uses the sklearn library to implement XGBoost, Logistic, LightGBM, RandomForest, and SVM classification models. By training and optimizing these models, the final result prediction is performed.
[0028] Preferably, the prediction model uses the GridSearchCV library for hyperparameter optimization search; through the automated parameter tuning of GridSearchCV, the optimal combination of hyperparameters for each model is found.
[0029] Preferably, after the prediction model is trained, the performance of the model is evaluated using evaluation metrics, including F1 and AUC.
[0030] The beneficial effects of this invention are as follows:
[0031] 1. This invention combines data preprocessing, correlation analysis, Lasso regression, and multi-factor logistic regression analysis to achieve a multi-stage feature processing flow from initial exploration to fine screening, effectively identifying the features most influential on predicting the risk of severe illness, and improving the accuracy and interpretability of the model.
[0032] 2. The introduction of Lasso regression in this invention not only simplifies the model structure, but also automatically handles the multicollinearity problem among independent variables through its L1 regularization property, thereby enhancing the stability and generalization ability of the model.
[0033] 3. This invention uses Spearman correlation coefficient instead of traditional Person correlation coefficient, which is more suitable for the nonlinear relationships and nonnormal distribution characteristics commonly found in medical data, making the correlation analysis more accurate and comprehensive.
[0034] 4. This invention optimizes hyperparameters using GridSearchCV to ensure optimal performance of various classification models such as XGBoost, Logistic Regression, LightGBM, RandomForest, and SVM. At the same time, it comprehensively evaluates the model's prediction performance using multi-dimensional evaluation metrics such as F1 score and AUC, ensuring the model's practicality and reliability.
[0035] 5. This invention uses SHA-PAX visualization to not only provide prediction results but also reveal the magnitude and direction of each feature's contribution to the prediction, enhancing the model's transparency and clinical application value. This helps doctors understand the basis of the model's decision-making and promotes doctor-patient communication. Attached Figure Description
[0036] Figure 1 This is a flowchart of a prediction model for the risk of severe influenza in children and its construction method proposed in this invention;
[0037] Figure 2 This is a diagram of the lasso coefficient path of the present invention;
[0038] Figure 3 This is a graph illustrating the multifactor regression results of the present invention;
[0039] Figure 4 The following is a diagram illustrating the evaluation indicators of the various models in this invention;
[0040] Figure 5 This is a schematic diagram of the ROC curve training set of the present invention;
[0041] Figure 6 This is a schematic diagram of the ROC curve test set of the present invention;
[0042] Figure 7 This is a schematic diagram of the logistic regression confusion matrix of the present invention;
[0043] Figure 8 This is a schematic diagram of the random forest confusion matrix of the present invention;
[0044] Figure 9 This is a schematic diagram of the SVM confusion matrix of the present invention;
[0045] Figure 10 This is a schematic diagram of the XGBoost confusion matrix of the present invention;
[0046] Figure 11 This is a schematic diagram of the LightGBM confusion matrix of the present invention;
[0047] Figure 12 This is a schematic diagram of the calibration curve of the present invention;
[0048] Figure 13 This is a schematic diagram of the decision curve of the present invention;
[0049] Figure 14 This is a visual representation of the features of the shap of the present invention;
[0050] Figure 15 This is a visualization of the feature influence of the shap in this invention. Detailed Implementation
[0051] The technical solution of the present invention will be further described in detail below with reference to specific embodiments.
[0052] Example 1:
[0053] A model for predicting the risk of severe influenza in children, which includes the following steps:
[0054] S1: Obtain raw data;
[0055] S2: Data preprocessing;
[0056] S3: Preliminary data analysis based on correlation heatmap;
[0057] S4: Feature processing;
[0058] S5: Feature selection based on lasso regression;
[0059] S6: Feature selection for multi-factor logistic regression analysis, dataset partitioning (transfer to S6A1), visualization (transfer to S6B1);
[0060] S6A1: After feature selection, data analysis is performed based on the correlation heatmap;
[0061] S6A2: Normalization process;
[0062] S6A3: Dataset partitioning;
[0063] S6B1: Optimal parameters are searched using XGBoost, Logistic, LightGBM, RandomForest, and SVM grids;
[0064] S6B2: Model Evaluation;
[0065] S6B3: shap visualization.
[0066] In S5, based on Lasso regression, by introducing L1 regularization (i.e., Lasso penalty term), the small weights in the coefficient vector can be reduced to 0, thereby achieving feature selection and model sparsity.
[0067] Lasso regression is used to address the following issues:
[0068] Feature selection: Lasso regression can be used to select the most important features. It achieves sparsity by adding a penalty term (L1 regularization) to the objective function, causing the weights of many features in the coefficient vector to become 0. By selecting the features corresponding to non-zero coefficients, features with the greatest predictive power for the target variable can be identified, thereby simplifying the model and improving its generalization ability.
[0069] Multicollinearity: In medical research, there are often multiple correlated independent variables. Lasso regression can reduce the impact of multicollinearity on regression results by reducing the coefficients of correlated independent variables to zero through the correlation between them.
[0070] Predictive modeling: Lasso regression can be used to build models that predict a patient's disease risk or disease progression. In medical research, there may be a large number of predictive indicators and variables; Lasso regression can be used to select the most relevant indicators and variables to build efficient predictive models.
[0071] Explaining the model: Lasso regression can be used to explain the influence of variables in the model on the target variable. The magnitude and sign of the coefficients reveal the degree of positive or negative influence of a specific feature on the target variable.
[0072] like Figure 2 As shown, lines of different colors represent different variables, and each curve represents the trajectory of the coefficient of each independent variable.
[0073] In S6, when selecting features using multivariate logistic regression analysis, attention must be paid to the rationality of variable selection and model fit during model construction. Typically, with a limited sample size, univariate analysis (such as t-tests or chi-square tests) is performed first to examine the relationship between all independent and dependent variables, filtering out potentially meaningless variables before proceeding with multivariate analysis. This makes the results more reliable. Even with a sufficiently large sample size, the relationships between each independent variable must be clarified for effective analysis. The results of multivariate regression are as follows: Figure 3 As shown.
[0074] In this embodiment, a correlation heatmap is used to visualize the correlation between various features in the data and the target "severe illness". The traditional Person correlation coefficient is used to calculate the linear similarity between corresponding variables by performing cosine angle calculation on the vector space of the transformed variables. Its main scope of application is within the linear relationship space.
[0075] In this invention, Pearman correlation analysis is not applicable when the relationships between variables are non-linear and the sample data of all variables do not conform to a normal distribution. Therefore, Spearman correlation coefficient is used to measure the correlation between two variables. Spearman correlation coefficient does not impose strict requirements on data conditions. Its core idea is to classify the vectors transformed from variables into ranks and approximate the ranks. Therefore, Spearman can calculate the correlation regardless of the specific attributes of the sample variables.
[0076] The Spearman correlation coefficient calculates the monotonic correlation between two statistical variables. If the two variables are not repeated and are completely monotonically correlated, then the Spearman correlation coefficient is positive or negative 1.
[0077] For a sample of size n, the n original data points are converted into ordinal data, and the correlation coefficient ρ is:
[0078]
[0079] Due to the nature of the Spearman correlation coefficient, whether there is a link between variables is irrelevant in real-world scenarios. Therefore, we only need to calculate the rank difference between the observed variables for each ρ, and then ρ is:
[0080]
[0081] Heatmaps were plotted using Spearman correlation coefficient.
[0082] In this embodiment, the sklearn library is used to implement XGBoost, Logistic, LightGBM, RandomForest, and SVM classification models. By training and optimizing these models, predictions are made with relatively accurate results.
[0083] Furthermore, to further improve model performance, the GridSearchCV library was used for hyperparameter optimization. GridSearchCV's automated hyperparameter tuning efficiently finds the optimal hyperparameter combination for each model, ensuring the model performs as well as possible on different datasets. After model training, the model's performance was evaluated using various metrics (such as F1, AUC, etc.), ultimately yielding the following results: Figure 4 The evaluation indicators for each model are shown.
[0084] Model renderings, such as Figure 5 , Figure 6 .
[0085] Confusion matrix as follows Figure 7-11 As shown.
[0086] Calibration curve as follows Figure 12 As shown.
[0087] Decision curves Figure 13 As shown.
[0088] Analysis shows that the LightGBM model performs best.
[0089] Specifically, when visualizing a SHA-S, the details are as follows: Figure 14 , Figure 15 As shown, Figure 14 To showcase key features, Figure 15 In this context, different color features have varying degrees of importance, with higher grayscale values indicating greater positive influence.
[0090] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A predictive model for the risk of severe influenza in children, characterized in that, The processing method includes the following steps: S1: Obtain raw data; S2: Data preprocessing; S3: Preliminary data analysis based on correlation heatmap; S4: Feature processing; S5: Feature selection based on lasso regression; S6: Feature selection for multi-factor logistic regression analysis, dataset partitioning (transfer to S6A1), visualization (transfer to S6B1); S6A1: After feature selection, data analysis is performed based on the correlation heatmap; S6A2: Normalization process; S6A3: Dataset partitioning; S6B1: Optimal parameters are searched using XGBoost, Logistic, LightGBM, RandomForest, and SVM grids; S6B2: Model Evaluation; S6B3: shap visualization.
2. The influenza pediatric severe illness risk prediction model according to claim 1, characterized in that, In S5, based on Lasso regression, L1 regularization is introduced to change the small weights in the coefficient vector to 0, thereby achieving feature selection and model sparsity.
3. The influenza pediatric severe illness risk prediction model according to claim 1, characterized in that, In S6, when selecting features through multivariate logistic regression analysis, if the sample size is less than the set value, univariate analysis is first performed to examine the relationship between all independent and dependent variables, and meaningless variables are screened out before multivariate analysis is performed.
4. The influenza pediatric severe illness risk prediction model according to claim 3, characterized in that, In S6, when performing feature selection through multi-factor logistic regression analysis, the methods for univariate analysis include: t-test and chi-square test.
5. The influenza pediatric severe illness risk prediction model according to claim 1, characterized in that, The prediction model uses the Spearman correlation coefficient to measure the correlation between two variables when the relationship between the variables is non-linear and the sample data of all variables do not conform to a normal distribution. The Spearman correlation coefficient calculates the monotonic correlation between two statistical variables. If the two variables are not repeated and are completely monotonically correlated, then the Spearman correlation is sparse and the value is positive or negative 1.
6. The influenza pediatric severe illness risk prediction model according to claim 5, characterized in that, In the prediction model, when using the Spearman correlation coefficient to measure the correlation between two variables, for a sample of size n, the n original data points are converted into ordinal data, and the correlation coefficient ρ is:
7. The influenza pediatric severe illness risk prediction model according to claim 6, characterized in that, The prediction model, when using the Spearman correlation coefficient to measure the correlation between two variables, does not consider whether the variables are linked or not, but only calculates the rank difference ρ between the observed variables. Therefore, the correlation coefficient ρ is:
8. The influenza pediatric severe illness risk prediction model according to claim 1, characterized in that, The prediction model uses the sklearn library to implement XGBoost, Logistic, LightGBM, RandomForest, and SVM classification models. By training and optimizing these models, the final result prediction is performed.
9. A prediction model for the risk of severe influenza in children according to claim 8, characterized in that, The prediction model uses the GridSearchCV library for hyperparameter optimization search; through GridSearchCV's automated hyperparameter tuning, the optimal combination of hyperparameters for each model is found.
10. A prediction model for the risk of severe influenza in children according to claim 9, characterized in that, After training, the performance of the prediction model was evaluated using evaluation metrics, including F1 and AUC.