Skip to Content
  • Article
  • Open Access

30 November 2026

16 Pages

Prediction of Bacterial Bloodstream Infection at Intensive Care Admission and Daily Landmarks with an Audit of Information Timing

,
,
,
and
1
Department of Anaesthesiology and Intensive Care with Operating Theatre, University Clinical Hospital in Bialystok, 15-276 Bialystok, Poland
2
Department of Emergency Medicine, Medical University of Bialystok, 15-295 Bialystok, Poland
3
Department of Anaesthesiology and Intensive Care, Medical University of Bialystok, 15-276 Bialystok, Poland
4
Medical University of Bialystok, 15-276 Bialystok, Poland

Abstract

We examined whether information recorded at intensive care unit (ICU) admission or during an ICU stay could predict the first blood collection associated with bacterial bloodstream infection (BSI). After an original whole-hospitalization analysis, we defined three prediction tasks post hoc in 3196 patients, including 377 with BSI. We predicted BSI before ICU exit within 14 days of admission, within 14 days of a 24-h assessment, and within 48 h of a daily assessment. We selected models by training out-of-fold average precision and evaluated them in two previously examined calendar periods. In the later exploratory evaluation, the areas under the receiver operating characteristic curve were 0.588 at admission, 0.599 after 24 h, and 0.655 for daily forecasts. Daily average precision was 0.0155 across 5603 forecasts from 438 patients, with 47 positive forecasts from 26 patients. At a training threshold targeting at least 80% sensitivity, 82.6% of daily forecasts triggered an alert and 0.97% of alerts preceded a qualifying collection. The time when treatment-intensity records became available could not be verified. Adding final ICU duration affected performance inconsistently across algorithms. These findings support prospective assessment of predictor availability, calibration, and alert burden before clinical use.

1. Introduction

Bloodstream infection (BSI) is an important complication of critical illness. International cohorts document substantial variation in the frequency, microbiology, and outcomes of infection in intensive care units (ICUs), including hospital-acquired and ICU-onset BSI [1,2,3]. Prediction models may identify patients who warrant closer assessment, but estimated risk is distinct from a microbiological diagnosis and does not itself justify antimicrobial treatment.
The clinical meaning of a prediction depends on its timing and target. Predicting BSI during an entire hospitalization differs from estimating the probability of a qualifying blood culture within a fixed future period. Published models have used longitudinal physiology, routine laboratory results, and electronic health records to predict BSI or blood-culture outcomes [4,5,6]. Dynamic models have also been developed for central line-associated bloodstream infection (CLABSI) [7]. Differences in populations, event definitions, prediction horizons, and evaluation designs limit direct comparison of their reported performance.
Every predictor should be available at the time of the forecast. Final length of stay, full-hospitalization treatment exposure, and subsequent infections can encode the future clinical course and invalidate a baseline prediction model, even when training and evaluation observations are correctly separated [8]. Longitudinal models additionally require explicit observation windows and appropriate handling of repeated measurements. Missing results deserve separate examination because the decision to obtain a test may reflect clinical suspicion, severity, and local practice.
We evaluated BSI prediction at ICU admission, after 24 h, and at daily landmarks using clinical information, laboratory measurements, and documented treatment intensity. We compared regression, tree-based, additive, and time-to-event approaches; assessed discrimination, calibration, and alarm burden; and investigated recording patterns. A matched supplementary audit examined how deliberately adding information unavailable at admission affected several algorithms. The study aimed to characterize the reliability and limitations of these prediction tasks, without establishing a clinical decision rule.

2. Materials and Methods

2.1. Study Setting and Participants

We studied patients admitted to the ICU of the University Clinical Hospital in Bialystok, Poland. The archived analysis records 3196 hospitalizations in 3196 distinct patients, with admissions from 3 January 2017 through 1 June 2023. Timed follow-up ended on 1 June 2023. The unit primarily treats adults. Two patients, aged 16 and 17, had no documented BSI. All 377 patients with BSI were older than 18 years. Missing predictor values alone did not preclude inclusion.
Clinical descriptions, laboratory results, microbiology-linked BSI dates, ICU location intervals, and Therapeutic Intervention Scoring System–28 (TISS-28) records were linked at the patient and hospitalization levels. A physical ICU segment was a documented interval of continuous presence in the ICU. We used the Transparent Reporting of a multivariable prediction model for Individual Prognosis Or Diagnosis (TRIPOD+AI) guidance for regression and machine learning and considered the domains of the Prediction model Risk Of Bias ASsessment Tool for models using regression or artificial intelligence (PROBAST+AI) [9,10].

2.2. Bloodstream Infection Ascertainment

The outcome was clinically diagnosed bacterial BSI supported by blood-culture findings and compatible clinical and laboratory evidence. The institutional procedure comprised four blood-culture bottles obtained through two separate venipunctures on the same day, with at least two positive bottles interpreted in the clinical context. Cultures considered contaminants in the clinical source assessment were not classified as BSI. This modeling study relied on the clinical diagnoses and author-confirmed event dates; it did not independently re-adjudicate every bottle or reconstruct a complete isolate-level contamination log.
The event anchor was the first qualifying blood collection associated with BSI, rather than the subsequent notification of a positive result. Each hospitalization contributed one first event, irrespective of the number of bacterial species isolated. Patients without documented BSI were not assumed to have uniformly negative cultures. Among the 377 patients with BSI, 342 first-event times had minute-level precision and 35 were recorded only by calendar date. Day-only dates were represented as intervals, without imputing an event hour.
The target does not establish biological onset: infection may already have been suspected or present at a forecast landmark before the qualifying specimen was collected. The models therefore predict BSI-associated specimen collection within a defined future interval, rather than presymptomatic infection. The study did not classify events as ICU-acquired or central line-associated BSI, for which distinct surveillance requirements apply [11].

2.3. Prediction Tasks and Follow-Up

The three post hoc tasks comprised prediction at ICU admission for the following 14 days; prediction after 24 elapsed hours for the subsequent 14 days; and prediction daily at 08:00 local time, after at least 24 elapsed hours, for the subsequent 48 h. A forecast had to occur within a documented ICU segment and before the first qualifying BSI specimen. Daily forecasts stopped at that event. The full prediction horizon had to end before the relevant calendar-period boundary or the administrative observation cutoff.
The target was BSI within the horizon and before exit from the current ICU segment. Exit without BSI was a competing outcome, combining discharge, transfer, and death because separate cause-specific death times were not independently verified. Patients leaving the segment without BSI were classified as not experiencing the target within that segment; this did not imply absence of infection elsewhere during the remaining horizon. Competing-risk models estimated BSI cumulative incidence in the presence of this composite exit [12].
For consistency across timed model families, entire training hospitalizations with day-only BSI dates were excluded from fitting. In temporal evaluation, observations were retained only when risk-set eligibility and the binary horizon outcome were unambiguous throughout the event-date interval. Task-specific denominators are shown in Table 1. We also calculated a post hoc whole-hospitalization benchmark in the cohort of 3196 patients using internal cross-validation.
Table 1. Patients and forecasts eligible for the three post hoc prediction tasks in training and both exploratory temporal evaluations. BSI denotes bacterial bloodstream infection.

2.4. Predictors and Information Availability

The admission panel contained 36 clinical candidates, including demographics, body mass index (BMI), coronavirus disease 2019 (COVID-19), recent healthcare and antibiotic exposure, selected acute conditions, and comorbidities extracted from clinical descriptions. Post-admission laboratory results were not included in the admission model. The eight-predictor panel at 24 h comprised age, sex, COVID-19, transfer from another hospital within six months, antibiotic treatment within three months, C-reactive protein (CRP), white blood cell count (WBC), and procalcitonin (PCT). The primary daily panel contained 36 clinical candidates, 68 TISS-28-derived inputs, and elapsed ICU time. Additional panels incorporated laboratory measurements.
Laboratory predictors used the most recent available result strictly before the landmark, within the preceding 72 h and the current physical ICU segment. Changes between the last two eligible results were calculated on the log(1 + value) scale for CRP, WBC, platelets, creatinine, and PCT. TISS-28 summaries used completed observation intervals ending no later than the forecast; recent card values were retained for up to 72 h. Cumulative intervention exposure summed all preceding eligible cards within the hospitalization, including earlier ICU segments, without a 72-h restriction. It represented documented time, not future treatment duration or necessarily uninterrupted device presence. A second feature definition used recorded card-save times to restrict inputs to those available before the forecast. Its extraction rules are archived. A matched performance estimate for this feature definition could not be verified in the frozen evaluation files. The primary card chronology did not independently establish the historical availability of every card version.
Clinical information outside age and sex was withheld for clinical records from 83 hospitalizations with uncertain temporal alignment. The availability of retained clinical narratives at ICU arrival remained an assumption. Values outside fixed plausible ranges were treated as missing. Blood-count units were harmonized, including the equivalence of 103/µL and 109/L. Missing laboratory trajectories were not generated; PCT measurements absent from the detailed 2023 export remained missing. Table 2 summarizes predictor windows, and Supplementary Table S11 provides individual definitions.
Table 2. Availability of predictor data at intensive care unit (ICU) admission and subsequent landmarks. TISS-28 denotes the Therapeutic Intervention Scoring System–28.
Charlson and Elixhauser scores derived from whole-hospitalization diagnosis codes were restricted to timing-sensitivity analyses and excluded from primary model selection. Final ICU duration, subsequent infection outcomes, and other future clinical-course variables were not eligible primary predictors.

2.5. Models and Preprocessing

The post hoc comparison comprised 91 fitted configurations from ten families. The primary comparison included 56 configurations using penalized logistic regression, random forest, cause-specific Cox regression with elastic-net penalties, discrete-time competing-risk regression, and a custom competing-risk forest. Secondary comparisons comprised 35 configurations using CatBoost, explainable boosting machines (EBM), XGBoost, LightGBM, and penalized generalized additive models (GAMs). Supplementary Tables S1, S10 and S14 give the complete model register. Tree, boosting, and additive methods were implemented using their documented algorithmic frameworks [13,14,15,16,17,18,19]. Configurations represented different tasks and predictor panels, rather than independent algorithm families.
Two cause-specific Cox models represented BSI and ICU exit, with both hazards combined into BSI cumulative incidence. The discrete-time model used multinomial hazards for BSI, exit, and remaining event-free in 24-h prediction-relative intervals. Landmark covariates were held fixed across the forecast horizon. The custom competing-risk forest used 64 trees, patient-level bootstrap sampling, depth four, random feature subsets, cause-specific log-rank split scores, and Aalen–Johansen estimates within terminal nodes. It was an explicitly specified implementation, rather than an assertion of numerical equivalence to an external survival-forest package.
Preprocessing depended on the workflow. Imputation, missingness indicators, constant-feature removal, scaling, and GAM transformations were learned within each training partition. Tree libraries that supported native missing-value handling used their documented implementations. EBM and GAM did not include interaction terms. No synthetic oversampling, outcome-dependent undersampling, class weighting, or patient-frequency weighting was used. Daily forecast rows contributed equally during fitting, while patients remained grouped during splitting and uncertainty estimation. The full settings and model registry accompany the supplement.

2.6. Model Development and Selection

We trained models on 2017–2021 admissions using three shared stratified patient-grouped folds per task. Each patient contributed to one fold and one calendar period. Within each configuration we chose the setting with the highest training out-of-fold average precision (AP), followed by the lowest log loss and then setting order. These estimates describe the data used for model selection.
For each timed task, we ranked eligible configurations from the primary family set by training out-of-fold AP, then by lower log loss and alphabetical panel and family identifiers. Panels containing whole-hospitalization diagnosis scores were ineligible. The selected models were clinical random forest at admission (AP 0.1569), competing-risk forest with eight predictors at 24 h (0.1739), and random forest with clinical and TISS-28 predictors at daily landmarks (0.0396). None of the eligible secondary configurations exceeded the selected model’s training AP for its task. Supplementary Tables S1 and S14 identify candidates, settings, and selections.
We used 2022 and the subsequent 2023 admission period for separate exploratory evaluations at the same center. Both periods had already been examined during development. The final choice among eligible primary models used training predictions. The later results provide no independent test of the redesign or the complete selection process.

2.7. Performance Measures and Uncertainty

AP, calculated as noninterpolated average precision, was the selection measure. Area under the receiver operating characteristic curve (AUROC), Brier score, log loss, calibration intercept and slope, mean predicted risk, and calibration plots provided complementary assessments [20,21]. The AP reference was the event proportion within the corresponding task and period. A constant-risk comparator used the training event proportion. Raw probabilities were primary; a secondary intercept-only adjustment was estimated from training out-of-fold predictions and then held fixed.
We derived two thresholds from training out-of-fold predictions and carried them forward for the reported exploratory evaluations. One was the highest threshold achieving at least 80% sensitivity. The other was the lowest threshold yielding alarms on at most 10% of training forecasts, preserving ties. Both evaluation periods had previously been examined. We calculated sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and alarm frequency per forecast. In a post hoc descriptive analysis, we treated each empirical cutoff as a risk threshold and calculated net benefit as the true-positive fraction minus the false-positive fraction weighted by the threshold odds, with both fractions expressed per forecast. We compared this quantity with alerting on every forecast and issuing no alerts. Clinical preferences for these thresholds were not measured.
Individual estimates used 95% confidence intervals (CIs) from 500 patient-cluster percentile bootstrap resamples of fixed predictions; paired comparisons used 1000. All forecasts from a sampled patient were resampled together. Intervals did not incorporate model refitting or model-selection uncertainty and were not adjusted for multiple comparisons. Differences between tasks were not interpreted as matched estimates of the benefit of updated information.

2.8. Future Information and Missing-Data Analyses

A matched admission audit evaluated 11 fixed algorithms: logistic regression, random forest, XGBoost, radial basis function support vector machine (RBF SVM), k-nearest neighbors, LightGBM, Gaussian naive Bayes, linear probability model, AdaBoost, linear discriminant analysis (LDA), and gradient boosting. Each was fitted using clinical predictors, clinical predictors plus final ICU-segment duration, and final duration alone. Duration was calculated from segment entry to actual exit, without truncation at BSI or the forecast horizon, and transformed using log(1 + days). It was deliberately unavailable at admission and used only in this audit.
All 33 audit configurations used identical patients, outcomes, grouped folds, and common training-only median imputation, explicit missingness indicators, constant-feature removal, and standardization. One fixed setting was used per algorithm, without an exhaustive tuning comparison. For the linear probability model, scores were clipped to [0, 1] before probability metrics; clipping was not considered calibration. These fixed supplementary workflows were distinct from similarly named primary models.
To investigate recording patterns, logistic regression and random forest were fitted using measured values plus indicators, values alone, and indicators alone at each landmark. This produced 18 configurations, two shared with the admission audit, for 49 distinct supplementary workflows. Missingness was summarized by the forecast outcome rather than eventual whole-hospitalization BSI. Removing explicit indicators did not eliminate information about missingness retained by imputed values [22].
Probability-scale Monte Carlo permutation Shapley approximations were computed for the 11 admission audit models using the same 20 randomly sampled evaluation patients and five training-background patients [23]. Two random feature permutations and their reversals were used. Measured-value and missingness components were kept separate, and numerical additivity was checked. This was a custom approximation, distinct from a calculation using the SHapley Additive exPlanations (SHAP) library, and did not cover every main configuration. Independent masking could create implausible feature combinations, and attribution stability was not established.

2.9. Ethics and Software

The study was conducted in accordance with the Declaration of Helsinki. Ethical approval was granted by the Ethics Committee of the Medical University of Bialystok (APK.002.82.2024; 22 February 2024).
Analyses used Python 3.12.14 with NumPy 2.3.5, pandas 2.2.3, SciPy (1.17.0 or 1.16.3, depending on the workflow), scikit-learn 1.8.0, CatBoost 1.2.10, InterpretML 0.7.8, XGBoost 3.4.1, LightGBM 4.7.0, and pyGAM 0.12.0. Exact environment versions, algorithm settings, random seeds, predictor definitions, and executable analysis code are supplied in the reproducibility files. The analytical matrix was identified by a cryptographic checksum. Computational verification included independent metric calculations, checks of patient separation and event timing, and comparison of reconstructed laboratory and TISS features with the analytical matrix. Such checks establish numerical consistency, not independent clinical adjudication.

2.10. Evolution of the Analytical Design

The original August analysis used admission information to classify BSI documented at any time during hospitalization in 3324 adult admissions, including 374 with BSI. Follow-up varied with length of stay. Two questions remained open after that analysis: when admission predictors became available and how ICU exit affected the opportunity to observe BSI. Our review also found that some laboratory fields labeled as admission measurements included later results. We therefore returned to the clinical and microbiology records, anchored the event to blood collection, omitted laboratory results at ICU entry, and defined three fixed-horizon tasks. The resulting source cohort contained 3196 patients, including 377 with BSI. The change in population, outcome, and follow-up limits comparison of the original and post hoc estimates.
We use “original” for the August whole-stay analysis and “post hoc” for the redesign undertaken after examining its data and results. “Exploratory” describes both previously examined temporal cohorts and the supplementary comparisons, timing and missingness analyses, and model explanations. The eight-predictor panel was fixed after inspection of the original results and before the later model extensions. The 30 October analysis selected the three primary models by training performance. The 2 November addendum retained those selections and documented the matched audit, missingness analyses, and Shapley explanations. Before primary selection, at least five modeling analyses had evaluated both 2022 and 2023, with varying eligibility. An 17 October report already documented prior inspection of both periods. No independent preregistration was identified. The number of individual reviews and the timing of every design decision relative to first inspection are unknown. Supplementary Tables S12 and S13 trace the analysis history.

3. Results

3.1. Cohort and Eligibility for the Post Hoc Prediction Tasks

The cohort included 3196 patients, of whom 377 (11.8%) had BSI and 2819 did not have documented BSI. The two patients younger than 18 years were in the group without documented BSI. Source-cohort characteristics and missing counts are provided in Supplementary Table S9. The eligible training samples comprised 2244 admission forecasts with 159 events, 1974 forecasts after 24 h with 93 events, and 27,322 daily forecasts from 1919 patients, including 279 positive forecasts from 142 patients with BSI (Table 1). Of 377 BSI records, 16 had a recorded event time outside the strict interior of an ICU segment and 14 had a date-only interval that did not lie fully inside one segment. The remaining 347 satisfied this event-location check. The fixed horizons and other eligibility rules further determined task-specific counts.
The later exploratory evaluation included 536 admission forecasts with 49 events, 435 forecasts after 24 h with 14 events, and 5603 daily forecasts from 438 patients. The 47 positive daily forecasts represented 26 patients with BSI. Corresponding event proportions were 9.14%, 3.22%, and 0.84%, the task-specific references for AP.

3.2. Exploratory Temporal Evaluation of Discrimination and Calibration

The training-selected primary models achieved AUROCs of 0.588 at admission, 0.599 after 24 h, and 0.655 daily (Table 3). AP was 0.1416, 0.1119, and 0.0155, respectively. Confidence intervals were wide, especially after 24 h, when only 14 evaluation patients experienced the target event.
Table 3. Performance of the three training-selected models in the later exploratory evaluation of bloodstream infection (BSI). AUROC denotes area under the receiver operating characteristic curve, AP denotes average precision, and CI denotes confidence interval.
Daily CatBoost achieved AUROC 0.699 (95% CI 0.603–0.774). Its paired AUROC difference from the primary random forest was 0.045 (95% CI −0.041 to 0.126), which did not demonstrate superiority. Daily XGBoost, LightGBM, and GAM achieved AUROCs of 0.647, 0.643, and 0.600, respectively. All nine paired AUROC intervals comparing these three methods with the task-specific primary models included zero. Differences and intervals were calculated before rounding. Full configuration-level estimates and the 2022 evaluation appear in Supplementary Tables S10, S14 and S15.
Calibration identified limitations beyond discrimination. The primary daily random forest predicted a mean risk of 1.56%, compared with an observed proportion of 0.84%; its calibration intercept was −0.632 and slope 1.137. Its Brier score of 0.008361 was compared with the constant-risk comparator value of 0.008321. At admission, mean predicted and observed risks were 8.30% and 9.14%; after 24 h, they were 4.97% and 3.22%. Figure 1 displays discrimination and calibration for the daily random forest and CatBoost comparators.
Figure 1. Exploratory discrimination and calibration of daily forecasts for a bloodstream infection (BSI) within 48 h and before intensive care unit (ICU) exit. The later evaluation comprised 5603 forecasts from 438 patients and 47 positive forecasts from 26 patients. Both models used clinical variables and the Therapeutic Intervention Scoring System–28. (A) Sensitivity versus false-positive rate on a 0–1 scale for the primary random forest (blue) and CatBoost (orange). The dashed diagonal indicates chance discrimination. AUROC denotes the area under the receiver operating characteristic curve. (B) Observed BSI frequency versus mean predicted probability in ten equal-frequency groups per model. Blue circles represent random forest and orange squares represent CatBoost. Both axes span 0–4.5%. The diagonal indicates perfect calibration. The gray diamond marks the constant-risk comparator (1.02% predicted, 0.84% observed). Each forecast has equal weight.
In the 2022 exploratory evaluation, AUROCs were 0.598, 0.615, and 0.667 at admission, 24 h, and daily landmarks, respectively. Corresponding AP values were 0.1329, 0.0556, and 0.0192. Relative to a constant prediction at training prevalence, later-period Brier skill was 1.44%, 0.76%, and −0.48%, respectively. Supplementary Table S15 gives the raw and intercept-adjusted estimates. Supplementary Tables S10 and S14 report the full model comparison, including laboratory panels and secondary model families.
In the post hoc whole-hospitalization benchmark, clinical logistic regression had an internally cross-validated AUROC of 0.631 and AP of 0.1824. The corresponding clinical random forest estimates were 0.621 and 0.1827. For admission random forest, the exploratory panels adding Charlson or Elixhauser scores yielded later-period AUROCs of 0.560 and 0.577. For daily clinical and TISS-28 predictors, the exploratory explainable boosting machine yielded AUROC 0.581 and AP 0.0120. With laboratory predictors added, the corresponding estimates were 0.552 and 0.0109. The primary daily random forest’s Brier score after training-based intercept adjustment was 0.008353 (unadjusted, 0.008361). Supplementary Tables S10 and S14–S16 detail these comparisons.

3.3. Alert Frequency and Predictive Values in Exploratory Evaluation

At the sensitivity-oriented threshold, the primary daily random forest achieved 95.7% forecast-level sensitivity and PPV 0.97%, with alarms for 82.6% of forecasts. Daily CatBoost achieved 97.9% sensitivity and PPV 0.97%, with alarms for 84.5% of forecasts. High sensitivity therefore coincided with a large burden of false-positive forecasts (Table 4).
Table 4. Forecast-level sensitivity, positive predictive value (PPV), and frequency of alerts for bloodstream infection within 48 h of daily assessment. The later exploratory evaluation comprised 5603 forecasts in 438 patients, including 47 positive forecasts from 26 patients.
Restricting training alarms changed this trade-off. In the later evaluation, daily XGBoost achieved PPV 2.23% with alarms for 9.6% of forecasts, but sensitivity fell to 25.5%. The corresponding alarm fraction for the primary random forest was 15.1%, illustrating that a training alarm budget did not ensure the same operating point in subsequent patients. These results describe forecast-level behavior and do not establish patient-level clinical benefit. In the later period, the primary daily model’s net benefit per forecast relative to issuing no alerts was 0.00108 (95% CI −0.00206 to 0.00469) for the sensitivity policy and −0.00210 (−0.00347 to −0.00056) for the alert-budget policy. Supplementary Table S16 gives both comparator policies.

3.4. Exploratory Audit of Future Information

Across the 11 algorithms in the matched admission audit, adding final ICU-segment duration changed AUROC by −0.024 to 0.064. Random forest AUROC increased from 0.579 to 0.600, with a paired difference of 0.021 (95% CI −0.028 to 0.070). Gradient boosting increased from 0.559 to 0.623, with a difference of 0.064 (95% CI 0.004–0.128), although its AP decreased. Only the latter unadjusted AUROC interval excluded zero (Figure 2 and Supplementary Tables S2 and S3). The audit did not show uniform performance inflation or isolate a causal effect of information leakage. The original whole-stay audit added length of stay, treatment intensity, ventilator-associated pneumonia, and urinary tract infection together and reported AUROC 0.775 and area under the precision–recall curve 0.299. The redesigned audit isolated final segment duration. Its estimates address a different question (Supplementary Table S12).
Figure 2. Post hoc exploratory audit of final intensive care unit (ICU) segment duration in 536 later-period admission forecasts, with 49 patients experiencing a qualifying bloodstream infection (BSI) within 14 days. For each fixed algorithm, the difference is the estimate with clinical predictors plus final ICU-segment duration minus the estimate with clinical predictors alone. Blue points show differences in area under the receiver operating characteristic curve (AUROC, (A)). Brown points show differences in noninterpolated average precision (B). Horizontal bars show 95% percentile intervals from 1000 paired patient bootstrap resamples of fixed predictions, without multiplicity adjustment. Positive values favor inclusion of final duration. Dashed vertical lines mark zero. The horizontal scales differ between panels. RBF SVM denotes radial basis function support vector machine and LDA denotes linear discriminant analysis.

3.5. Exploratory Missingness Analyses and Model Explanations

In the daily evaluation, indicators-only logistic regression and random forest achieved AUROCs of 0.517 (95% CI 0.410–0.605) and 0.499 (0.388–0.594), with AP values of 0.0089 and 0.0087. For the daily random forest in the fixed missingness analysis, AUROC was 0.643 with values and indicators and 0.659 with values alone. At the 24-h landmark, indicators-only logistic regression achieved AUROC 0.607 (0.448–0.753). PCT was missing for 3 of 14 positive forecasts (21.4%) and 207 of 421 negative forecasts (49.2%). Thus, recording patterns varied by task and outcome; the findings did not establish noninformative missingness (Supplementary Tables S4 and S5 and Figure S1).
All 11 admission-model Shapley additivity checks passed, with maximum absolute residual below 1.4 × 10−16. The share of summed mean absolute attribution assigned to explicit missingness components ranged from 0% to 75.8% across models in the 20-patient explanation sample. These percentages describe model attributions, not predictive performance, causal importance, or explained variance. Component summaries and additivity checks are provided in Supplementary Tables S7 and S8.

4. Discussion

In this post hoc redesign, models selected on training data showed modest discrimination in the two exploratory evaluations. Admission, 24 h, and daily estimates describe different risk sets and prediction horizons. At the daily landmark, the sensitivity-oriented threshold alerted on more than four in five forecasts, and fewer than one in 100 alerts preceded a qualifying blood collection within 48 h. This burden limits the usefulness of the evaluated policy.
Greater algorithmic complexity did not establish a clear advantage over the primary models. The higher observed daily AUROC for CatBoost was compatible with both lower and higher discrimination than the primary random forest in the paired analysis. Ranking models by an already examined temporal dataset would further weaken the independence of the evaluation. The fixed supplementary comparison also cannot establish a universal ranking of algorithms, because it evaluates documented configurations rather than equally extensive optimization of every family.
Alarm performance was less favorable than AUROC alone might suggest. The low frequency of BSI within a 48-h forecast horizon yielded low PPVs even at high sensitivity. For CatBoost and XGBoost, limiting alarms increased PPV at the cost of lower sensitivity; it did not improve PPV for the primary random forest. Moreover, 47 positive daily forecasts represented only 26 patients with BSI. Forecast-level sensitivity is therefore not equivalent to the proportion of independent infections detected sufficiently early to improve care. A prospective alert policy would need to specify lead time, repeated-alert suppression, the intended clinical response, and the consequences of false-positive and false-negative alarms.
Calibration also matters when risks are used to guide action [21]. The primary daily model overestimated mean risk and did not improve the Brier score over a constant-risk comparator. These findings temper interpretation of its discrimination and illustrate why reporting AUROC alone would be insufficient. Any future external evaluation should assess calibration and alarm burden in addition to ranking performance.
The outcome definition constrains comparison with other research. Our anchor was the first qualifying blood collection linked to a clinical diagnosis of BSI. Infection could already have been suspected or biologically present before collection, and the target does not establish ICU acquisition or central line attribution. Studies predicting blood-culture positivity around suspected infection and studies predicting surveillance-defined CLABSI therefore address different clinical questions [4,5,7]. Similarly, an event-free ICU exit represents a competing outcome, not documented absence of BSI outside that segment.
The future-information audit showed heterogeneous effects across algorithms. A predictor unavailable at admission remains ineligible regardless of whether it improves a particular metric. Final duration can reflect severity, opportunities for culture collection, and the subsequent course of illness. Thus, the validity of a predictor should be judged from its origin and timing, rather than inferred from the magnitude of a performance increase [8]. Higher performance in a published study is not itself evidence that the study used future information.
Missingness analyses further illustrated the role of clinical recording. Near-chance daily performance from indicators alone did not prove that measurement decisions were irrelevant; intervals were broad, and the 24-h analysis showed that recording patterns could contain information. Median-imputed values can retain missingness information even after explicit indicators are removed. The attribution analysis separated these components, but a 20-patient sample with limited permutations cannot establish stable clinical importance. Independent masking may create implausible combinations, and correlated predictors can redistribute contributions.
The study combined explicit landmarks, fixed horizons, laboratory availability windows, patient-grouped splitting, and patient-cluster uncertainty estimates. It also retained the natural outcome frequency and reported calibration and alarm burden. These design features support interpretation and reproducibility. They do not remove the remaining limitations of retrospective source data or constitute an independent risk-of-bias assessment [9,10].
Several limitations are material. Clinical BSI diagnoses were not independently adjudicated from all microbiological and clinical records, and the contamination-exclusion process could not be reconstructed completely at the isolate level. Historical availability of clinical narratives and each treatment card at forecast time could not be established. The archived results did not permit a matched comparison of the primary daily model with either a save-time-restricted or a card-free version. Day-only BSI dates reduced eligibility, and the timed observation cutoff preceded the end of the source admission range. Some laboratory fields were sparsely available, including the absence of PCT from the detailed 2023 export. Whole-hospitalization diagnosis codes did not support unrestricted baseline use of comorbidity scores. The cohort included two adolescents and should not be generalized as an exclusively adult sample.
The temporal evaluations were exploratory and did not use untouched holdouts. The study lacked external-hospital and prospective evaluation. Small event counts limited precision; bootstrap intervals conditioned on fixed predictions and omitted refitting and model-selection uncertainty. Comparisons were not adjusted for multiplicity. Daily rows received equal fitting weight, so patients with more eligible days contributed more observations. Changes in case mix, testing practices, and documentation may further limit transportability.
Further work should prioritize independent evaluation of a specified clinical use case, with verified source timestamps, patient-level detection measures, and clinically meaningful lead time. Prospective assessment would be required to establish whether an alert pathway improves care. The present estimates do not justify autonomous decisions about antimicrobials, blood cultures, or device removal.

5. Conclusions

This study provides a transparent benchmark for predicting the first BSI-associated blood collection at admission and subsequent ICU landmarks. Exploratory temporal evaluation showed modest, uncertain discrimination without a clear advantage from additional algorithmic complexity. Low positive predictive values, calibration limitations, and frequent alerts leave clinical utility unproven. The future-information audit reinforces that predictor eligibility depends on availability at the forecast time. These findings support evaluation based on explicit prediction horizons, calibration, and alert burden. Independent external and prospective studies should establish patient-level detection, actionable lead time, and clinical benefit before implementation.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/make8120413/s1. Table S1. Candidate settings for 10 model families in the post hoc comparison. Table S2. Discrimination of 11 admission audit models for 14-day bloodstream infection (BSI). Table S3. Change in admission-model discrimination after adding final ICU segment duration. Table S4. Predictor missingness by forecast time and BSI outcome. Table S5. Paired differences in discrimination between missing-data strategies. Figure S1. AUROC at admission (A), after 24 h (B), and at daily landmarks (C) for values plus missingness indicators (dark blue), imputed values alone (medium blue), and indicators alone (light blue), with 95% bootstrap intervals. Table S6. Algorithm settings for the admission audit and missing-data analyses. Table S7. Missingness indicators’ share of Shapley attributions. Table S8. Maximum absolute error in Shapley-reconstructed probabilities. Table S9. Cohort characteristics by BSI status. Table S10a. Temporal performance for whole-hospitalization BSI prediction. Table S10b. Temporal performance for 14-day BSI prediction at admission. Table S10c. Temporal performance for 14-day BSI prediction at 24 h. Table S10d. Temporal performance for daily 48-hour BSI forecasts. Table S11. Predictor dictionary fields by data source. Table S12. Original analysis and post hoc redesign. Table S13. Role of each analysis in model selection. Table S14a. Training-based model selection for whole-hospitalization BSI. Table S14b. Training-based model selection for 14-day BSI prediction at admission. Table S14c. Training-based model selection for 14-day BSI prediction at 24 h. Table S14d. Training-based model selection for daily 48-hour BSI forecasts. Table S15a. Selected model performance in both temporal evaluations. Table S15b. Effect of intercept-only recalibration on predicted BSI risk. Table S16a. Whole-hospitalization benchmark in 3196 patients, including 377 with BSI. Table S16b. Initial eligibility screening for the fixed-horizon tasks. Table S16c. Forecast eligibility and analyzed counts by task and period. Table S16d. Forecast-level net benefit at training-derived alert thresholds.

Author Contributions

Conceptualization, M.B. and J.R.Ł.; methodology, M.B.; software, M.B.; validation, S.L.C.; formal analysis, M.B. and M.K.; investigation, M.B.; resources, M.B. and S.L.C.; data curation, M.B.; writing—original draft preparation, M.B.; writing—review and editing, J.R.Ł. and S.L.C.; visualization, M.B. and A.T.; supervision, J.R.Ł. and S.L.C.; project administration, M.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no funding. The Medical University of Bialystok, Poland, is covering the article processing charge in full.

Institutional Review Board Statement

Ethical approval was granted by the Ethics Committee of the Medical University of Bialystok, Poland (APK.002.82.2023; 22 February 2023).

Data Availability Statement

Patient-level data are not publicly available because of hospital privacy and governance restrictions. Aggregate results, predictor definitions, model settings, analysis code, and figure-generation code accompany the submission. Access to patient-level data is subject to institutional authorization and applicable ethics and data-protection requirements. Detailed clinical histories remain pseudonymized rather than demonstrably anonymous.

Acknowledgments

OpenAI ChatGPT(GPT-6, 6.2 Astra) assisted with analysis-code development, language editing, and document preparation. This assistance does not constitute independent clinical adjudication or validation. Responsibility for the scientific content and its submission rests with the authors.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

AI, artificial intelligence. AP, average precision. AUROC, area under the receiver operating characteristic curve. BMI, body mass index. BSI, bloodstream infection. CI, confidence interval. CLABSI, central line-associated bloodstream infection. COVID-19, coronavirus disease 2019. CRP, C-reactive protein. EBM, explainable boosting machine. GAM, generalized additive model. ICU, intensive care unit. LDA, linear discriminant analysis. NPV, negative predictive value. PCT, procalcitonin. PPV, positive predictive value. PROBAST+AI, Prediction model Risk Of Bias ASsessment Tool with artificial intelligence. RBF SVM, radial basis function support vector machine. SHAP, SHapley Additive exPlanations. TISS-28, Therapeutic Intervention Scoring System–28. TRIPOD+AI, Transparent Reporting of a multivariable prediction model for Individual Prognosis Or Diagnosis with artificial intelligence. WBC, white blood cell count.

References

  1. Vincent, J.-L.; Sakr, Y.; Singer, M.; Martin-Loeches, I.; Machado, F.R.; Marshall, J.C.; Finfer, S.; Pelosi, P.; Brazzi, L.; Aditianingsih, D.; et al. Prevalence and outcomes of infection among patients in intensive care units in 2017. JAMA 2020, 323, 1478–1487. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  2. Tabah, A.; Buetti, N.; Staiquly, Q.; Ruckly, S.; Akova, M.; Aslan, A.T.; Leone, M.; Conway Morris, A.; Bassetti, M.; Arvaniti, K.; et al. Epidemiology and outcomes of hospital-acquired bloodstream infections in intensive care unit patients: The EUROBACT-2 international cohort study. Intensive Care Med. 2023, 49, 178–190. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  3. Gouel-Cheron, A.; Swihart, B.J.; Warner, S.; Mathew, L.; Strich, J.R.; Mancera, A.; Follmann, D.; Kadri, S.S. Epidemiology of ICU-onset bloodstream infection: Prevalence, pathogens, and risk factors among 150,948 ICU patients at 85 U.S. hospitals. Crit. Care Med. 2022, 50, 1725–1736. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  4. Roimi, M.; Neuberger, A.; Shrot, A.; Paul, M.; Geffen, Y.; Bar-Lavie, Y. Early diagnosis of bloodstream infections in the intensive care unit using machine-learning algorithms. Intensive Care Med. 2020, 46, 454–462. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  5. Van Steenkiste, T.; Ruyssinck, J.; De Baets, L.; Decruyenaere, J.; De Turck, F.; Ongenae, F.; Dhaene, T. Accurate prediction of blood culture outcome in the intensive care unit using long short-term memory neural networks. Artif. Intell. Med. 2019, 97, 38–43. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Ferrari, D.; Arina, P.; Edgeworth, J.; Curcin, V.; Guidetti, V.; Mandreoli, F.; Wang, Y. Using interpretable machine learning to predict bloodstream infection and antimicrobial resistance in patients admitted to ICU: Early alert predictors based on EHR data to guide antimicrobial stewardship. PLoS Digit. Health 2024, 3, e0000641. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  7. Albu, E.; Gao, S.; Stijnen, P.; Rademakers, F.E.; Janssens, C.; Cossey, V.; Debaveye, Y.; Wynants, L.; Van Calster, B. Hospital-wide, dynamic, individualized prediction of central line-associated bloodstream infections-development and temporal evaluation of six prediction models. BMC Infect. Dis. 2025, 25, 597. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  8. Davis, S.E.; Matheny, M.E.; Balu, S.; Sendak, M.P. A framework for understanding label leakage in machine learning for health care. J. Am. Med. Inform. Assoc. 2024, 31, 274–280. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  9. Collins, G.S.; Moons, K.G.M.; Dhiman, P.; Riley, R.D.; Beam, A.L.; Van Calster, B.; Ghassemi, M.; Liu, X.; Reitsma, J.B.; van Smeden, M.; et al. TRIPOD+AI statement: Updated guidance for reporting clinical prediction models that use regression or machine learning methods. BMJ 2024, 385, e078378, Correction in BMJ 2024, 385, q824. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  10. Moons, K.G.M.; Damen, J.A.A.; Kaul, T.; Hooft, L.; Andaur Navarro, C.; Dhiman, P.; Beam, A.L.; Van Calster, B.; Celi, L.A.; Denaxas, S.; et al. PROBAST+AI: An updated quality, risk of bias, and applicability assessment tool for prediction models using regression or artificial intelligence methods. BMJ 2025, 388, e082505. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  11. Centers for Disease Control and Prevention. Bloodstream Infection Event (Central Line-Associated Bloodstream Infection and Non-Central Line Associated Bloodstream Infection). National Healthcare Safety Network Patient Safety Component Manual, Chapter 4; January 2026. Available online: https://www.cdc.gov/nhsn/pdfs/pscmanual/4psc_clabscurrent.pdf (accessed on 5 November 2026).
  12. Austin, P.C.; Lee, D.S.; Fine, J.P. Introduction to the analysis of survival data in the presence of competing risks. Circulation 2016, 133, 601–609. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  13. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
  14. Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar] [CrossRef] [Scilit]
  15. Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.Y. LightGBM: A highly efficient gradient boosting decision tree. Adv. Neural Inf. Process. Syst. 2017, 30, 3146–3154. [Google Scholar]
  16. Prokhorenkova, L.; Gusev, G.; Vorobev, A.; Dorogush, A.V.; Gulin, A. CatBoost: Unbiased boosting with categorical features. Adv. Neural Inf. Process. Syst. 2018, 31, 6638–6648. [Google Scholar]
  17. Nori, H.; Jenkins, S.; Koch, P.; Caruana, R. InterpretML: A unified framework for machine learning interpretability. arXiv 2019, arXiv:1909.09223. [Google Scholar] [CrossRef] [Scilit]
  18. Hastie, T.; Tibshirani, R. Generalized additive models. Stat. Sci. 1986, 1, 297–310. [Google Scholar] [CrossRef] [Scilit]
  19. Simon, N.; Friedman, J.; Hastie, T.; Tibshirani, R. Regularization paths for Cox’s proportional hazards model via coordinate descent. J. Stat. Softw. 2011, 39, 1–13. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  20. Saito, T.; Rehmsmeier, M. The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLoS ONE 2015, 10, e0118432. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  21. Van Calster, B.; McLernon, D.J.; van Smeden, M.; Wynants, L.; Steyerberg, E.W.; on behalf of Topic Group ‘Evaluating diagnostic tests and prediction models’ of the STRATOS initiative. Calibration: The Achilles heel of predictive analytics. BMC Med. 2019, 17, 230. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  22. Nijman, S.W.J.; Leeuwenberg, A.M.; Beekers, I.; Verkouter, I.; Jacobs, J.J.L.; Bots, M.L.; Asselbergs, F.W.; Moons, K.G.M.; Debray, T.P.A. Missing data is poorly handled and reported in prediction model studies using machine learning: A literature review. J. Clin. Epidemiol. 2022, 142, 218–229. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  23. Lundberg, S.M.; Lee, S.I. A unified approach to interpreting model predictions. Adv. Neural Inf. Process. Syst. 2017, 30, 4765–4774. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.