Skip to content
Open access

Determinants and Prediction of In-Hospital Mortality in Pneumonia Patients Using Machine Learning Models

Sep 2026 · Public Health of Indonesia · 0 citations

Abstract

Background: Pneumonia remains a major cause of hospitalization and in-hospital mortality, particularly among older adults and patients with chronic comorbidities. Objectives: To estimate in-hospital mortality among pneumonia inpatients, identify associated demographic and clinical factors, and compare predictive models using routinely collected hospital data. Methods: A retrospective cohort study was conducted using 971 eligible pneumonia inpatient records from Satun Hospital, Thailand, during 2022–2024. Bootstrap resampling was applied as an internal resampling strategy for predictive model development and stability assessment; however, it was not intended to create new independent observations, and the effective sample size remained 971 records. Two predictor specifications were evaluated: a comprehensive set of available demographic and clinical variables and a restricted set of variables identified as statistically significant in logistic regression analysis. Four supervised algorithms logistic regression (LR), random forests (RF), neural networks (NNET), and support vector machines (SVM) were compared using sensitivity, specificity, precision, F1-score, accuracy, and ROC-AUC. Results: The overall in-hospital mortality was 18.6%. Advanced age, referral status, and bacterial pneumonia were key determinants of mortality. Models developed with the comprehensive predictor set consistently outperformed those restricted to statistically significant variables. RF achieved the best discrimination (AUC 0.90–0.92; F1-score >0.72; accuracy >90%), followed by SVM and NNET (AUC >0.85). LR showed limited predictive capacity, with very low sensitivity (<6%) despite moderate specificity (~82%). Conclusion: Machine-learning models, particularly RF, SVM, and NNET, outperformed LR in internal prediction. However, due to the retrospective single-hospital design and lack of external validation, further multicenter validation is needed before routine clinical use.  Keywords: Pneumonia; In-hospital mortality; Machine learning

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.