Respiratory Research
Development and external validation of a machine learning–based model for predicting 28-day in-hospital mortality in elderly patients with severe community-acquired pneumonia
By Xiaoyan Wang, Xingxia Yang, Ziqing Zhang and 5 others.
Abstract
Severe pneumonia represents a leading cause of mortality in older adults; however, effective prognostic tools remain scarce in clinical practice. This study aimed to develop a machine learning model for the individualized prediction of 28-day in-hospital mortality risk in elderly patients with severe pneumonia, to facilitate early identification of high-risk individuals and guide clinical decision-making. Elderly patients with severe pneumonia hospitalized at six medical centers across China from January 2019 to October 2025 were included in this study.Two hospitals supplied the training cohort, and four separate independent institutions provided the validation cohort. Using routinely collected clinical variables, multiple supervised machine learning models were developed to predict 28-day in-hospital mortality. Model performance was evaluated on an independent validation cohort and compared with established clinical scores: CURB-65, Pneumonia Severity Index (PSI), modified Sequential Organ Failure Assessment (mSOFA), and quick SOFA (qSOFA). Explainable machine learning techniques were applied to interpret the top-performing model. The training and validation cohorts included 2,194 and 561 patients, respectively. In the training cohort, the area under the receiver operating characteristic curve (AUC) for XGBoost was 0.866, compared with 0.644 for CURB-65, 0.670 for PSI, 0.792 for mSOFA, and 0.650 for qSOFA. In the independent validation cohort, XGBoost achieved an AUC of 0.850, consistent with its derivation performance (AUC = 0.866; P = 0.51). XGBoost significantly outperformed all conventional severity scores: CURB-65 (AUC = 0.652; P < 0.01), PSI (AUC = 0.685; P < 0.01), mSOFA (AUC = 0.725; P < 0.01), and qSOFA (AUC = 0.650; P < 0.01). This XGBoost-model demonstrates superior discriminative ability compared with existing clinical scores and shows promise for improving risk assessment and early intervention. Further external validation in diverse clinical settings is warranted to confirm its generalizability and utility.




