Machine learning algorithms for predicting postoperative hospital stay in elderly patients with acute cholecystitis
Objective:To explore the main influencing factors and predictors of postoperative hospital stay (POHS) in elderly patients with acute cholecystitis (AC), and compare the advantages and disadvantages of machine learning algorithms (MLAs) and multiple linear regression (MLR) in establishing prediction models for POHS.Methods:The clinical data of 287 elderly AC patients treated by general surgery at Beijing Electric Power Hospital from August 2013 to July 2022 were retrospectively analyzed. Based on the duration of POHS, the patients were divided into a normal duration (ND) group (POHS≤6 days) and a long duration (LD) group (POHS>6 days). Prediction models were built using MLAs and MLR to explore the relationship between perioperative variables and POHS, and receiver operating characteristic (ROC) curve analysis was performed to assess the prediction performance of the models.Results:Based on the clinical data of 287 elderly patients with AC surgery, POHS prediction models were established using the MLAs logistic regression (LR), decision tree (DT), naive Bayes (NB), random forest (RF), and K nearest neighbor (KNN), and ROC curves were plotted. The accuracy rates of these models were 87.9%, 84.4%, 86.2%, 91.3%, and 74.1%, and their AUC (area under the curve) values were 0.964, 0.707, 0.973, 0.978, and 0.816, respectively, indicating that these five MLA prediction models all had good prediction performance for POHS. MLR suggested that the combination of diabetes, decreased preoperative serum albumin (ALB), high intraoperative blood loss, postoperative pathological report of suppuration or gangrene of the gallbladder, and postoperative complications were independent risk factors for POHS in elderly patients with AC after surgery. ROC curve analysis showed that the AUC values of preoperative ALB and intraoperative blood loss for POHS prediction were 0.726 and 0.778, with the cut-off values of 37.35 g/L and 12.50 ml, respectively. Comparing the prediction models developed based on MLAs and MLR, it was found that MLAs had obvious advantages in the predictive accuracy for POHS, with the RF algorithm having the highest accuracy. MLR can more intuitively display the independent risk factors of the prediction model.Conclusion:The RF algorithm can more accurately predict POHS in elderly AC patients. MLR suggests that diabetes, preoperative ALB reduction, high intraoperative blood loss, postoperative pathological reports of gallbladder suppuration or gangrene, and postoperative complications are independent predictors of POHS prolongation. Therefore, timely and effective prevention and treatment measures can shorten POHS, improve medical quality and service efficiency, and are of great clinical significance.