Machine learning to predict bacteriuria in the emergency department

Abstract Urinary tract infections (UTIs) are among the most common bacterial infections, yet they are both frequently misdiagnosed and inappropriately treated. We aimed to determine whether a machine learning model could accurately predict bacteriuria by using only the data that are readily availabl...

Full description

Saved in:
Bibliographic Details
Main Authors: Johnathan M. Sheele, Ronna L. Campbell, Derick D. Jones
Format: Article
Language:English
Published: Nature Portfolio 2025-08-01
Series:Scientific Reports
Subjects:
Online Access:https://doi.org/10.1038/s41598-025-16677-z
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849226457466798080
author Johnathan M. Sheele
Ronna L. Campbell
Derick D. Jones
author_facet Johnathan M. Sheele
Ronna L. Campbell
Derick D. Jones
author_sort Johnathan M. Sheele
collection DOAJ
description Abstract Urinary tract infections (UTIs) are among the most common bacterial infections, yet they are both frequently misdiagnosed and inappropriately treated. We aimed to determine whether a machine learning model could accurately predict bacteriuria by using only the data that are readily available during the emergency department (ED) patient encounter. We retrospectively identified records of 62,963 patient encounters at our EDs that included results from a urinalysis and urine cultures. Encounters occurred from January 1, 2017, through December 31, 2021. We used a logistic regression classifier, k-nearest neighbors, random forest classifier, extreme gradient boosting (XGBoost), and a deep neural network to determine how well they predicted 3 urine culture outcomes: (1) no microbial growth vs. any microbial growth, including mixed flora; (2) ≥10,000 colony-forming units per milliliter (CFU/mL) for ≥1 organism vs. < 10,000 CFU/mL for all organisms; and (3) ≥100,000 CFU/mL for ≥1 organism vs. < 100,000 CFU/mL for all organisms. XGBoost had the highest area under the receiver operating characteristic curve (AUROC) for all outcomes assessed: 86.1% for no microbial growth, 89.1% for ≥10,000 CFU/mL for ≥1 organism, and 93.1% for ≥100,000 CFU/mL for ≥1 organism. For encounters where the treating healthcare provider diagnosed with patient with a UTI before urine culture results were known and urine cultures showed either no microbial growth or ≥100,000 CFU/mL, the AUROC was 91%. XGBoost could accurately predict bacteriuria by using only data that were available during the ED patient encounter. These findings suggest that machine learning algorithms could be valuable tools in clinical settings by helping predict culture results and guiding decisions on whether to initiate empiric antibiotic treatment.
format Article
id doaj-art-d0bb6ec4d3d042ae914b8875a1f8175f
institution Kabale University
issn 2045-2322
language English
publishDate 2025-08-01
publisher Nature Portfolio
record_format Article
series Scientific Reports
spelling doaj-art-d0bb6ec4d3d042ae914b8875a1f8175f2025-08-24T11:21:09ZengNature PortfolioScientific Reports2045-23222025-08-0115111110.1038/s41598-025-16677-zMachine learning to predict bacteriuria in the emergency departmentJohnathan M. Sheele0Ronna L. Campbell1Derick D. Jones2Department of Emergency Medicine (Sheele), Mayo ClinicDepartment of Emergency Medicine (Sheele), Mayo ClinicDepartment of Emergency Medicine (Sheele), Mayo ClinicAbstract Urinary tract infections (UTIs) are among the most common bacterial infections, yet they are both frequently misdiagnosed and inappropriately treated. We aimed to determine whether a machine learning model could accurately predict bacteriuria by using only the data that are readily available during the emergency department (ED) patient encounter. We retrospectively identified records of 62,963 patient encounters at our EDs that included results from a urinalysis and urine cultures. Encounters occurred from January 1, 2017, through December 31, 2021. We used a logistic regression classifier, k-nearest neighbors, random forest classifier, extreme gradient boosting (XGBoost), and a deep neural network to determine how well they predicted 3 urine culture outcomes: (1) no microbial growth vs. any microbial growth, including mixed flora; (2) ≥10,000 colony-forming units per milliliter (CFU/mL) for ≥1 organism vs. < 10,000 CFU/mL for all organisms; and (3) ≥100,000 CFU/mL for ≥1 organism vs. < 100,000 CFU/mL for all organisms. XGBoost had the highest area under the receiver operating characteristic curve (AUROC) for all outcomes assessed: 86.1% for no microbial growth, 89.1% for ≥10,000 CFU/mL for ≥1 organism, and 93.1% for ≥100,000 CFU/mL for ≥1 organism. For encounters where the treating healthcare provider diagnosed with patient with a UTI before urine culture results were known and urine cultures showed either no microbial growth or ≥100,000 CFU/mL, the AUROC was 91%. XGBoost could accurately predict bacteriuria by using only data that were available during the ED patient encounter. These findings suggest that machine learning algorithms could be valuable tools in clinical settings by helping predict culture results and guiding decisions on whether to initiate empiric antibiotic treatment.https://doi.org/10.1038/s41598-025-16677-zArtificial intelligenceUrinalysisUrinary tract infectionUrine culture
spellingShingle Johnathan M. Sheele
Ronna L. Campbell
Derick D. Jones
Machine learning to predict bacteriuria in the emergency department
Scientific Reports
Artificial intelligence
Urinalysis
Urinary tract infection
Urine culture
title Machine learning to predict bacteriuria in the emergency department
title_full Machine learning to predict bacteriuria in the emergency department
title_fullStr Machine learning to predict bacteriuria in the emergency department
title_full_unstemmed Machine learning to predict bacteriuria in the emergency department
title_short Machine learning to predict bacteriuria in the emergency department
title_sort machine learning to predict bacteriuria in the emergency department
topic Artificial intelligence
Urinalysis
Urinary tract infection
Urine culture
url https://doi.org/10.1038/s41598-025-16677-z
work_keys_str_mv AT johnathanmsheele machinelearningtopredictbacteriuriaintheemergencydepartment
AT ronnalcampbell machinelearningtopredictbacteriuriaintheemergencydepartment
AT derickdjones machinelearningtopredictbacteriuriaintheemergencydepartment