Development of a machine learning-based model for predicting mortality in hospitalized patients with community-acquired pneumonia
Main Article Content
Keywords
Abstract
Objective: To develop a 30-day mortality prediction model for hospitalized patients with community-acquired pneumonia (CAP) using the Random Forest (RF) algorithm and compare its predictive ability with the CURB-65 score. Subject and method: A descriptive, retrospective study conducted at the Emergency Department of 108 Military Central Hospital from 2021 to 2022, involving adult patients hospitalized due to CAP. Initial data included 21 clinical and paraclinical variables collected within the first 24 hours of admission. Patients were randomly divided into a training set (70%) and a testing set (30%). LASSO regression was applied to the training set to select independent predictors, which were then used to build the RF model. Model performance was evaluated on the testing set using metrics: AUC, Se, Sp, PPV, NPV, and Accuracy. Result: A total of 350 CAP patients were included, with a mean age of 71.7±16.0 years and a 30-day mortality rate of 6.3%. LASSO regression selected 5 independent predictors: altered mental status, multilobar infiltrates, and blood urea nitrogen, albumin and lactate levels. The RF model constructed from these 5 variables demonstrated superior performance compared to the CURB-65 score on the testing set, with AUCRF=0.969 and AUCCURB-65=0.703 (p=0.004). The feature importance in the RF model in descending order was: lactate level, albumin level, blood urea nitrogen, altered mental status, and multilobar infiltrates. Conclusion: The Random Forest model using 5 clinical and paraclinical variables showed significantly better performance in predicting 30-day mortality in hospitalized CAP patients compared to the CURB-65 score.
ISSN: 1859 - 2872