Comparative evaluation of ensemble machine learning models for predicting antibacterial resistance from electronic health records
摘要
Antibacterial resistance is a growing global health challenge that complicates infection management and increases morbidity and mortality. Conventional culture-based susceptibility testing requires 48–72 h, creating a critical period during which empirical antibiotic therapy may be suboptimal. Machine learning models using electronic health record (EHR) data offer the potential for earlier prediction of antibacterial resistance and improved clinical decision-making. In this study, we developed and evaluated machine learning models to predict antibacterial resistance using an EHR-derived dataset comprising 1,213,641 organism–antibiotic susceptibility test observations from 997 patients. The dataset integrated demographic characteristics, laboratory measurements, vital signs, comorbidities, and prior antibiotic exposure. A leakage-aware evaluation framework was employed using patient-level data splitting, GroupKFold cross-validation, hyperparameter optimization, probability calibration, and patient-level bootstrap confidence intervals. Model performance was assessed using ROC-AUC, PR-AUC, Brier score, F1-score, precision, and recall, alongside statistical comparisons and decision curve analysis. LightGBM achieved the best overall performance (ROC-AUC 0.851, PR-AUC 0.682), substantially outperforming the logistic regression baseline (ROC-AUC 0.626, PR-AUC 0.358). Ensemble models demonstrated strong discrimination and reliable calibration. Ablation analysis confirmed the dominant contribution of microbiological variables, while additional clinical features provided complementary predictive value. Decision curve analysis further indicated improved clinical utility of ensemble models across relevant decision thresholds. Overall, these findings demonstrate that ensemble machine learning models can effectively leverage heterogeneous EHR data to predict antibacterial resistance with strong discrimination, calibration, and potential clinical utility. External validation and prospective evaluation are required before deployment in real-world clinical settings.