Eight independent predictors of poor treatment response were identified: comorbid diabetes, history of fragility fracture, glucocorticoid use for ≥ 6 months, femoral neck bone mineral density T-score, and serum levels of osteocalcin, procollagen type I N-terminal propeptide, β-CrossLaps of type I collagen (β-CTX), and 25-Hydroxyvitamin D. Among the models, the RF algorithm demonstrated superior performance, with an AUC of 0.856 (95% CI: 0.808-0.905) in the training set and 0.825 (95% CI: 0.718-0.933) in the validation set. The gene discussed is CYP27A1; the disease is diabetes mellitus.