Construction and performance evaluation of a predictive model for urinary tract infection in patients with cervical spine fracture based on random forest algorithm
10.3760/cma.j.cn501098-20250410-00204
- VernacularTitle:基于随机森林算法的颈椎骨折患者尿路感染预测模型构建及效能评价
- Author:
Na WANG
1
;
Peifang LI
;
Xin LIU
;
Liqun WANG
;
Ning NING
;
Jiali CHEN
Author Information
1. 四川大学华西护理学院/四川大学华西医院骨科,成都 610041
- Publication Type:Journal Article
- Keywords:
Spinal fractures;
Urinary tract infections;
Models, statistical;
Machine learning
- From:
Chinese Journal of Trauma
2025;41(9):832-839
- CountryChina
- Language:Chinese
-
Abstract:
Objective:To construct a predictive model for urinary tract infection in patients with cervical spine fracture based on the random forest (RF) algorithm and evaluate its predictive performance.Methods:A retrospective cohort study was conducted to analyze the clinical data of 400 patients with cervical spine fracture admitted to West China Hospital of Sichuan University from October 2020 to February 2025, including 311 males and 89 females, aged 12-87 years [(48.5±14.8)years]. According to the occurrence of urinary tract infection during hospital stay, the patients were divided into urinary tract infection group ( n=57) and non-urinary tract infection group ( n=343). General information, disease-related data, and serological laboratory indicators during hospital stay were recorded in both groups. Viriables for urinary tract infection in patients with cervical spine fracture were analyzed and identified through univariate analysis and Lasso regression analysis. Using the bootstrap method with 500 resamples, the data were randomly allocated into the training set ( n=281) and test set ( n=119) at a ratio of 7∶3. An RF prediction model for urinary tract infection in patients with cervical spine fracture was constructed in the training set and the variable importance for the model was calculated. The constructed RF prediction model was validated in the test set, with the predictive accuracy, sensitivity, specificity, and the area under the receiver operating characteristic (ROC) curve (AUC) calculated to evaluate its predictive performance. Results:Univariate analysis showed that age, body mass index (BMI), length of hospital stay, concurrent hepatic impairment, concurrent benign prostatic hyperplasia, indwelling catheterization, duration of indwelling catheterization, immunosuppressant use, fracture site, cervical spinal cord injury, Frankel grade, time from injury to surgery, red blood cell count (RBC), hemoglobin (Hb), white blood cell count (WBC), albumin (Alb), globulin (GLO), blood urea nitrogen (BUN), and C-reactive protein (CRP) were significantly associated with urinary tract infection in patients with cervical spine fracture ( P<0.05). Among them, 9 viriables screened through Lasso regression analysis were age, length of hospital stay, concurrent hepatic impairment, concurrent benign prostatic hyperplasia, indwelling catheterization, duration of indwelling catheterization, Frankel grade, time from injury to surgery, and RBC. Based on the 9 viriables, a predictive model for urinary tract infection in patients with cervical spine fracture was constructed using the RF algorithm. Based on the mean decrease in Gini coefficient in the RF model, the top 6 important variables were duration of indwelling catheterization, length of hospital stay, RBC, age, time from injury to surgery, and Frankel grade in sequence. In the test set, the model achieved a prediction accuracy of 87.4%, sensitivity of 88.2%, specificity of 82.4%, and AUC of 0.89 (95% CI 0.80, 0.93). Conclusion:The RF prediction model for urinary tract infection in patients with cervical spine fracture is constructed based on 9 predictors including duration of indwelling catheterization, length of hospital stay, RBC, age, time from injury to surgery, Frankel grade, concurrent hepatic impairment, concurrent benign prostatic hyperplasia, and indwelling catheterization, with the first 6 viriables ranked as the most important factors, and demonstrates favorable predictive performance.