Related Experiment Video
Updated: Mar 3, 2026

Bacterial Detection & Identification Using Electrochemical Sensors
Published on: April 23, 2013
Explainable machine learning for early detection of Escherichia coli urinary tract infections: integrating SHAP
Jie Zhang1, Ying-Ying Jiang1, Ying Zhu1
1Department of Clinical Laboratory, Fuding Hospital, Fujian University of Traditional Chinese Medicine, Fuding, Fujian, China.
Background:
Escherichia coli is the predominant uropathogen in urinary tract infections (UTIs), but culture-based identification is time-consuming. This study aimed to develop an explainable, culture-independent model to distinguish E. coli from other uropathogens using routinely collected clinical data.
Methods:
We retrospectively analyzed 308 hospitalized patients with culture-confirmed UTIs at Fuding Hospital, Fujian University of Traditional Chinese Medicine (January-December 2023), classified as E. coli (n = 158) or non-E. coli (n = 150). Species identification was performed using an automated microbiology system. Nineteen predictors (sex, urinary leukocyte grade, and 17 routine laboratory variables) were used. Associations with E. coli UTI were examined using univariate and multivariable logistic regression. A Random Forest (RF) classifier was developed with SHapley Additive exPlanations (SHAP) for interpretability. Data were split using a stratified 70/30 train-test split; 5-fold stratified cross-validation within the training set was used for hyperparameter tuning, and final performance (discrimination and calibration) was reported on the held-out test set. RF was additionally benchmarked against regularized logistic regression, calibrated linear SVM, and gradient boosting using the same protocol.
Results:
E. coli accounted for 51.3% of isolates, followed by Enterococcus spp. (18.5%) and Klebsiella spp. (7.8%). Compared with non-E. coli cases, E. coli infections were more common in females and showed higher lymphocyte counts (LYM), alanine aminotransferase (ALT), and albumin (ALB) (all P < 0.05). Multivariable logistic regression identified sex, LYM, and urinary leukocyte grade as independent predictors. On the held-out test set, RF achieved moderate discrimination (ROC-AUC = 0.66; average precision = 0.66) with calibration assessed by Brier score and calibration slope. SHAP highlighted Sex, LYM, and ALT as the most influential predictors and revealed patient-level heterogeneity in feature effects.
Conclusions:
E. coli remains the predominant pathogen among hospitalized UTIs. An explainable RF model using routine laboratory variables provided moderate, reproducible discrimination of E. coli vs non-E. coli UTIs and may support earlier decision-making while awaiting culture results.
More Related Videos
08:53Recurrent Escherichia coli Urinary Tract Infection Triggered by Gardnerella vaginalis Bladder Exposure in Mice
Published on: December 4, 2020
06:20Detection of Enterohemorrhagic Escherichia Coli Colonization in Murine Host by Non-invasive In Vivo Bioluminescence System
Published on: April 9, 2018
Related Concept Videos
Urinary Tract Infection I: Introduction
Steps in Outbreak Investigation
Urinary Tract Infection III: Diagnostic Studies and Interprofessional Care
Urine Studies II: Urine Culture and Sensitivity Test