Development and validation of explainable machine learning models for female hip osteoporosis using electronic health
Wanlin Jin1, Lulu Xu2, Chun Yue2
1Health Management Center, National Clinical Research Center for Metabolic Diseases, Hunan Provincial Clinical Medicine Research Center for Intelligent Management of Chronic Disease, Hunan Provincial Key Laboratory of Metabolic Bone Diseases, Department of Metabolism and Endocrinology, The Second Xiangya Hospital of Central South University, Changsha, Hunan, China; Department of General Medicine, The Second Xiangya Hospital of Central South University, Changsha, Hunan, China.
Background:
Hip fractures are associated with reduced mobility, and higher morbidity, mortality, and healthcare costs. Approximately 90% of hip fractures in the elderly are associated with osteoporosis, making it particularly important to screen the population for hip osteoporosis and intervene early. Dual-energy X-ray absorptiometry (DXA) has limited accessibility, so predictive models for hip osteoporosis that do not use bone mineral density (BMD) data are essential. We aimed to develop and validate prediction models for female hip osteoporosis using electronic health records without BMD data.
Methods:
This retrospective study used anonymized medical electronic records, from September 2013 to November 2023, from the Health Management Center of the Second Xiangya Hospital. A total of 8039 women were included in the derivation dataset. The set was then randomized into a 75% training dataset and a 25% testing dataset. Four algorithms for feature selection were used to identify predictors of osteoporosis. The identified predictors were then used to train and optimize eight machine learning models. The models were tuned using 5-fold cross-validation to assess model performance in the testing dataset and the independent validation dataset from the National Health and Nutrition Examination Surveys (NHANES). The SHapley Additive explanation (SHAP) method was used to rank feature importance and explain the final model.
Results:
A combination of the Boruta, LASSO, varSelRF, and RFE methods identified systolic blood pressure, red blood cell count, glycohemoglobin, alanine aminotransferase, aspartate aminotransferase, uric acid, age, and body mass index as the most important predictors of osteoporosis in women. The XGBoost model outperformed the other models, with an Area Under the Curve (AUC) of 0.805 (95%CI: 0.779-0.831), and a moderate sensitivity of 0.706. The externally validated XGBoost model had an AUC of 0.811 (95% CI: 0.793-0.828), with a moderate sensitivity of 0.775.
Conclusions:
The XGBoost model demonstrates high identification performance even without questionnaire data, out-performing both the traditional the logistic regression model and the OSTA model. It can be integrated into routine clinical workflows to identify females at high risk for osteoporosis.


