Community-acquired pneumonia (CAP) is associated with high mortality rates and often results in prolonged hospital stays. The potential of machine learning to enhance prediction accuracy in this context is significant, yet clinicians often lack the programming skills required for effective data mining. This study aimed to assess the effectiveness of a low-code approach for assisting clinicians with data mining for mortality and length of stay (LOS) prediction in patients with CAP. A retrospective study was conducted using a low-code platform and the PyCaret library in Google Colab on data from patients with community-acquired pneumonia (CAP) admitted between January 2013 and December 2021 to two medical facilities. Model performance was assessed using the area under the receiver operating characteristic curve (AUC) for mortality prediction and the R2 score for LOS prediction, with benchmarks set at AUC > 0.9 and R2 > 0.5. The Shapley Additive Explanations (SHAP) method was used for interpreting individual predictions. A total of 669 CAP patients were enrolled in the analysis.Fifteen models were evaluated for mortality prediction, and nineteen models were evaluated for LOS prediction utilizing the PyCaret library. The Light Gradient Boosting Machine model yielded the highest AUC (0.963) for mortality prediction. In predicting LOS, the Extratrees Regressor model achieved the highest R2 score of 0.585. Factors such as the severity of pneumonia and the Charlson Comorbidity Index (CCI) were significant factors influencing mortality. For the LOS, the CCI score, activities of daily living, and social support were significant predictors. The low-code approach enables medical professionals with limited technical expertise to effectively employ data science in their clinical decision-making process. This approach proved to be a valuable tool in the analysis of CAP patient data.
Keywords: Artificial intelligence; Length of stay; Low-coding; Machine learning; Mortality; PyCaret.
© 2024. The Author(s).