Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jul 1;8(7):e2518815.
doi: 10.1001/jamanetworkopen.2025.18815.

Integrating Nonindividual Patient Features in Machine Learning Models of Hospital-Onset Bacteremia

Affiliations

Integrating Nonindividual Patient Features in Machine Learning Models of Hospital-Onset Bacteremia

M Cristina Vazquez Guillamet et al. JAMA Netw Open. .

Erratum in

  • Error in Byline.
    [No authors listed] [No authors listed] JAMA Netw Open. 2025 Aug 1;8(8):e2530284. doi: 10.1001/jamanetworkopen.2025.30284. JAMA Netw Open. 2025. PMID: 40768153 Free PMC article. No abstract available.

Abstract

Importance: Hospital-onset bacteremia and fungemia (HOB) are common and potentially preventable complications of hospital care.

Objective: To assess whether nonindividual patient features, which summarize interactions with other patients and health care workers (HCWs), can contribute to predictive and causal machine learning models for HOB.

Design, setting, and participants: This prognostic study included adult patients admitted to Barnes-Jewish Hospital, an academic hospital in St Louis, Missouri, in 2021. Analyses were developed between October 2023 and August 2024 and in April 2025.

Exposure: Individual patient features were extracted from electronic health records and used to engineer nonpatient features, including interactions with HCWs and direct or indirect (consecutive room occupancy) patient contact.

Main outcomes and measures: HOB was defined as a positive blood culture after the third day of hospitalization. Patients who were hospitalized for more than 3 days were considered at risk for the outcome. We developed 3 gradient boosting models: 2 predictive (with patient features only and with both patient and nonpatient features to predict the occurrence of HOB) and 1 causal to test the association of nonpatient features and HOB. Predictive performance is reported using area under the receiver operating characteristic curve (AUROC) and area under the precision-recall curve (AUPRC), and the results of the causal model are reported as difference in average effects. Sensitivity analyses separated intensive care unit-onset and ward-onset HOB and included a methicillin-resistant Staphylococcus aureus-specific model to adjust for colonization pressure.

Results: Among the 52 442 patients, 34 855 (66.5%) had admissions longer than 72 hours and were included for analysis; of these, 556 (1.6%) developed HOB. The median age for the included patients was 60 (IQR, 44-70) years, 50.5% were female, and obesity was the most frequent comorbidity (25.0%). Nonpatient features, such as a prior occupant of the same room receiving antipseudomonal beta-lactams and the mean number of HCWs per day for the 7 days preceding HOB, improved the model's performance (AUROC, 0.88 [95% CI, 0.88-0.89]; AUPRC, 0.20 [95% CI, 0.20-0.22]) compared with the patient-only model (AUROC, 0.85 [95% CI, 0.85-0.86]; AUPRC, 0.13 [95% CI, 0.12-0.14]) (P < .001). These 2 features were also associated with a higher likelihood of HOB in the causal gradient boosting model.

Conclusions and relevance: These findings suggest that nonindividual patient features may contribute to a comprehensive analysis of HOB when integrated with individual patient features in a machine learning model.

PubMed Disclaimer

Conflict of interest statement

Conflict of Interest Disclosures: Dr Vazquez Guillamet reported having individual stocks in Carisma Therapeutics, Bionano Genomics, and Ocugen Inc and receiving personal fees from Merck Sharp and Dohme LLC for an unbranded Gram negative pneumonia patient video outside the submitted work. Dr Warren reported receiving grants from the Centers for Disease Control and Prevention during the conduct of the study and owning stock in Pfizer, Inc. No other disclosures were reported.

Figures

Figure 1.
Figure 1.. Predictive Performance for the 2 Gradient-Boosting Models (Patient Features Only vs Patient and Nonpatient Features)
The dashed line in panel A indicates a random classifier or baseline performance. AUPRC indicates area under the precision-recall curve; AUROC, area under the receiver operating characteristic curve.
Figure 2.
Figure 2.. Top 10 Most Important Features for Gradient-Boosting Model Performance for Any Hospital-Onset Bacteremia and Fungemia
HCW indicates health care worker; SHAP, Shapley additive explanations.
Figure 3.
Figure 3.. Top 10 Most Important Features for Gradient-Boosting Model Performance for ICU-Onset and Non-ICU–Onset HOB
ARDS indicates acute respiratory distress syndrome; ED, emergency department; HCW, health care worker; HOB, hospital-onset bacteremia; ICU, intensive care unit; SHAP, Shapley additive explanations.
Figure 4.
Figure 4.. Top 10 Most Important Features for Gradient-Boosting Model Performance in MRSA HOB Model
HCW indicates health care worker; HOB, hospital-onset bacteremia; ICU, intensive care unit; MRSA, methicillin-resistant Staphylococcus aureus; SHAP, Shapley additive explanations.

References

    1. Leekha S, Robinson GL, Jacob JT, et al. ; CDC Prevention Epicenters Program . Evaluation of hospital-onset bacteraemia and fungaemia in the USA as a potential healthcare quality measure: a cross-sectional study. BMJ Qual Saf. 2024;33(8):487-498. doi: 10.1136/bmjqs-2023-016831 - DOI - PMC - PubMed
    1. Dantes RB, Rock C, Milstone AM, et al. Preventability of hospital onset bacteremia and fungemia: a pilot study of a potential healthcare-associated infection outcome measure. Infect Control Hosp Epidemiol. 2019;40(3):358-361. doi: 10.1017/ice.2018.339 - DOI - PMC - PubMed
    1. Krishnan J, Gettler EB, Campbell M, et al. Comparative epidemiology of hospital-onset bloodstream infections (HOBSIs) and central line-associated bloodstream infections (CLABSIs) across a three-hospital health system. Infect Control Hosp Epidemiol. Published online March 20, 2024. doi: 10.1017/ice.2024.38 - DOI - PubMed
    1. Yu KC, Ye G, Edwards JR, et al. Hospital-onset bacteremia and fungemia: an evaluation of predictors and feasibility of benchmarking comparing two risk-adjusted models among 267 hospitals. Infect Control Hosp Epidemiol. 2022;43(10):1317-1325. doi: 10.1017/ice.2022.211 - DOI - PMC - PubMed
    1. Yu KC, Jung M, Ai C. Characteristics, costs, and outcomes associated with central-line-associated bloodstream infection and hospital-onset bacteremia and fungemia in US hospitals. Infect Control Hosp Epidemiol. 2023;44(12):1920-1926. doi: 10.1017/ice.2023.132 - DOI - PMC - PubMed

Publication types