BackgroundScores for predicting the long-term mortality of severe pneumonia are lacking. The purpose of this study is to use machine learning methods to develop new pneumonia scores to predict the 1-year mortality and hospital mortality of pneumonia patients on admission to the intensive care unit (ICU). MethodsThe study population was screened from the MIMIC-IV and eICU databases. The main outcomes evaluated were 1-year mortality and hospital mortality in the MIMIC-IV database and hospital mortality in the eICU database. From the full data set, we separated patients diagnosed with community-acquired pneumonia (CAP) and ventilator-associated pneumonia (VAP) for subgroup analysis. We used common shallow machine learning algorithms, including logistic regression, decision tree, random forest, multilayer perceptron and XGBoost. ResultsThe full data set of the MIMIC-IV database contained 4697 patients, while that of the eICU database contained 13760 patients. We defined a new pneumonia score, the "Integrated CCI-APS", using a multivariate logistic regression model including six variables: metastatic solid tumor, Charlson Comorbidity Index, readmission, congestive heart failure, age, and Acute Physiology Score III. The area under the curve (AUC) and accuracy of the integrated CCI-APS were assessed in three data sets (full, CAP, and VAP) using both the test set derived from the MIMIC-IV database and the external validation set derived from the eICU database. The AUC value ranges in predicting 1-year and hospital mortality were 0.784–0.797 and 0.691–0.780, respectively, and the corresponding accuracy ranges were 0.723–0.725 and 0.641–0.718, respectively. ConclusionsThe main contribution of this study was a benchmark for using machine learning models to build pneumonia scores. Based on the idea of integrated learning, we propose a new integrated CCI-APS score for severe pneumonia. In the prediction of 1-year mortality and hospital mortality, our new pneumonia score outperformed the existing score.