Abstract:Objective To analyze the risk factors for inadequate bowel preparation for colonoscopy and to construct a risk prediction model based on Extreme Gradient Boosting (XGBoost). Methods A total of 1,133 patients scheduled for colonoscopy were conve-niently selected and received a standard bowel preparation regimen.Quality of bowel preparation was assessed during the examination using the Boston Bowel Preparation Scale, and relevant influencing factors were collected.The samples were randomly divided into a training set (n=793) and a validation set (n=340) at a ratio of 7∶3.Lasso regression was applied to the training set data to screen and reduce the dimensionality of the relevant influencing factors.A prediction model was then constructed using XGBoost.The validation set was used for model validation and evaluation.SHapley Additive exPlanations (SHAP) was employed to visualize the overall contribution of each risk factor to the prediction model. Results The rate of inadequate bowel preparation was 17.4%.The prediction model established based on XGBoost showed that the areas under the receiver operating characteristic curve were 0.689 (95%CI:0.635-0.744) for the training set and 0.608 (95%CI:0.428-0.787) for the validation set.The sensitivities were 0.815 and 0.798, respectively.Gender, ASA classification, chronic constipation, use of medicines that may contribute to changing bowel habits, BMI, diabetes, opiate use, antidepressant use, history of abdominal or pelvic surgery, and hypertension were identified as risk factors for inadequate bowel preparation.Among these, the first six factors contributed more significantly. Conclusion The XGBoost-based risk prediction model for inadequate bowel preparation for colonoscopy has good predictive perfor-mance and can be used to identify patients at high risk.