ObjectivesThe assessment of accurate mortality risk is essential for managing pneumonia patients with connective tissue disease (CTD) treated with glucocorticoids or/and immunosuppressants. This study aimed to construct a nomogram for predicting 90-day mortality in pneumonia patients using machine learning.MethodsData were obtained from the DRYAD database. Pneumonia patients with CTD were screened. The samples were randomly divided into a training cohort (70%) and a validation cohort (30%). A univariate Cox regression analysis was used to screen for prognostic variables in the training cohort. Prognostic variables were entered into the least absolute shrinkage and selection operator (Lasso) and a random survival forest (RSF) analysis was used to screen important prognostic variables. The overlapping prognostic variables of the two algorithms were entered into the stepwise Cox regression analysis to screen the main prognostic variables and construct a model. Model predictive power was assessed using the C-index, the calibration curve, and the clinical subgroup analysis (age, gender, interstitial lung disease, diabetes mellitus). The clinical benefits of the model were assessed using a decision curve analysis (DCA). Similarly, the C-index was calculated and the calibration curve was plotted to verify the model stability in the validation cohort.ResultsA total of 368 pneumonia patients with CTD (training cohort: 247; validation cohort: 121) treated with glucocorticoids or/and immunosuppressants were included. The univariate Cox regression analysis obtained 19 prognostic variables. Lasso and RSF algorithms obtained eight overlapping variables. The overlapping variables were entered into a stepwise Cox regression to obtain five variables (fever, cyanosis, blood urea nitrogen, ganciclovir treatment, and anti-pseudomonas treatment), and a prognostic model was constructed based on the five variables. The C-index of the construction nomogram of the training cohort was 0.808. The calibration curve, DCA results, and clinical subgroup analysis showed that the model also had good predictive power. Similarly, the C-index of the model in the validation cohort was 0.762 and the calibration curve had good predictive value.ConclusionIn this study, the nomogram developed performed well in predicting the 90-day risk of death in pneumonia patients with CTD treated with glucocorticoids or/and immunosuppressants.