Abstract
BACKGROUND: Hip fractures in older adults pose a global health challenge. Deep vein thrombosis (DVT) is common, increasing surgical risk, delaying procedures, and causing severe thromboembolic events. It hampers recovery and lowers the quality of life. Prompt risk assessment and intervention are crucial. This study aims to develop and validate a machine learning model to predict DVT before surgery in elderly hip fracture patients, aiming to improve preoperative assessments and streamline clinical care pathways. MATERIALS AND METHODS: This study employed a retrospective design and included elderly patients who were hospitalized for hip fractures at a university-affiliated hospital between July 2022 and May 2025. A total of 782 patients met the inclusion criteria. The dataset was randomly divided into a training set (70%) and a validation set (30%). Five supervised machine learning algorithms were used to develop predictive models: decision tree (DT), extreme gradient boosting (XGBoost), support vector machine (SVM), light gradient boosting machine (LightGBM), and logistic regression (LR). Model performance was evaluated on the basis of discrimination, calibration, and clinical applicability, with SHAP analysis used for interpretability. RESULTS: Among the 782 elderly patients with hip fractures, 186 (23.8%) DVT. Five features were selected for model construction: injury-to-admission time, D-dimer levels, hemoglobin levels, albumin levels, and activated partial thromboplastin time (APTT). Among all models, XGBoost achieved superior predictive accuracy, yielding an area under the receiver operating characteristic curve (AUC) of 0.829 (95% CI: 0.788-0.870) on the training set and 0.808 (95% CI: 0.742-0.874) on the validation set. Calibration curve assessment validated the model's strong agreement between predicted and observed outcomes, and decision curve analysis (DCA) demonstrated notable clinical advantages. CONCLUSION: The XGBoost-based predictive model for preoperative DVT in elderly patients with hip fractures demonstrated superior performance. By integrating the SHAP method to enhance model interpretability and developing an intuitive web-based tool, the model's clinical applicability was markedly improved. This predictive tool holds promise for assisting clinicians in risk assessment and guiding medical decision-making.