Application and comparison of type 2 diabetes with comorbid hypertension classification prediction models based on random forest and XGBoost algorithms
MA Yong
KONG Danli
YE Xiangyang
DING Yuanlin
Abstract:Objective The objective of this study is to construct a predictive model through analyzing the related factors of type 2 diabetes mellitus combined with hypertension,aiming to achieve early detection and treatment.Methods A total of 475 patients with type 2 diabetes mellitus combined with hypertension from the Endocrinology Department of Guangdong Medical University Affiliated Hospital and Affiliated Second Hospital from March to December 2022 were selected as the case group,while 505 healthy individuals undergoing physical examinations during the same period were chosen as the control group.The feature variables selected by Least Absolute Shrinkage and Selection Operator(LASSO)regression were used as inputs for Random Forest(RF),Extreme Gradient Boosting(XGBoost),and Logistic Regression models.The best predictive model was obtained through Bayesian optimization and iterative training with cross-validation.Finally,feature importance ranking and Shapley additive explanation(SHAP)were utilized for interpretation analysis.Results The feature selection results indicated that glucose in urine(GLU)(OR=1.189,95%CI=1.170~1.208,P<0.05),family history of diabetes(OR=1.341,95%CI=1.273~1.411,P<0.05),age(OR=1.006,95%CI=1.004~1.009,P<0.05),body mass index(BMI)(OR=1.017,95%CI=1.010~1.023,P<0.05),heart rate(HR)(OR=1.004,95%CI=1.003~1.006,P<0.05),education level(OR=0.954,95%CI=0.934~0.975,P<0.05),and place of residence(OR=0.958,95%CI=0.931~0.985,P<0.05)were the main feature variables.Experimental results of the algorithms showed that after parameter optimization,RF and XGBoost models outperformed the Logistic Regression model,with XGBoost accuracy at 92.85%,slightly higher than RF accuracy at 92.34%.The results of feature importance show that the influenCIng factors of type 2 diabetes combined with hypertension are ranked in the following order of importance:GLU,family history of diabetes,education level,residential area,age,BMI,and heart rate(HR).Among these,GLU,family history of diabetes,age,BMI,and HR are risk factors,while education level and residential area serve as protective factors.Conclusion The XGBoost-based predictive model for type 2 diabetes mellitus combined with hypertension exhibited better performance.By enhanCIng the model's interpretability using the SHAP model,it could identify the disease's risk factors,providing reference for the prevention of type 2 diabetes mellitus combined with hypertension.
Keywords:diabetes with hypertensionrandom forestXGBoostclassification predictionSHAP model
Publication Date:2024-10-28
Online Publishing Date:2025-08-15(First online date of this platform, not the publication date of the document)
Pages:12( 523-534 )
Journal of Guangdong Medical College

Journal of Guangdong Medical College

ISSN:2096-3610
Year, Vol.(Issue):2024,42(5)