Xiu Dai BS , Shifang Liu MM , Xiangyuan Chu BS , Xuheng Jiang MM , Weihang Chen BS , Guojia Qi MM , Shimin Zhao BS , Yanna Zhou MM , Xiuquan Shi PhD
{"title":"Evaluation and comparison of machine learning algorithms for predicting discharge against medical advice in injured inpatients","authors":"Xiu Dai BS , Shifang Liu MM , Xiangyuan Chu BS , Xuheng Jiang MM , Weihang Chen BS , Guojia Qi MM , Shimin Zhao BS , Yanna Zhou MM , Xiuquan Shi PhD","doi":"10.1016/j.surg.2025.109335","DOIUrl":null,"url":null,"abstract":"<div><h3>Background</h3><div>Whether the application of machine learning algorithms offers an advantage over logistic regression in forecasting discharge against medical advice occurrences needs to be evaluated.</div></div><div><h3>Methods</h3><div>This retrospective study included all inpatient records from January 1, 2018, to December 31, 2023. The foundational data set (2018–2021) was divided into a training set (80%) and a test set (20%) for model construction and internal validation. The temporal validation data set (2022–2023) was used to assess the model's prospective performance. Feature selection was performed using the BorutaShap method. Techniques including random oversampling, random undersampling, synthetic minority oversampling technique, and edited nearest neighbors were applied to address data imbalance. Model performance was evaluated using metrics including the area under the receiver operating characteristic curve, accuracy, specificity, sensitivity, F1 score, and geometric mean. The Shapley Additive Explanations analysis provided interpretation for the best machine learning model.</div></div><div><h3>Results</h3><div>A total of 48,394 inpatient records for injured patients met the study criteria, of which 44,119 were discharged following medical advice and 4,275 chose discharge against medical advice, resulting in a ratio of 10.32:1. Among injury inpatients, 8.8% opted for discharge against medical advice. Based on the results of feature selection and multicollinearity analysis, 16 variables were ultimately selected for the construction and evaluation of the discharge against medical advice model. The light gradient boosting machine + edited nearest neighbors model showed the best generalization, with areas under the curves of 0.820 for internal validation and 0.837 for temporal validation. The Shapley Additive Explanations method was used to interpret the model, indicating that the grade of surgery is the most important variable.</div></div><div><h3>Conclusions</h3><div>The study is the first to use machine learning models to predict discharge against medical advice in injured inpatients, demonstrating its feasibility. In the future, health care institutions can learn from these models to optimize patient management and reduce discharge against medical advice incidents.</div></div>","PeriodicalId":22152,"journal":{"name":"Surgery","volume":"182 ","pages":"Article 109335"},"PeriodicalIF":3.2000,"publicationDate":"2025-03-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Surgery","FirstCategoryId":"3","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0039606025001874","RegionNum":2,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"SURGERY","Score":null,"Total":0}
引用次数: 0
Abstract
Background
Whether the application of machine learning algorithms offers an advantage over logistic regression in forecasting discharge against medical advice occurrences needs to be evaluated.
Methods
This retrospective study included all inpatient records from January 1, 2018, to December 31, 2023. The foundational data set (2018–2021) was divided into a training set (80%) and a test set (20%) for model construction and internal validation. The temporal validation data set (2022–2023) was used to assess the model's prospective performance. Feature selection was performed using the BorutaShap method. Techniques including random oversampling, random undersampling, synthetic minority oversampling technique, and edited nearest neighbors were applied to address data imbalance. Model performance was evaluated using metrics including the area under the receiver operating characteristic curve, accuracy, specificity, sensitivity, F1 score, and geometric mean. The Shapley Additive Explanations analysis provided interpretation for the best machine learning model.
Results
A total of 48,394 inpatient records for injured patients met the study criteria, of which 44,119 were discharged following medical advice and 4,275 chose discharge against medical advice, resulting in a ratio of 10.32:1. Among injury inpatients, 8.8% opted for discharge against medical advice. Based on the results of feature selection and multicollinearity analysis, 16 variables were ultimately selected for the construction and evaluation of the discharge against medical advice model. The light gradient boosting machine + edited nearest neighbors model showed the best generalization, with areas under the curves of 0.820 for internal validation and 0.837 for temporal validation. The Shapley Additive Explanations method was used to interpret the model, indicating that the grade of surgery is the most important variable.
Conclusions
The study is the first to use machine learning models to predict discharge against medical advice in injured inpatients, demonstrating its feasibility. In the future, health care institutions can learn from these models to optimize patient management and reduce discharge against medical advice incidents.
期刊介绍:
For 66 years, Surgery has published practical, authoritative information about procedures, clinical advances, and major trends shaping general surgery. Each issue features original scientific contributions and clinical reports. Peer-reviewed articles cover topics in oncology, trauma, gastrointestinal, vascular, and transplantation surgery. The journal also publishes papers from the meetings of its sponsoring societies, the Society of University Surgeons, the Central Surgical Association, and the American Association of Endocrine Surgeons.