Abstract
Background: Diuretics are widely used antihypertensive agents, but their propensity to impair glucose metabolism poses a challenge for personalized treatment. Predicting which patients will develop hyperglycemia is critical for precision nutrition and pharmacotherapy.Methods: We conducted a retrospective cohort study using electronic health records from 2,845 hypertensive patients treated with thiazide or loop diuretics between 2010 and 2022. Clinical, demographic, and laboratory features were extracted. Five machine learning models (logistic regression, random forest, gradient boosting, support vector machine, and neural network) were developed to predict a ≥10% increase in fasting glucose after 12 weeks of therapy. The dataset was split 70/30 for training and testing. Model performance was evaluated via AUC-ROC, sensitivity, specificity, and calibration.Results: The gradient boosting model achieved the highest AUC-ROC of 0.87 (95% CI: 0.84–0.90) on the test set. Important predictors included baseline glucose, body mass index, age, serum potassium, and concomitant beta-blocker use. Calibration plots indicated good agreement between predicted and observed risks. Feature importance analysis identified baseline glucose as the dominant predictor, followed by diuretic type (thiazide vs. loop).Conclusions: Machine learning models can accurately predict personalized glucose responses to diuretics, enabling risk stratification and guiding treatment selection. These findings support the integration of predictive algorithms into clinical decision support for hypertensive patients.