Principal component analysis-based cardiovascular and metabolic disease risk prediction method and system
Patent Information
- Application Number
- CN202611405328.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]本申请实施例提供一种主成分分析的心血管及代谢疾病风险预测方法及系统,用以解决现有技术中预测精度差的问题
本发明通过收集来源于接受体检的个体的健康相关变量数据,包括人口统计信息、临床测量数据、生物标志物水平以及生活方式因素,确保了数据的全面性和代表性,为后续分析奠定了坚实的基础。结合递归特征消除算法和交叉验证算法,逐步移除重要性得分最低的原始特征,确定出预设数量个重要性得分满足预设得分的原始特征作为初步特征。这一过程不仅减少了冗余信息,提高了模型计算效率,还增强了模型的泛化能力,确保了初步特征集合的有效性和可靠性。基于初步特征集合中多个初步特征之间的相关性评估,识别并剔除存在多重共线性的特征,随后应用主成分分析降低特征维度,保留最大方差的初步特征组合。该步骤有效解决了特征冗余问题,简化了模型结构,同时保持了数据的主要信息,进一步提高了模型的稳定性和预测准确性。利用目标特征集合训练机器学习模型,并通过超参数调整优化模型性能。采用准确性、ROC曲线下面积(AUC-ROC)、C指数、F1分数、精确率和召回率等多指标验证模型的区分能力和预测准确性,确保模型在不同评价标准下均表现出色。此外,敏感性分析评估了目标特征对预测结果的影响程度,增强了模型的透明度和可信度。将新个体的健康相关变量输入经过处理后的机器学习模型,以输出其患心血管及代谢疾病的风险概率。该方法不仅具备高预测准确性,还提供了详细的预测报告,帮助医生和患者做出更明智的健康管理决策,促进了个性化医疗的发展。
Smart Images

Figure CN123017504A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and system for predicting cardiovascular and metabolic disease risks using principal component analysis. Background Technology
[0002] Cardiovascular and metabolic diseases (such as hypertension and diabetes) are among the leading causes of death and disability worldwide. Early prediction and prevention of these diseases are crucial for improving public health.
[0003] Currently, there are various methods for predicting the risk of cardiovascular and metabolic diseases using principal component analysis, mainly including traditional statistical models (such as logistic regression) and machine learning-based methods (such as random forests and support vector machines). These methods use feature training to predict an individual's risk of developing cardiovascular and metabolic diseases.
[0004] However, these existing methods fail to effectively handle the multicollinearity problem, which is a situation where multiple features are highly correlated, leading to increased model complexity and low computational efficiency. Summary of the Invention
[0005] This application provides a method and system for predicting the risk of cardiovascular and metabolic diseases using principal component analysis, in order to solve the problem of poor prediction accuracy in the prior art.
[0006] In a first aspect, embodiments of this application provide a method for predicting the risk of cardiovascular and metabolic diseases using principal component analysis, including: Obtain a dataset containing multiple health-related variables, the dataset being derived from individuals undergoing physical examinations, and each health-related variable containing multiple raw features; The importance of the original features is ranked using a random forest classifier. Then, a recursive feature elimination algorithm and a cross-validation algorithm are combined to gradually remove the original features with the lowest importance scores through multiple iterations. This process identifies a preset number of original features with the desired importance scores as initial features, thereby constructing an initial feature set. A correlation heatmap is constructed among multiple preliminary features in the preliminary feature set. The correlation among the multiple preliminary features is evaluated based on the correlation heatmap. Multiple preliminary features with multicollinearity are identified and removed. Principal component analysis is applied to reduce the dimensionality of the preliminary feature set, while retaining the preliminary feature combination with the largest variance to form the target feature set. Herein, multicollinearity refers to the situation where multiple target features are highly correlated with each other. A machine learning model is trained using the target feature set, and the model performance is optimized by adjusting hyperparameters. The discriminative ability and prediction accuracy of the machine learning model are verified by multiple indicators. Sensitivity analysis is performed on the machine learning model to evaluate the degree of influence of the target features in the target feature set on the prediction results, thus obtaining the processed machine learning model. The health-related variables of the new individual are input into the processed machine learning model to output the risk probability of the new individual having cardiovascular and metabolic diseases.
[0007] Optionally, constructing a correlation heatmap among multiple preliminary features in the preliminary feature set includes: Using a preset correlation calculation formula, calculate the linear correlation between each pair of preliminary features in the preliminary feature set and the correlation coefficient matrix of the preliminary feature set; A correlation heatmap is constructed based on the linear correlation between each pair of preliminary features and the correlation coefficient matrix to display the strength of the linear relationship between multiple preliminary features. Each cell in the correlation heatmap represents the correlation coefficient between two preliminary features, and each cell is set with different color intensities to reflect the strength of the linear relationship.
[0008] Optionally, the process of evaluating the correlation among the plurality of preliminary features based on the correlation heatmap, and identifying and eliminating multiple preliminary features exhibiting multicollinearity, includes: A dendrogram is generated based on the correlation coefficient matrix of the preliminary feature set using a hierarchical clustering analysis algorithm. Based on the correlation heatmap and tree diagram, the correlation between each pair of preliminary features is evaluated, and the combination of preliminary features with high correlation is determined by querying whether the correlation coefficient between each pair of preliminary features meets the preset coefficient. Calculate the variance inflation factor corresponding to each preliminary feature. The variance inflation factor is used to quantify the degree of linear correlation between the preliminary feature and the remaining preliminary features. By judging whether the variance inflation factor is greater than a preset threshold, preliminary features with multicollinearity can be identified. For the preliminary features of multicollinearity that have been identified, the severity of multicollinearity corresponding to the preliminary features is evaluated using the conditional index and variance proportional decomposition algorithm. By applying locally weighted scatter plot smoothing curves, the nonlinear relationship between each preliminary feature and the target variable is visualized. If the locally weighted scatter plot smoothing curve between any preliminary feature and the target variable shows a trend that meets preset conditions, then the preliminary feature is determined to be a key preliminary feature. The target variable refers to the individual's risk probability of developing cardiovascular and metabolic diseases. For each pair of preliminary feature combinations that are highly correlated, the preliminary features whose multicollinearity severity meets the preset threshold are removed, or key preliminary features are selected and retained, or the most representative preliminary features are retained, to obtain the filtered preliminary feature combinations.
[0009] Optionally, the application of principal component analysis reduces the dimensionality of the preliminary feature set while retaining the preliminary feature combination with the largest variance to form the target feature set, including: By using stepwise regression combined with cross-validation, the preliminary feature combination after screening is optimized to obtain the optimal preliminary feature combination that can explain most of the variance in the preliminary features. By applying the principal component analysis algorithm, the preliminary features in the optimal preliminary feature combination are transformed into new orthogonal features as principal components through linear transformation. The principal components are then sorted according to the magnitude of the variability of the explanatory preliminary features, ensuring that each principal component is arranged from largest to smallest according to the variability of the corresponding explanatory preliminary feature. Based on the cumulative explained variance ratio, select a pre-set number of principal components that can explain most of the variance in the initial features to reduce the dimensionality of the feature space and generate a dimensionality-reduced set of principal components, ensuring that the initial feature combination with the largest variance is retained. Using kernel functions, the preliminary features that have a nonlinear relationship with the target variable after dimensionality reduction are mapped to a high-dimensional space for dimensionality reduction. During the dimensionality reduction process, the principal components that can explain the maximum variance are selected to optimize the dimensionality-reduced principal component set. Sparse principal component analysis is introduced, and L1 regularization is used to reduce the number of principal components in the dimensionality-reduced principal component set. The processed principal component set is then used as the target feature set.
[0010] Optionally, the random forest classifier is used to rank the importance of the original features. Combined with a recursive feature elimination algorithm and a cross-validation algorithm, the original features with the lowest importance scores are gradually removed through multiple iterations to determine a predetermined number of original features whose importance scores meet the predetermined score as preliminary features, thereby constructing a preliminary feature set, including: The contribution of the original features to the target variable is evaluated using a random forest classifier to quantify the importance score of the original features. By combining recursive feature elimination and cross-validation algorithms, multiple iterations are initiated. In each iteration, the original features with the lowest importance scores are gradually removed. After each iteration, the random forest classifier is reconstructed based on the remaining original features, and the importance scores of the remaining original features are evaluated again. After multiple rounds of iteration, a predetermined number of original features whose importance scores meet the predetermined scores are identified as preliminary features to construct a preliminary feature set.
[0011] Optionally, verifying the discriminative power and predictive accuracy of the machine learning model through multiple metrics includes: The discriminative ability and predictive accuracy of the machine learning model were verified using metrics such as accuracy, area under the ROC curve, C-index, F1 score, precision, and recall.
[0012] Optionally, the process of training a machine learning model using the target feature set, optimizing model performance through hyperparameter tuning, verifying the discriminative ability and prediction accuracy of the machine learning model through multiple metrics, and performing sensitivity analysis on the machine learning model to evaluate the influence of target features within the target feature set on the prediction results, to obtain a processed machine learning model, includes: Based on the characteristics of the target feature set, select a suitable machine learning model for predicting the risk of cardiovascular and metabolic diseases, including random forest, support vector machine or gradient boosting tree; The target feature set is divided into a training set, a validation set, and a test set, and the target variables in each subset are kept consistent. Using the training set, the selected machine learning model is initially trained based on the target feature set; The hyperparameters of the machine learning model are systematically adjusted by using grid search or random search combined with cross-validation. Through multiple iterations, different combinations of hyperparameters are tried to find the optimal hyperparameter settings to maximize the model's performance. Using the test set, the discriminative ability and predictive accuracy of the machine learning model are evaluated based on multiple evaluation metrics, including accuracy, area under the ROC curve, C-index, F1 score, precision, and recall. Sensitivity analysis is performed on the machine learning model to evaluate the degree of influence of each target feature in the target feature set on the target variable, so as to gradually remove target features whose influence meets the set conditions. The optimal machine learning model, after hyperparameter tuning, performance verification, and sensitivity analysis, is saved to form the processed machine learning model.
[0013] Secondly, embodiments of this application provide a principal component analysis-based cardiovascular and metabolic disease risk prediction system, including: The acquisition module is used to acquire a dataset containing multiple health-related variables. The dataset is derived from individuals who have undergone physical examinations, and each health-related variable contains multiple raw features. The module is used to rank the importance of the original features using a random forest classifier, and combine a recursive feature elimination algorithm and a cross-validation algorithm to gradually remove the original features with the lowest importance scores through multiple iterations, so as to determine a preset number of original features with the preset importance scores as preliminary features, in order to construct a preliminary feature set. The generation module is used to construct a correlation heatmap among multiple preliminary features in the preliminary feature set, evaluate the correlation among the multiple preliminary features based on the correlation heatmap, identify and remove multiple preliminary features with multicollinearity, and apply principal component analysis to reduce the dimensionality of the preliminary feature set while retaining the preliminary feature combination with the largest variance to form the target feature set; wherein, multicollinearity refers to the situation where multiple target features are highly correlated with each other; The training module is used to train a machine learning model using the target feature set, optimize the model performance by adjusting hyperparameters, verify the discrimination ability and prediction accuracy of the machine learning model through multiple indicators, and perform sensitivity analysis on the machine learning model to evaluate the degree of influence of the target features in the target feature set on the prediction results, thereby obtaining the processed machine learning model. The processing module is used to input the health-related variables of the new individual into the processed machine learning model to output the risk probability of the new individual having cardiovascular and metabolic diseases.
[0014] Thirdly, embodiments of this application provide a computing device, including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are to be invoked and executed by the processing component to implement a principal component analysis method for predicting cardiovascular and metabolic disease risks as described in the first aspect above.
[0015] Fourthly, embodiments of this application provide a computer storage medium storing a computer program, which, when executed by a computer, implements a method for predicting cardiovascular and metabolic disease risks using principal component analysis as described in the first aspect.
[0016] In this embodiment, a dataset containing multiple health-related variables is obtained. This dataset originates from individuals undergoing physical examinations. The multiple health-related variables include at least demographic information, clinical measurement data, biomarker levels, and lifestyle factors, and each health-related variable contains multiple original features. A random forest classifier is used to rank the importance of the original features. A recursive feature elimination algorithm and a cross-validation algorithm are combined to iteratively remove the original features with the lowest importance scores through multiple iterations. A predetermined number of original features with importance scores meeting the predetermined score are identified as preliminary features to construct a preliminary feature set. The original features include systolic blood pressure, age, diastolic blood pressure, body mass index, triglycerides, low-density lipoprotein cholesterol, total cholesterol, fasting blood glucose, creatinine, and blood urea nitrogen. A correlation heatmap is constructed among the multiple preliminary features in the preliminary feature set. Based on the correlation heatmap, the correlation between the multiple preliminary features is evaluated. Multiple preliminary features exhibiting multicollinearity are identified and removed. Principal component analysis is applied to reduce the dimensionality of the preliminary feature set while retaining the preliminary feature combination with the largest variance to form a target feature set. Multicollinearity refers to a situation where multiple target features are highly correlated with each other. A machine learning model is trained using the target feature set, and its performance is optimized through hyperparameter tuning. The model's discriminative ability and predictive accuracy are verified using metrics such as accuracy, area under the ROC curve, C-index, F1 score, precision, and recall. Sensitivity analysis is performed on the machine learning model to assess the influence of target features within the target feature set on the prediction results, resulting in a processed machine learning model. The health-related variables of the new individual are then input into the processed machine learning model to output the risk probability of the new individual developing cardiovascular and metabolic diseases.
[0017] The technical solution of this application has the following beneficial effects: This invention collects health-related variable data from individuals undergoing physical examinations, including demographic information, clinical measurement data, biomarker levels, and lifestyle factors, ensuring the comprehensiveness and representativeness of the data and laying a solid foundation for subsequent analysis. Combining recursive feature elimination and cross-validation algorithms, the original features with the lowest importance scores are progressively removed, identifying a predetermined number of original features whose importance scores meet the preset criteria as preliminary features. This process not only reduces redundant information and improves model computational efficiency but also enhances the model's generalization ability, ensuring the effectiveness and reliability of the preliminary feature set. Based on the correlation assessment among multiple preliminary features in the preliminary feature set, features exhibiting multicollinearity are identified and eliminated. Subsequently, principal component analysis is applied to reduce feature dimensionality, retaining the preliminary feature combination with the largest variance. This step effectively solves the feature redundancy problem, simplifies the model structure, and preserves the main information of the data, further improving the model's stability and predictive accuracy. The machine learning model is trained using the target feature set, and its performance is optimized through hyperparameter tuning. The model's discriminative power and predictive accuracy were validated using multiple metrics, including accuracy, area under the ROC curve (AUC-ROC), C-index, F1 score, precision, and recall, ensuring excellent performance across different evaluation criteria. Furthermore, sensitivity analysis assessed the impact of target features on prediction results, enhancing the model's transparency and credibility. Health-related variables of new individuals were input into the processed machine learning model to output their risk probabilities of developing cardiovascular and metabolic diseases. This method not only boasts high predictive accuracy but also provides detailed prediction reports, helping doctors and patients make more informed health management decisions and promoting the development of personalized medicine.
[0018] In summary, this invention significantly improves the accuracy and reliability of cardiovascular and metabolic disease risk prediction through systematic feature selection, dimensionality reduction, and model optimization.
[0019] These or other aspects of this application will become more apparent from the description of the following embodiments. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart of a principal component analysis method for predicting cardiovascular and metabolic disease risk is shown, as provided in this application. Figure 2This invention provides a schematic diagram of the structure of a principal component analysis-based cardiovascular and metabolic disease risk prediction system. Figure 3 A schematic diagram of the structure of a computing device provided in this application is shown. Detailed Implementation
[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0023] In some of the processes described in the specification, claims, and accompanying drawings of this application, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.
[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0025] Figure 1 A flowchart of a method for predicting cardiovascular and metabolic disease risk using principal component analysis is provided in this application embodiment, as shown below. Figure 1 As shown, the method includes: 101. Obtain a dataset containing multiple health-related variables.
[0026] In this step, the dataset is derived from individuals undergoing physical examinations, and the multiple health-related variables include at least demographic information, clinical measurement data, biomarker levels, and lifestyle factors, with each health-related variable containing multiple raw features.
[0027] Step 101 involves collecting a dataset containing multiple health-related variables from individuals undergoing physical examinations. These health-related variables include at least demographic information (such as age and sex), clinical measurements (such as blood pressure and body mass index), biomarker levels (such as triglycerides and cholesterol), and lifestyle factors (such as smoking status and exercise frequency). Each health-related variable contains multiple raw features; for example, systolic and diastolic blood pressure are used as two different dimensions of blood pressure. This data is used for subsequent risk prediction analysis, ensuring the comprehensiveness and representativeness of the data.
[0028] First, obtain a large number of individual medical examination reports from medical institutions or health checkup centers to ensure the data is broad and representative. Then, preprocess the data, including missing value imputation, outlier handling, and standardization transformation, to guarantee data quality. Finally, organize the processed data into structured tabular formats for easy use with subsequent analytical tools.
[0029] In one practical application, a large hospital partnered with a health management company to regularly collect health checkup data from thousands of patients. This data encompassed everything from basic demographic information to detailed biomarker levels and was managed through an electronic health record system. After rigorous cleaning and preprocessing, the data was imported into a specially designed cardiovascular and metabolic disease risk prediction platform, providing a solid data foundation for subsequent steps.
[0030] 102. Rank the importance of the original features using a random forest classifier. Combine the recursive feature elimination algorithm and the cross-validation algorithm to gradually remove the original features with the lowest importance scores through multiple iterations. Determine a preset number of original features whose importance scores meet the preset score as preliminary features to construct a preliminary feature set.
[0031] In this step, the original characteristics include systolic blood pressure, age, diastolic blood pressure, body mass index, triglycerides, low-density lipoprotein cholesterol, total cholesterol, fasting blood glucose, creatinine, and blood urea nitrogen.
[0032] Step 102 uses a random forest classifier to rank the importance of the original features. Combining the recursive feature elimination (RFE) algorithm and cross-validation, the original features with the lowest importance scores are gradually removed. Finally, a predetermined number of original features whose importance scores meet the predetermined criteria are identified as preliminary features. These preliminary features include, but are not limited to, key indicators such as systolic blood pressure, age, and diastolic blood pressure. These features are used to construct a preliminary feature set, thereby simplifying model input and improving computational efficiency.
[0033] By training a random forest classifier, an importance score is calculated for each original feature. Then, using RFE and cross-validation, the features with the lowest importance scores are iteratively removed until a predetermined number of important features remain. This process not only reduces redundant information but also enhances the model's generalization ability.
[0034] Building upon the above embodiments, researchers implemented a random forest classifier and the RFE algorithm using the Scikit-learn library in Python. Through multiple iterative optimizations of the initially selected features, 20 of the most important features were ultimately identified as a preliminary feature set. These features not only cover major physiological indicators but also include some lifestyle factors, providing effective input for subsequent feature selection and dimensionality reduction.
[0035] 103. Construct a correlation heatmap among multiple preliminary features in the preliminary feature set, evaluate the correlation among the multiple preliminary features based on the correlation heatmap, identify and remove multiple preliminary features with multicollinearity, and apply principal component analysis to reduce the dimensionality of the preliminary feature set while retaining the preliminary feature combination with the largest variance to form the target feature set.
[0036] Multicollinearity refers to the situation where multiple target features are highly correlated with each other.
[0037] Step 103 constructs a correlation heatmap among multiple preliminary features based on the initial feature set, assesses the correlation between these features, and identifies and removes features exhibiting multicollinearity. Subsequently, Principal Component Analysis (PCA) is applied to reduce the feature dimensionality, retaining the initial feature combination with the largest variance to form the target feature set. Multicollinearity refers to the situation where multiple features are highly correlated with each other, which leads to increased model complexity and decreased stability.
[0038] A correlation heatmap is generated to visually display the correlation coefficients between various features. Based on the heatmap results, highly correlated features are identified and removed. Next, the PCA algorithm is applied to transform the remaining features into new orthogonal features (i.e., principal components) through linear transformation. These are then sorted according to their explanatory power of the data variability, and the top few principal components are selected to reduce the dimensionality of the feature space.
[0039] Based on the aforementioned preliminary feature set, researchers used the Seaborn library in Python to generate correlation heatmaps and manually or automatically identified several highly correlated feature pairs. Through PCA dimensionality reduction, the top 10 principal components that could explain more than 95% of the variance were selected, forming the final target feature set. This process significantly reduced the number of features while preserving the main information of the data, improving the stability and interpretability of the model.
[0040] 104. Train a machine learning model using the target feature set, optimize the model performance by adjusting hyperparameters, verify the discrimination ability and prediction accuracy of the machine learning model through multiple indicators, perform sensitivity analysis on the machine learning model to evaluate the degree of influence of the target features in the target feature set on the prediction results, and obtain the processed machine learning model.
[0041] Step 104 trains a machine learning model using the target feature set, optimizes model performance through hyperparameter tuning, and verifies the model's discriminative ability and predictive accuracy using multiple metrics such as accuracy, area under the ROC curve (AUC-ROC), C-index, F1 score, precision, and recall. Furthermore, sensitivity analysis is performed to assess the impact of target features on prediction results, ensuring the model's transparency and reliability.
[0042] Choose a suitable machine learning model (such as random forest, support vector machine, etc.) and train it using the target feature set. Use grid search or random search combined with cross-validation to adjust hyperparameters and find the optimal configuration. Evaluate the model performance comprehensively using multiple evaluation metrics to ensure its robustness in different scenarios. Finally, perform sensitivity analysis to understand the impact of each feature on the model output.
[0043] Based on the target feature set, researchers selected a random forest model and used GridSearchCV for hyperparameter tuning. Through K-fold cross-validation, they verified the model's performance on different subsets to ensure its generalization ability. Ultimately, the model achieved a high AUC-ROC value (above 0.85) on the test set, and sensitivity analysis confirmed the importance of key features. This model has been deployed on a cardiovascular and metabolic disease risk prediction platform for physicians to use.
[0044] 105. Input the health-related variables of the new individual into the processed machine learning model to output the risk probability of the new individual having cardiovascular and metabolic diseases.
[0045] Step 105 inputs the new individual's health-related variables into the processed machine learning model to output the individual's risk probability of developing cardiovascular and metabolic diseases. This probability value can help doctors and patients make more informed health management decisions and provide personalized prevention recommendations.
[0046] When a new individual's health data is input into the system, the system automatically invokes a pre-trained machine learning model to calculate the risk probability based on the feature values in the target feature set. The output not only includes the risk probability but may also include a detailed prediction report explaining which features have a greater impact on the individual's risk assessment.
[0047] In practical applications, when a patient comes for a physical examination, their latest health data is entered into the system. The system automatically calls a previously trained random forest model to calculate the patient's risk probability of developing cardiovascular and metabolic diseases within the next five years. Doctors can then use this probability value, combined with other clinical information, to develop personalized health management plans for the patient, such as dietary adjustments, exercise recommendations, or medication.
[0048] This invention establishes a complete risk prediction process for cardiovascular and metabolic diseases through a series of steps, from data acquisition, feature selection, and dimensionality reduction to model training and prediction output. Through multiple rounds of feature optimization and model tuning, it not only significantly improves the accuracy and stability of predictions but also enhances the interpretability and transparency of the model. The resulting machine learning model can be rapidly applied in real-world clinical settings, assisting physicians in making timely and informed health management decisions and promoting the development of personalized medicine.
[0049] To address the multicollinearity problem and further improve the effectiveness of feature selection, in some embodiments, the process of constructing a correlation heatmap among multiple preliminary features in the preliminary feature set in step 103 includes: Using a preset correlation calculation formula, the linear correlation between each pair of preliminary features in the preliminary feature set and the correlation coefficient matrix of the preliminary feature set are calculated. Based on the linear correlation between each pair of preliminary features and the correlation coefficient matrix, a correlation heatmap is constructed to display the strength of the linear relationship between multiple preliminary features. Each cell in the correlation heatmap represents the correlation coefficient between two preliminary features, and each cell is set with different color intensities to reflect the strength of the linear relationship.
[0050] In this embodiment, the correlation heatmap not only includes the linear correlation between each pair of initial features in the initial feature set, but also displays the overall correlation coefficient matrix among these features. This visualization tool helps researchers and data scientists quickly identify which features are highly correlated (i.e., multicollinearity), thereby determining whether certain features need to be removed to simplify the model structure and avoid overfitting caused by redundant information.
[0051] In this embodiment, the linear correlation between each pair of preliminary features in the initial feature set is first calculated using a pre-defined correlation calculation formula, such as the Pearson correlation coefficient or the Spearman rank correlation coefficient. Then, a correlation coefficient matrix is constructed based on these correlation values. Each row and column of this matrix represents a preliminary feature, and each cell contains the correlation coefficient of the corresponding feature pair. Finally, a correlation heatmap is generated based on this correlation coefficient matrix using visualization tools (such as Seaborn, Matplotlib, etc.), where different color intensities represent different linear relationship strengths. Darker colors indicate stronger correlations, and vice versa. Furthermore, specific numerical values can be labeled on the heatmap to more accurately understand the relationships between features.
[0052] In a specific example, a cardiovascular disease research center collected a large amount of patients' physical examination data, including preliminary features such as systolic blood pressure, diastolic blood pressure, body mass index (BMI), triglycerides, low-density lipoprotein cholesterol (LDL-C), total cholesterol, and fasting blood glucose. To ensure the stability and interpretability of the model, the researchers decided to construct a correlation heatmap to assess the relationships between these features. They used the Pandas library in Python to calculate the Pearson correlation coefficient between each pair of preliminary features and generated a correlation coefficient matrix. Subsequently, they used the Seaborn library to plot the correlation heatmap, where each cell was color-coded to represent the strength of the correlation: red for positive correlation, blue for negative correlation, and darker colors for stronger correlation. By observing the heatmap, the researchers found a high positive correlation between systolic and diastolic blood pressure, and therefore decided to retain only one of them as the final feature. This process not only simplified the model but also improved the accuracy and stability of the predictions.
[0053] To address the multicollinearity problem and further improve the effectiveness of feature selection and model stability, in some embodiments, step 103, which involves evaluating the correlation between the multiple preliminary features based on the correlation heatmap and identifying and eliminating multiple preliminary features exhibiting multicollinearity, includes: Using a hierarchical clustering analysis algorithm, a dendrogram is generated based on the correlation coefficient matrix of the preliminary feature set. Based on the correlation heatmap and dendrogram, the correlation between each pair of preliminary features is evaluated, and combinations of preliminary features with high correlation are identified by querying whether the correlation coefficient between each pair of preliminary features meets a preset coefficient. The variance inflation factor corresponding to each preliminary feature is calculated; this factor quantifies the linear correlation between the preliminary feature and the remaining preliminary features. By determining whether the variance inflation factor is greater than a preset threshold, preliminary features exhibiting multicollinearity are identified. For preliminary features identified as exhibiting multicollinearity, a conditional index and variance ratio are used. The algorithm decomposes the preliminary features to assess the severity of multicollinearity. A locally weighted scatter plot is applied to smooth the curves, visualizing the nonlinear relationship between each preliminary feature and the target variable. If any preliminary feature exhibits a trend that satisfies a preset condition, the preliminary feature is identified as a key preliminary feature. The target variable refers to the individual's risk probability of developing cardiovascular and metabolic diseases. For each pair of highly correlated preliminary features, those with multicollinearity severity meeting a preset threshold are removed, or key preliminary features are retained, or the most representative preliminary feature is retained, resulting in a filtered set of preliminary features.
[0054] In this embodiment, the hierarchical clustering analysis algorithm, combined with correlation heatmaps and dendrograms, can visually display the hierarchical structure and correlation strength among preliminary features, helping researchers identify highly correlated feature combinations. The variance inflation factor (VIF) provides a quantitative tool to assess the degree of linear correlation between each preliminary feature and other features. Conditional index and variance proportionalization algorithms further refine the assessment of multicollinearity, ensuring processing accuracy. The locally weighted scatter plot smoothing curve (LOWESS) is used to visualize the non-linear relationship between preliminary features and the target variable, helping to identify key preliminary features. These methods work together to ensure the stability and interpretability of the final feature combinations.
[0055] In this embodiment, a hierarchical clustering analysis algorithm is first used to generate a dendrogram based on the correlation coefficient matrix of the preliminary feature set, visually displaying the hierarchical structure between features. Then, combined with a correlation heatmap, the correlation between each pair of preliminary features is evaluated. By setting a preset coefficient (e.g., a correlation coefficient greater than 0.8), combinations of preliminary features with high correlation are identified. Next, the variance inflation factor (VIF) of each preliminary feature is calculated. If the VIF is greater than a preset threshold (e.g., 10), the feature is considered to have severe multicollinearity. Subsequently, conditional index and variance proportional decomposition algorithms are used to assess the severity of multicollinearity, ensuring the comprehensiveness and accuracy of the processing. Finally, the LOWESS algorithm is applied to plot the nonlinear relationship between each preliminary feature and the target variable (i.e., the individual's risk probability of cardiovascular and metabolic diseases). If a feature shows a clear trend with the target variable, it is identified as a key preliminary feature. For each pair of highly correlated preliminary feature combinations, based on the severity of multicollinearity and the importance of the key features, the most suitable features are selected for elimination or retention, ultimately forming the filtered preliminary feature combinations.
[0056] In a specific example, a cardiovascular disease research center collected a large amount of patients' physical examination data, including preliminary features such as systolic blood pressure, diastolic blood pressure, body mass index (BMI), triglycerides, low-density lipoprotein cholesterol (LDL-C), total cholesterol, and fasting blood glucose. To ensure the stability and interpretability of the model, the researchers decided to use the methods described above to assess and address multicollinearity. They first used the SciPy library in Python to perform hierarchical clustering analysis, generating a dendrogram of the correlation coefficient matrix to show the hierarchical structure between features. Next, combined with the correlation heatmap, they found a high positive correlation between systolic and diastolic blood pressure. Then, they calculated the VIF for each feature, finding that the VIFs for both systolic and diastolic blood pressure were greater than 10, indicating severe multicollinearity. This was further confirmed using the conditional index and variance proportional decomposition algorithm. Next, they applied the LOWESS algorithm to plot the nonlinear relationship between each preliminary feature and the target variable (i.e., the risk probability of developing cardiovascular disease), finding a significant trend between diastolic blood pressure and the target variable, thus identifying it as a key preliminary feature. Finally, the researchers decided to remove systolic blood pressure and retain diastolic blood pressure as the final feature. This process not only simplifies the model, but also improves the accuracy and stability of predictions, and enhances the transparency and interpretability of the model.
[0057] To address the computational complexity and model overfitting issues caused by high-dimensional data, and to further improve model performance and interpretability, in some embodiments, step 103 involves applying principal component analysis to reduce the dimensionality of the preliminary feature set while retaining the preliminary feature combination with the largest variance to form the target feature set. Using a stepwise regression combined with cross-validation algorithm, the pre-selected feature combinations are optimized to obtain the optimal pre-selective feature combination that can explain most of the variance in the pre-selective features. Principal component analysis (PCA) is applied to transform the pre-selective features in the optimal combination into new orthogonal features as principal components through linear transformation. These principal components are then sorted according to the magnitude of their explanatory variance of the pre-selective features, ensuring that each principal component is arranged from largest to smallest explanatory variance of its corresponding pre-selective feature. Based on the cumulative explanatory variance ratio, a predetermined number of principal components that can explain most of the variance in the pre-selective features are selected to reduce the dimensionality of the feature space, generating a dimensionality-reduced set of principal components, ensuring that the pre-selective feature combination with the largest variance is retained. Using a kernel function, the pre-selective features with a non-linear relationship to the target variable in the dimensionality-reduced set of principal components are mapped to a high-dimensional space for dimensionality reduction. During dimensionality reduction, the principal components that can explain the largest variance are selected to optimize the dimensionality-reduced set of principal components. Sparse principal component analysis is introduced, and L1 regularization is used to reduce the number of principal components in the dimensionality-reduced set of principal components. The processed set of principal components is then used as the target feature set.
[0058] In this embodiment, stepwise regression is a feature selection method that constructs an optimal predictive model by adding or removing features in a series of steps. Cross-validation is a technique used to evaluate different model configurations. By splitting the dataset into multiple subsets and using them alternately as test sets, it can effectively avoid overfitting and provide more reliable model performance estimates. Here, we use stepwise regression combined with cross-validation to determine which initial features are most helpful in explaining the changes in the target variable, thus forming the optimal initial feature combination.
[0059] In this embodiment, stepwise regression combined with cross-validation is first used to optimize the initial feature combination, ensuring that the selected features can explain most of the variance in the original data. Then, Principal Component Analysis (PCA), a linear dimensionality reduction technique, is applied to transform the original features into a new set of orthogonal features, i.e., principal components. Each principal component is a linear combination of the original features, and these principal components are ordered according to the magnitude of the data variability they can explain. Next, a predetermined number of principal components are selected based on the proportion of cumulative explained variance to achieve dimensionality reduction while ensuring that as much information as possible is preserved. To handle potential nonlinear relationships, a kernel function is introduced, allowing features to be mapped in a high-dimensional space, thus linearizing nonlinear relationships. Finally, sparse principal component analysis (sPCA) is employed, using L1 regularization to reduce the number of principal components, making the final target feature set more compact while preserving important information.
[0060] In a specific example, a medical research team is developing a model to predict cardiovascular disease risk. They collected a large amount of patient physical examination data, including preliminary features such as systolic blood pressure, diastolic blood pressure, body mass index (BMI), triglycerides, low-density lipoprotein cholesterol (LDL-C), total cholesterol, and fasting blood glucose. To ensure the model's efficiency and accuracy, the researchers decided to optimize the feature set using the methods described above. They first used stepwise regression combined with cross-validation to identify the features that best explained changes in cardiovascular disease risk. For example, BMI, triglycerides, and fasting blood glucose were found to be among the most important factors. Next, PCA was applied to transform these features into new orthogonal features (principal components). By selecting the proportion of cumulative explained variance, only the top two principal components that could explain more than 85% of the variance were retained. Suspecting a non-linear relationship between some features and the target variable, the researchers also used kernel PCA to map these features to a higher-dimensional space. Finally, by introducing sparse PCA, the number of principal components was reduced, simplifying the model structure while maintaining the model's predictive power and interpretability. After this series of processes, an optimized set of target features is finally formed, which not only improves the performance of the model, but also makes the results easier to understand and interpret.
[0061] To address the feature redundancy problem and further improve the model's generalization ability and prediction performance, in some embodiments, step 102 utilizes a random forest classifier to rank the importance of the original features. Combining a recursive feature elimination algorithm and a cross-validation algorithm, the original features with the lowest importance scores are gradually removed through multiple iterations. This process identifies a predetermined number of original features whose importance scores meet a predetermined threshold as initial features, thus constructing a preliminary feature set. The contribution of the original features to the target variable is evaluated using a random forest classifier to quantify the importance score of the original features. Multiple iterations are initiated by combining a recursive feature elimination algorithm and a cross-validation algorithm. In each iteration, the original features with the lowest importance score are gradually removed. After each iteration, the random forest classifier is reconstructed based on the remaining original features, and the importance scores of the remaining original features are evaluated again. After multiple iterations, a predetermined number of original features with importance scores that meet the predetermined score are identified as preliminary features to construct a preliminary feature set.
[0062] In this embodiment, the random forest classifier is an ensemble learning method consisting of multiple decision trees, each built based on a different subset of training samples and features. By calculating the average importance score of each original feature across all decision trees, the contribution of these features to the target variable (e.g., cardiovascular disease risk) can be quantified. The feature importance score reflects the magnitude of a feature's role in the prediction process; a higher score indicates a more important feature.
[0063] In this embodiment, the specific process is as follows: First, a random forest classifier is used to evaluate the importance scores of all original features. Then, multiple iterations are initiated by combining the recursive feature elimination algorithm (RFE) and K-Fold CrossValidation. In each iteration, one or more features with the lowest importance scores are removed, ensuring that the random forest classifier is rebuilt based on the latest feature set in each iteration, and the importance scores of the remaining features are re-evaluated. In this way, the most important features are gradually selected, while overfitting is avoided, ensuring the generalization ability of the model.
[0064] In this embodiment, the ultimate goal is to determine a preset number of original features whose importance scores satisfy the preset scores as preliminary features. The preset scores can be set according to actual needs, for example, selecting the top 20 most important features. The preliminary feature set constructed in this way not only reduces the number of features and improves computational efficiency, but also enhances the interpretability and stability of the model.
[0065] In a specific example, a medical research team is developing a model to predict cardiovascular disease risk. They have collected a large amount of patients' physical examination data, including multiple raw features such as systolic blood pressure, age, diastolic blood pressure, body mass index (BMI), triglycerides, low-density lipoprotein cholesterol (LDL-C), total cholesterol, fasting blood glucose, creatinine, and blood urea nitrogen. To ensure the model's effectiveness and interpretability, the researchers decided to use the aforementioned method to optimize feature selection.
[0066] Researchers first implemented a random forest classifier using the Scikit-learn library in Python and then evaluated the importance score of each original feature using this model. The results showed that features such as age, systolic blood pressure, BMI, and triglycerides had high importance scores, while some features, such as blood urea nitrogen, had lower scores.
[0067] Next, the researchers combined the Recursive Feature Elimination (RFE) algorithm with 5-fold cross-validation to initiate multiple iterations. In each iteration, the feature with the lowest importance score was removed, and the random forest classifier was rebuilt based on the remaining features. For example, in the first iteration, blood urea nitrogen was removed because it had the lowest score. Subsequently, the model was retrained, and the importance scores of the remaining features were evaluated.
[0068] After multiple iterations, researchers identified 20 features with the highest importance scores as initial features. These features cover major physiological indicators and lifestyle factors, providing effective input for subsequent analysis. Furthermore, sensitivity analysis confirmed the importance of key features, ensuring the model's reliability and interpretability.
[0069] The final preliminary feature set not only simplified the model structure and improved computational efficiency, but also enhanced the model's generalization ability and interpretability. Researchers used these features in subsequent principal component analysis and other dimensionality reduction techniques to further optimize model performance. This optimized feature set was applied to a clinical decision support system to help doctors more accurately assess patients' cardiovascular disease risk.
[0070] By introducing a random forest classifier combined with a recursive feature elimination algorithm and cross-validation, this invention provides a systematic feature selection method that effectively solves the feature redundancy problem and improves the model's generalization ability and predictive performance. This method not only reduces unnecessary computational resource consumption but also enhances the model's transparency and credibility, making research results easier to apply in practical healthcare and promoting the development of personalized medicine.
[0071] To address the model performance optimization issue and further improve the accuracy and reliability of predictions, in some embodiments, step 104 involves training a machine learning model using the target feature set, optimizing model performance through hyperparameter tuning, verifying the machine learning model's discriminative ability and prediction accuracy using metrics such as accuracy, area under the ROC curve, C-index, F1 score, precision, and recall, and performing sensitivity analysis on the machine learning model to assess the impact of target features within the target feature set on the prediction results. The process of obtaining the processed machine learning model includes: Based on the characteristics of the target feature set, a suitable machine learning model for predicting cardiovascular and metabolic disease risks is selected, including random forest, support vector machine, or gradient boosting tree. The target feature set is divided into a training set, a validation set, and a test set, ensuring that the target variables in each subset remain consistent. Using the training set, the selected machine learning model is initially trained based on the target feature set. The hyperparameters of the machine learning model are systematically adjusted using grid search or random search combined with cross-validation. Through multiple iterations, different combinations of hyperparameters are tried to find the optimal hyperparameter settings to maximize model performance. Using the test set, the machine learning model's discriminative ability and predictive accuracy are evaluated based on multiple evaluation metrics, including accuracy, area under the ROC curve, C-index, F1 score, precision, and recall. Sensitivity analysis is performed on the machine learning model to assess the degree of influence of each target feature in the target feature set on the target variable, gradually removing target features whose influence meets the set conditions. The optimal machine learning model after hyperparameter adjustment, performance validation, and sensitivity analysis is saved to form the processed machine learning model.
[0072] In this embodiment, selecting a suitable machine learning model is crucial for building an effective prediction system. Principal component analysis for cardiovascular and metabolic disease risk prediction requires handling complex nonlinear relationships and high-dimensional data; therefore, several common algorithms were chosen: Random Forest, Support Vector Machine (SVM), and Gradient Boosting Decision Tree (GBDT). Each model has its advantages; for example, Random Forest excels at handling high-dimensional data and is less prone to overfitting, SVM performs exceptionally well with small sample sizes, while GBDT possesses powerful nonlinear modeling capabilities.
[0073] In this embodiment, the specific process is as follows: First, based on the target feature set, the dataset is divided into a training set, a validation set, and a test set. Typically, 70% of the data is used as the training set, 15% as the validation set, and the remaining 15% as the test set. To ensure consistent distribution of the target variables across subsets, stratified sampling can be used to ensure that the prevalence of cardiovascular and metabolic diseases in each subset is the same as in the original dataset. This helps prevent bias caused by uneven data distribution and improves the reliability of model evaluation.
[0074] In the initial training phase, the selected machine learning model is trained using the training set. This process aims to allow the model to learn patterns and regularities in the data. For ensemble models such as Random Forest or GBDT, initial hyperparameter configurations, such as the number of trees and maximum depth, can also be set to ensure the model has a good starting point for subsequent optimization.
[0075] Next, a combination of grid search or random search and K-Fold cross-validation is used to systematically tune the model's hyperparameters. Grid search iterates through all possible hyperparameter combinations, while random search randomly samples some combinations. Through multiple iterations, different hyperparameter configurations are tried to find the optimal settings that maximize model performance. This approach not only avoids overfitting but also improves the model's generalization ability.
[0076] After hyperparameter tuning, the model's performance is evaluated using an independent test set. Evaluation metrics include, but are not limited to, accuracy, area under the ROC curve (AUC-ROC), concordance index (C-index), F1 score, precision, and recall. These metrics reflect the model's discriminative ability and predictive accuracy from different perspectives, providing a comprehensive performance evaluation. In particular, AUC-ROC and the C-index effectively measure the model's classification ability at different thresholds.
[0077] Sensitivity analysis is used to assess the impact of each target feature on the prediction results. By progressively removing features that have a smaller impact on the model output, the model structure can be simplified and interpretability improved. For example, an importance score can be calculated for each feature, or methods such as Shapley scores can be used to quantify feature contributions. If the influence of a feature is below a preset threshold, it is considered for removal. This not only reduces redundant information but also enhances the stability and transparency of the model.
[0078] Finally, after a series of optimizations and validations, the best-performing machine learning model was selected. This model not only has high predictive accuracy but also good interpretability and stability, enabling it to reliably predict the risk probability of cardiovascular and metabolic diseases in new individuals in practical applications.
[0079] In a specific example, a medical research team is developing a model to predict cardiovascular disease risk. They have collected a large amount of patient physical examination data, including multiple target features such as systolic blood pressure, age, diastolic blood pressure, body mass index (BMI), triglycerides, low-density lipoprotein cholesterol (LDL-C), total cholesterol, and fasting blood glucose. To ensure the model's effectiveness and interpretability, the researchers decided to use the methods described above to optimize its performance.
[0080] Researchers first selected random forest as the initial model based on the characteristics of the target feature set. Random forest is widely used in the medical field due to its advantages in processing high-dimensional data.
[0081] Next, they used stratified sampling to divide the dataset into a training set (70%), a validation set (15%), and a test set (15%), ensuring that the prevalence of cardiovascular disease in each subset remained consistent, thereby improving the reliability of the assessment.
[0082] The random forest model was initially trained using the training set, with initial hyperparameter configurations set, such as 100 trees and a maximum depth of 10.
[0083] Then, a grid search combined with 5-fold cross-validation was used to systematically adjust the model's hyperparameters. After multiple iterations, the optimal combination of hyperparameters was found, significantly improving the model's performance.
[0084] Using an independent test set, the model's discriminative ability and predictive accuracy were evaluated based on multiple metrics, including accuracy, AUC-ROC, C-index, F1 score, precision, and recall. The results show that the AUC-ROC reached 0.88, indicating that the model has good classification ability.
[0085] Sensitivity analysis of the model revealed that certain features, such as creatinine, had a relatively small impact on the prediction results. By progressively removing these features, the model structure was simplified while maintaining predictive performance.
[0086] Ultimately, the researchers preserved the optimized and validated random forest model, forming a processed machine learning model. This model not only boasts high predictive accuracy but also provides detailed prediction reports, helping doctors and patients make more informed health management decisions.
[0087] By introducing various optimization techniques and evaluation methods, this invention provides a systematic machine learning model training and optimization process, significantly improving the accuracy and reliability of cardiovascular and metabolic disease risk prediction. This approach not only reduces unnecessary computational resource consumption but also enhances the transparency and credibility of the model, making research findings easier to apply to practical healthcare and promoting the development of personalized medicine.
[0088] Figure 2 This application provides a schematic diagram of the structure of a principal component analysis-based cardiovascular and metabolic disease risk prediction device (or system) according to an embodiment of the present application. Figure 2 As shown, the device includes: The acquisition module 21 is used to acquire a dataset containing multiple health-related variables, the dataset being derived from individuals undergoing physical examinations, and each health-related variable containing multiple raw features; Module 22 is used to rank the importance of the original features using a random forest classifier, and combine a recursive feature elimination algorithm and a cross-validation algorithm to gradually remove the original features with the lowest importance scores through multiple iterations, so as to determine a preset number of original features with the preset importance scores as preliminary features, in order to construct a preliminary feature set. The generation module 23 is used to construct a correlation heatmap among multiple preliminary features in the preliminary feature set, evaluate the correlation among the multiple preliminary features based on the correlation heatmap, identify and remove multiple preliminary features with multicollinearity, and apply principal component analysis to reduce the dimensionality of the preliminary feature set while retaining the preliminary feature combination with the largest variance to form the target feature set; wherein, multicollinearity refers to the situation where multiple target features are highly correlated with each other; Training module 24 is used to train a machine learning model using the target feature set, optimize model performance by adjusting hyperparameters, verify the discrimination ability and prediction accuracy of the machine learning model by multiple indicators, perform sensitivity analysis on the machine learning model to evaluate the degree of influence of target features in the target feature set on the prediction results, and obtain the processed machine learning model. The processing module 25 is used to input the health-related variables of the new individual into the processed machine learning model to output the risk probability of the new individual having cardiovascular and metabolic diseases.
[0089] Figure 2 The principal component analysis-based cardiovascular and metabolic disease risk prediction device can perform... Figure 1 The implementation principle and technical effects of the principal component analysis method for predicting cardiovascular and metabolic disease risk in the illustrated embodiments will not be repeated here. The specific operation methods of each module and unit in the principal component analysis-based cardiovascular and metabolic disease risk prediction device in the above embodiments have been described in detail in the embodiments related to this method, and will not be elaborated upon here.
[0090] In one possible design, Figure 2 The principal component analysis-based cardiovascular and metabolic disease risk prediction device of the illustrated embodiment can be implemented as a computing device, such as... Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32; The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are invoked and executed by the processing component 32.
[0091] The processing component 32 is used for the above Figure 1 The embodiment describes a principal component analysis method for predicting cardiovascular and metabolic disease risks.
[0092] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above-described method. Alternatively, the processing component may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.
[0093] Storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0094] Of course, computing devices may also include other components, such as input / output interfaces, display components, communication components, etc.
[0095] Input / output interfaces provide interfaces between processing components and peripheral interface modules, which can be output devices, input devices, etc.
[0096] The communication components are configured to facilitate wired or wireless communication between computing devices and other devices.
[0097] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform. In this case, the computing device can refer to a cloud server, and the aforementioned processing components, storage components, etc., can be basic server resources rented or purchased from the cloud computing platform.
[0098] This application also provides a computer storage medium storing a computer program, which, when executed by a computer, can perform the above-described functions. Figure 1 The embodiment shown illustrates a method for predicting cardiovascular and metabolic disease risk using principal component analysis.
[0099] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0100] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for predicting the risk of cardiovascular and metabolic diseases using principal component analysis, characterized in that, include: Obtain a dataset containing multiple health-related variables, the dataset being derived from individuals undergoing physical examinations, and each health-related variable containing multiple raw features; The importance of the original features is ranked using a random forest classifier. Then, a recursive feature elimination algorithm and a cross-validation algorithm are combined to gradually remove the original features with the lowest importance scores through multiple iterations. This process identifies a preset number of original features with the desired importance scores as initial features, thereby constructing an initial feature set. A correlation heatmap is constructed among multiple preliminary features in the preliminary feature set. The correlation among the multiple preliminary features is evaluated based on the correlation heatmap. Multiple preliminary features with multicollinearity are identified and removed. Principal component analysis is applied to reduce the dimensionality of the preliminary feature set, while retaining the preliminary feature combination with the largest variance to form the target feature set. Herein, multicollinearity refers to the situation where multiple target features are highly correlated with each other. A machine learning model is trained using the target feature set, and the model performance is optimized by adjusting hyperparameters. The discriminative ability and prediction accuracy of the machine learning model are verified by multiple indicators. Sensitivity analysis is performed on the machine learning model to evaluate the degree of influence of the target features in the target feature set on the prediction results, thus obtaining the processed machine learning model. The health-related variables of the new individual are input into the processed machine learning model to output the risk probability of the new individual having cardiovascular and metabolic diseases.
2. The method according to claim 1, characterized in that, The construction of the correlation heatmap among multiple preliminary features in the preliminary feature set includes: Using a preset correlation calculation formula, calculate the linear correlation between each pair of preliminary features in the preliminary feature set and the correlation coefficient matrix of the preliminary feature set; A correlation heatmap is constructed based on the linear correlation between each pair of preliminary features and the correlation coefficient matrix to display the strength of the linear relationship between multiple preliminary features. Each cell in the correlation heatmap represents the correlation coefficient between two preliminary features, and each cell is set with different color intensities to reflect the strength of the linear relationship.
3. The method according to claim 2, characterized in that, The process of evaluating the correlation among the multiple preliminary features based on the correlation heatmap, and identifying and eliminating multiple preliminary features exhibiting multicollinearity, includes: A dendrogram is generated based on the correlation coefficient matrix of the preliminary feature set using a hierarchical clustering analysis algorithm. Based on the correlation heatmap and tree diagram, the correlation between each pair of preliminary features is evaluated, and the combination of preliminary features with high correlation is determined by querying whether the correlation coefficient between each pair of preliminary features meets the preset coefficient. Calculate the variance inflation factor corresponding to each preliminary feature. The variance inflation factor is used to quantify the degree of linear correlation between the preliminary feature and the remaining preliminary features. By judging whether the variance inflation factor is greater than a preset threshold, preliminary features with multicollinearity can be identified. For the preliminary features of multicollinearity that have been identified, the severity of multicollinearity corresponding to the preliminary features is evaluated using the conditional index and variance proportional decomposition algorithm. By applying locally weighted scatter plot smoothing curves, the nonlinear relationship between each preliminary feature and the target variable is visualized. If the locally weighted scatter plot smoothing curve between any preliminary feature and the target variable shows a trend that meets preset conditions, then the preliminary feature is determined to be a key preliminary feature. The target variable refers to the individual's risk probability of developing cardiovascular and metabolic diseases. For each pair of preliminary feature combinations that are highly correlated, the preliminary features whose multicollinearity severity meets the preset threshold are removed, or key preliminary features are selected and retained, or the most representative preliminary features are retained, to obtain the filtered preliminary feature combinations.
4. The method according to claim 3, characterized in that, The application of principal component analysis reduces the dimensionality of the preliminary feature set while retaining the preliminary feature combination with the largest variance to form the target feature set, including: By using stepwise regression combined with cross-validation, the preliminary feature combination after screening is optimized to obtain the optimal preliminary feature combination that can explain most of the variance in the preliminary features. By applying the principal component analysis algorithm, the preliminary features in the optimal preliminary feature combination are transformed into new orthogonal features as principal components through linear transformation. The principal components are then sorted according to the magnitude of the variability of the explanatory preliminary features, ensuring that each principal component is arranged from largest to smallest according to the variability of the corresponding explanatory preliminary feature. Based on the cumulative explained variance ratio, select a pre-set number of principal components that can explain most of the variance in the initial features to reduce the dimensionality of the feature space and generate a dimensionality-reduced set of principal components, ensuring that the initial feature combination with the largest variance is retained. Using kernel functions, the preliminary features that have a nonlinear relationship with the target variable after dimensionality reduction are mapped to a high-dimensional space for dimensionality reduction. During the dimensionality reduction process, the principal components that can explain the maximum variance are selected to optimize the dimensionality-reduced principal component set. Sparse principal component analysis is introduced, and L1 regularization is used to reduce the number of principal components in the dimensionality-reduced principal component set. The processed principal component set is then used as the target feature set.
5. The method according to claim 3, characterized in that, The method involves ranking the importance of the original features using a random forest classifier, combining a recursive feature elimination algorithm and a cross-validation algorithm, and iteratively removing the original features with the lowest importance scores through multiple iterations. This process identifies a predetermined number of original features whose importance scores meet a predetermined threshold as preliminary features, thereby constructing a preliminary feature set, including: The contribution of the original features to the target variable is evaluated using a random forest classifier to quantify the importance score of the original features. By combining recursive feature elimination and cross-validation algorithms, multiple iterations are initiated. In each iteration, the original features with the lowest importance scores are gradually removed. After each iteration, the random forest classifier is reconstructed based on the remaining original features, and the importance scores of the remaining original features are evaluated again. After multiple rounds of iteration, a predetermined number of original features whose importance scores meet the predetermined scores are identified as preliminary features to construct a preliminary feature set.
6. The method according to claim 1, characterized in that, The verification of the machine learning model's discriminative ability and predictive accuracy through multiple metrics includes: The discriminative ability and predictive accuracy of the machine learning model were verified using metrics such as accuracy, area under the ROC curve, C-index, F1 score, precision, and recall.
7. The method according to claim 6, characterized in that, The process of training a machine learning model using the target feature set, optimizing model performance through hyperparameter tuning, verifying the machine learning model's discriminative ability and prediction accuracy through multiple metrics, and performing sensitivity analysis on the machine learning model to evaluate the influence of target features within the target feature set on the prediction results, to obtain a processed machine learning model, includes: Based on the characteristics of the target feature set, select a suitable machine learning model for predicting the risk of cardiovascular and metabolic diseases, including random forest, support vector machine or gradient boosting tree; The target feature set is divided into a training set, a validation set, and a test set, and the target variables in each subset are kept consistent. Using the training set, the selected machine learning model is initially trained based on the target feature set; The hyperparameters of the machine learning model are systematically adjusted by using grid search or random search combined with cross-validation. Through multiple iterations, different combinations of hyperparameters are tried to find the optimal hyperparameter settings to maximize the model's performance. Using the test set, the discriminative ability and predictive accuracy of the machine learning model are evaluated based on multiple evaluation metrics, including accuracy, area under the ROC curve, C-index, F1 score, precision, and recall. Sensitivity analysis is performed on the machine learning model to evaluate the degree of influence of each target feature in the target feature set on the target variable, so as to gradually remove target features whose influence meets the set conditions. The optimal machine learning model, after hyperparameter tuning, performance verification, and sensitivity analysis, is saved to form the processed machine learning model.
8. A principal component analysis-based system for predicting cardiovascular and metabolic disease risks, characterized in that, include: The acquisition module is used to acquire a dataset containing multiple health-related variables. The dataset is derived from individuals who have undergone physical examinations, and each health-related variable contains multiple raw features. The module is used to rank the importance of the original features using a random forest classifier, and combine a recursive feature elimination algorithm and a cross-validation algorithm to gradually remove the original features with the lowest importance scores through multiple iterations, so as to determine a preset number of original features with the preset importance scores as preliminary features, in order to construct a preliminary feature set. The generation module is used to construct a correlation heatmap among multiple preliminary features in the preliminary feature set, evaluate the correlation among the multiple preliminary features based on the correlation heatmap, identify and remove multiple preliminary features with multicollinearity, and apply principal component analysis to reduce the dimensionality of the preliminary feature set while retaining the preliminary feature combination with the largest variance to form the target feature set; wherein, multicollinearity refers to the situation where multiple target features are highly correlated with each other; The training module is used to train a machine learning model using the target feature set, optimize the model performance by adjusting hyperparameters, verify the discrimination ability and prediction accuracy of the machine learning model through multiple indicators, and perform sensitivity analysis on the machine learning model to evaluate the degree of influence of the target features in the target feature set on the prediction results, thereby obtaining the processed machine learning model. The processing module is used to input the health-related variables of the new individual into the processed machine learning model to output the risk probability of the new individual having cardiovascular and metabolic diseases.
9. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement the cardiovascular and metabolic disease risk prediction method based on principal component analysis as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The device contains a computer program that, when executed by a computer, implements the method for predicting cardiovascular and metabolic disease risks using principal component analysis as described in any one of claims 1 to 7.
