Interpretable machine learning prediction model for postoperative pneumonia after cardiac surgery based on real-world data: a retrospective single-center study

Postoperative pneumonia (POP) is a common and clinically important complication following cardiac surgery. This study aimed to develop and internally evaluate an interpretable machine learning prediction model for 30-day POP after cardiac surgery using routinely collected real-world clinical data, and to describe a prototype decision-support application for potential perioperative risk stratification. We conducted a retrospective single-center cohort study using electronic medical record data from Nanjing Drum Tower Hospital. Adult patients undergoing cardiac surgery between January 2012 and December 2023 were screened; patients with massive missing clinical data, definite preoperative infection, or age < 18 years were excluded. The outcome was POP within 30 days after surgery. The final cohort was partitioned into training and held-out test sets using stratified random sampling at a 7:3 ratio before feature selection, augmentation, model fitting, and model evaluation. To reduce information leakage, preprocessing steps were fitted within the training workflow and the test set was reserved for final internal evaluation. Missing data were handled using MICE, class imbalance was addressed with Borderline-SMOTE and class weighting, predictors were selected using Boruta with recall impact over 50 iterations, and Bayesian optimization was used for hyperparameter tuning. Six machine learning algorithms (RF, SVM, XGBoost, LR, DT, and CatBoost) were compared. Model performance was assessed using discrimination, precision-recall performance, calibration, and overall classification metrics, including AUC, AP, recall, precision, accuracy, F1-score, calibration curves, and Brier score. SHAP was used for model interpretation. Among 10,109 eligible patients, 1,018 (10.07%) developed POP and 9,091 did not. Seven predictors were retained in the final model: ejection fraction (EF), cardiopulmonary bypass (CPB) time, serum creatinine (SCr), intraoperative blood loss, gender, total bilirubin (TBIL), and platelet-to-white blood cell ratio (PWR). CatBoost showed the best overall internal performance, with validation-set AUC of 0.9873 (95% CI: 0.9820–0.9926), AP of 0.9519 (95% CI: 0.9315–0.9722), accuracy of 0.9528 (95% CI: 0.9422–0.9635), recall of 0.9324 (95% CI: 0.9011–0.9636), and F1-score of 0.8996 (95% CI: 0.8754–0.9234). In the held-out test set, CatBoost achieved AUC of 0.9810, AP of 0.8600, accuracy of 0.9555, recall of 0.9258, precision of 0.7007, and F1-score of 0.7977. SHAP analysis showed that EF, CPB duration, SCr, and intraoperative blood loss were major contributors to predicted POP risk. A prototype web application was developed to illustrate potential perioperative use. This study develops and internally evaluates an interpretable machine learning model for perioperative prediction of 30-day POP after cardiac surgery. The model demonstrated high internal discrimination and precision-recall performance, but the retrospective single-center design, absence of external validation, and inclusion of intraoperative predictors mean that it should be considered a perioperative risk-stratification model requiring external and prospective evaluation before routine clinical use. This retrospective prediction-model study was not registered.

Authors

Institutions

Publication Details

Journal
BMC Medical Informatics and Decision Making
Published
2026-07-30
DOI
https://doi.org/10.1186/s12911-026-03731-7
Primary Topic
Nosocomial Infections in ICU
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Interpretable machine learning prediction model for postoperative pneumonia after cardiac surgery based on real-world data: a retrospective single-center study

Liwei Zhang, Shufang Jiang, Hai Ge, Yang Li et al.
BMC Medical Informatics and Decision Making
Nosocomial Infections in ICU
article

Interpretable machine learning prediction model for postoperative pneumonia after cardiac surgery based on real-world data: a retrospective single-center study

Liwei Zhang, Shufang Jiang, Hai Ge, Yang Li, Wenjuan Li, Jia Di, Chengyi Feng
article en

Abstract

Postoperative pneumonia (POP) is a common and clinically important complication following cardiac surgery. This study aimed to develop and internally evaluate an interpretable machine learning prediction model for 30-day POP after cardiac surgery using routinely collected real-world clinical data, and to describe a prototype decision-support application for potential perioperative risk stratification. We conducted a retrospective single-center cohort study using electronic medical record data from Nanjing Drum Tower Hospital. Adult patients undergoing cardiac surgery between January 2012 and December 2023 were screened; patients with massive missing clinical data, definite preoperative infection, or age < 18 years were excluded. The outcome was POP within 30 days after surgery. The final cohort was partitioned into training and held-out test sets using stratified random sampling at a 7:3 ratio before feature selection, augmentation, model fitting, and model evaluation. To reduce information leakage, preprocessing steps were fitted within the training workflow and the test set was reserved for final internal evaluation. Missing data were handled using MICE, class imbalance was addressed with Borderline-SMOTE and class weighting, predictors were selected using Boruta with recall impact over 50 iterations, and Bayesian optimization was used for hyperparameter tuning. Six machine learning algorithms (RF, SVM, XGBoost, LR, DT, and CatBoost) were compared. Model performance was assessed using discrimination, precision-recall performance, calibration, and overall classification metrics, including AUC, AP, recall, precision, accuracy, F1-score, calibration curves, and Brier score. SHAP was used for model interpretation. Among 10,109 eligible patients, 1,018 (10.07%) developed POP and 9,091 did not. Seven predictors were retained in the final model: ejection fraction (EF), cardiopulmonary bypass (CPB) time, serum creatinine (SCr), intraoperative blood loss, gender, total bilirubin (TBIL), and platelet-to-white blood cell ratio (PWR). CatBoost showed the best overall internal performance, with validation-set AUC of 0.9873 (95% CI: 0.9820–0.9926), AP of 0.9519 (95% CI: 0.9315–0.9722), accuracy of 0.9528 (95% CI: 0.9422–0.9635), recall of 0.9324 (95% CI: 0.9011–0.9636), and F1-score of 0.8996 (95% CI: 0.8754–0.9234). In the held-out test set, CatBoost achieved AUC of 0.9810, AP of 0.8600, accuracy of 0.9555, recall of 0.9258, precision of 0.7007, and F1-score of 0.7977. SHAP analysis showed that EF, CPB duration, SCr, and intraoperative blood loss were major contributors to predicted POP risk. A prototype web application was developed to illustrate potential perioperative use. This study develops and internally evaluates an interpretable machine learning model for perioperative prediction of 30-day POP after cardiac surgery. The model demonstrated high internal discrimination and precision-recall performance, but the retrospective single-center design, absence of external validation, and inclusion of intraoperative predictors mean that it should be considered a perioperative risk-stratification model requiring external and prospective evaluation before routine clinical use. This retrospective prediction-model study was not registered.

BMC Medical Informatics and Decision Making
Soochow University (CN), Nanjing Drum Tower Hospital (CN), Changzhou Third People's Hospital (CN)
Gender equality
Openalex Percentile: Top 8%
Nosocomial Infections in ICU
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.