The aim of this study was to develop and validate a machine learning-based mortality risk prediction model for patients with severe community-acquired pneumonia (SCAP) in the intensive care unit (ICU). We collected data from two centers as the development and external validation cohorts. Variables were screened using the Recursive Feature Elimination method. Five machine learning algorithms were used to build predictive models. Models were evaluated through nested cross-validation to select the best one. The model was interpreted using Shapley Additive Explanations. We selected the optimal model to generate the web calculator. A total of 23 predictive features were selected. The Light Gradient Boosting Machine (LightGBM) model had an area under the receiver operating characteristic curve (AUC) of 0.842 (95% CI: 0.757-0.927), with an external 5-fold cross-validation average AUC of 0.842 ± 0.038, which was superior to the other models. External validation results also demonstrated good performance by the LightGBM model with an AUC of 0.856 (95% CI: 0.792-0.921). Based on this, we generated a web calculator by combining five high importance predictive factors. The LightGBM model was confirmed to be efficient and stable in predicting the mortality risk of patients with SCAP admitted to the ICU. The web calculator based on the LightGBM model can provide clinicians with a prognostic evaluation tool.
Keywords: Intensive care unit; Machine learning; Mortality risk prediction; Severe community-acquired pneumonia.
© 2025. The Author(s).