Construction of a risk predictive model for aspiration in patients with a nasogastric tube based on machine learning algorithms
Objective To compare the performance of seven machine learning algorithms in predicting the risk of aspiration in patients with a nasogastric tube (NGT). Methods A retrospective analysis was conducted on 352 NGT patients admitted to Department of Hyperbaric Oxygen Medicine in the Second People's Hospital of Hefei between January 2021 and December 2022. Patients were randomly divided into a training set (246 cases) and a validation set (106 cases) at a 7:3 ratio. Independent feature selection was performed using the Boruta algorithm,and seven machine learning algorithms (logistic regression,random forest,decision tree,k-nearest neighbors,light gradient boosting machine,support vector machine,and extreme gradient boosting) were used to develop predictive models. The discriminatory ability of the models was evaluated by the ROC curve,and the best model was selected based on the AUC value,accuracy,sensitivity,specificity,positive predictive value,and negative predictive value. After selecting the optimal model,the variable importance plot from the random forest and shapley additive explanations values were used to explain the contribution of key features to the risk of aspiration. Results Among the 352 patients,102 cases of aspiration occurred,with an incidence rate of 28.98%. Seven predictive models for NGT aspiration risk were constructed in the training and validation sets,with the random forest model demonstrating the best performance in both sets. In the training set,the AUC,accuracy,sensitivity,specificity,positive predictive value,and negative predictive value of the randome forest model were all 1.000. In the validation set,the values were 0.977,0.934,0.882,0.962,0.845,and 0.985,respectively. Conclusion Predictive models for the risk of aspiration in NGT patients were successfully established using machine learning algorithms,with the random forest model showing excellent predictive performance.
Nasogastric tubeAspirationMachine learning algorithmsRandom forestPredictive model