An explainable machine learning approach to predicting carbapenem resistance in Klebsiella pneumoniae with imbalanced data and resistance-ratio validation
Sep 2026· Frontiers in Cellular and Infection Microbiology· Vol 16· 0 citations· 57 references
Medicine
TL;DR
An interpretable machine-learning framework for predicting carbapenem-resistant versus carbapenem-susceptible K. pneumoniae effectively addresses class imbalance in predicting carbapenem resistance in K. pneumoniae and may support early identification of patients at risk of harboring carbapenem-resistant isolates, thereby informing infection control and antimicrobial stewardship.
Abstract
Background Carbapenem-resistant Klebsiella pneumoniae (CRKP) is a major global health threat. Predicting resistance from electronic medical records (EMRs) may support infection control and antimicrobial stewardship, but class imbalance can impair detection of resistant isolates. This study developed an interpretable machine-learning framework for predicting carbapenem-resistant versus carbapenem-susceptible K. pneumoniae. Methods We retrospectively analyzed 5,794 records collected from 2014 to 2024, including 999 carbapenem-resistant and 4,795 carbapenem-susceptible isolates. The prediction anchor was culture-specimen collection (T0), and all predictors were restricted to information available at or before T0. Seven algorithms and 18 sampling strategies were evaluated using patient-grouped five-fold cross-validation with fold-specific preprocessing. The selected resampling pipeline was compared with Platt-calibrated XGBoost using sensitivity-targeted, F2-maximizing, and cost-sensitive thresholds. Feature-restriction analyses, multiplicity-adjusted comparisons, ICU subgroup analysis, reconstructed prevalence scenarios, calibration assessment, and same-center temporal validation were also performed. Results XGBoost and LightGBM showed comparable discrimination after multiplicity adjustment. ENN–BLSMOTE–XGBoost increased sensitivity and reduced the very-major-error rate (VME) at the default threshold, but slightly reduced ranking discrimination and increased false-positive alerts. Sensitivity-targeted threshold optimization of calibrated XGBoost produced an operating point close to that of the resampled model, indicating that much of the sensitivity gain could be achieved without changing the training distribution. After all duration-based predictors were excluded, ENN–BLSMOTE–XGBoost retained an ROC AUC of 0.940 and a PR AUC of 0.833. In the 2025 temporal cohort, the calibrated ENN–BLSMOTE–XGBoost model achieved an ROC AUC of 0.889, a PR AUC of 0.684, a sensitivity of 0.749, and a VME of 0.251; Platt scaling reduced its Brier score from 0.121 to 0.108. SHAP analysis identified ICU admission, vascular system disease, days of indwelling urinary catheterization, days of carbapenem use, and days of endotracheal intubation as the five highest-attribution predictors. A web calculator was developed to provide calibrated probability estimates referenced to the 17.24% resistance prevalence of the development cohort. Conclusion The proposed model effectively addresses class imbalance in predicting carbapenem resistance in K. pneumoniae and may support early identification of patients at risk of harboring carbapenem-resistant isolates, thereby informing infection control and antimicrobial stewardship.
Objective This study aimed to develop and validate an interpretable machine learning model for early prediction of carbapenem-resistant Klebsiella pneumoniae (CRKP) infection using routine peripheral blood indicators, providing a rapid risk assessment tool before antimicrobial susceptibility results. Methods A retrospe...
Ming-Da Wu, Na Wei, Zheng Zhang et al.· Infection and Drug Resistanc...· 0 citations
Bloodstream infections (BSIs) remain a major cause of morbidity and mortality in patients undergoing chemotherapy. The rising incidence of multidrug-resistant organisms (MDROs) further challenges the adequacy of empirical antimicrobial therapy. Therefore, this study aimed to identify features associated with different...
Adhemar Villani, M. Freire, L. A. de Pádua Covas Lage et al.· Supportive Care in Cancer· 0 citations
Background. Antimicrobial resistance is one of the biggest threats to modern medicine, yet our understanding of its genetic basis remains incomplete. Current surveillance strategies rely on established resistance genes catalogued in curated databases; however, bacterial populations continuously evolve resistance mechan...
T. Nguyen, Hsuan-Chia Yang, Yu-Wei Wu· Microbial Genomics· 0 citations
Machine learning models exhibit outstanding diagnostic accuracy in predicting AMR in Neisseria gonorrhoeae, highlighting their potential integration into surveillance and clinical decision-support systems.
David Chinaecherem Innocent, Rejoicing Chijindum Innocent, Increase Praise Innocent· Frontiers in Public Health· 0 citations
Multidrug-resistant (MDR) Klebsiella pneumoniae is a leading cause of healthcare-associated mortality in Africa, yet genomic prediction of resistance has relied almost exclusively on resistance-gene detection validated under random data splits. Whether genomic context—lineage, capsule and O-locus background, and virule...
Abdullah Ahmad, El-Kalam Busair· bioRxiv· 0 citations
ABSTRACT Ceftriaxone (CRO) is a first-line antibiotic for pediatric nontyphoidal Salmonella (NTS) infections, but rising resistance threatens public health. Conventional antimicrobial susceptibility testing remains time-consuming, delaying treatment. Although MALDI-TOF MS enables rapid microbial identification, it lack...
Jin-Tao Xia, Jun Ren, Shi-Fu Wang et al.· Microbiology spectrum· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.