A Machine Learning Framework for Multi-Disease Health Risk Prediction Using Electronic Health Records
Abstract
Non-communicable diseases now play a major role as the leading global health threat, causing more than 74% of deaths around the world. The present study offers a complete analysis using machine learning techniques based on structured EHR and lab data to anticipate the development of three main types of diseases, including diabetes, cardiovascular diseases, and hypertension. Clinical, demographic, lifestyle, and medical history variables were all subjected to an exploratory analysis. Using stratified five-fold cross-validation, a number of models, including Support Vector Machine (RBF kernel, $\gamma=\mathbf{0. 0 1}, \mathbf{C}=\mathbf{1 0. 0})$, Random Forest, Logistic Regression, and XGBoost, were tested and verified in accordance with grid search principles. The parameters of StandardScaler were adjusted only to the training folds to avoid any data leak. The ensemble techniques performed better than the statistical techniques employed in the analysis; XGBoost demonstrated the highest results in the detection of diabetes mellitus (AUC-ROC=0.891, Accuracy=0.857), cardiovascular disease (AUC-ROC=0.873), and hypertension (AUC-ROC=0.865). The use of SHAP-based explainable AI ensured clinical understanding. External validation using independent multi-hospital samples (2,185 patients) proved the results of the analysis (AUC-ROC=0.855-0.884). The calibration analysis showed the proper level of predictions (Brier scores: 0.082–0.095; calibration slopes: 0.91–0.94). The proposed framework suggests a feasible approach for managing the work in the hospital and planning personalize treatment.