Development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitus

ObjectiveOsteoporosis is a common complication in patients with type 2 diabetes mellitus (T2DM), yet its screening rate remains low. This study aimed to develop and validate a cost-effective and interpretable machine learning (ML) model to predict the risk of osteoporosis in patients with T2DM.Metho...

Full description

Saved in:
Bibliographic Details
Main Authors: Qipeng Wei, Zihao Liu, Xiaofeng Chen, Hao Li, Weijun Guo, Qingyan Huang, Jinxiang Zhan, Shiji Chen, Dongling Cai
Format: Article
Language:English
Published: Frontiers Media S.A. 2025-08-01
Series:Frontiers in Endocrinology
Subjects:
Online Access:https://www.frontiersin.org/articles/10.3389/fendo.2025.1611499/full
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850035408019128320
author Qipeng Wei
Zihao Liu
Xiaofeng Chen
Hao Li
Weijun Guo
Qingyan Huang
Jinxiang Zhan
Shiji Chen
Dongling Cai
Dongling Cai
author_facet Qipeng Wei
Zihao Liu
Xiaofeng Chen
Hao Li
Weijun Guo
Qingyan Huang
Jinxiang Zhan
Shiji Chen
Dongling Cai
Dongling Cai
author_sort Qipeng Wei
collection DOAJ
description ObjectiveOsteoporosis is a common complication in patients with type 2 diabetes mellitus (T2DM), yet its screening rate remains low. This study aimed to develop and validate a cost-effective and interpretable machine learning (ML) model to predict the risk of osteoporosis in patients with T2DM.MethodsThis retrospective study included 1560 inpatients who underwent dual-energy X-ray absorptiometry (DXA) between January 2022 and December 2023 at Panyu Hospital of Chinese Medicine. Demographic information and laboratory test results obtained within 24 hours of hospital admission were collected. Potential predictive features were identified using univariate analysis, least absolute shrinkage and selection operator (LASSO) regression, and the Boruta algorithm. Eight supervised ML algorithms were applied to construct predictive models. Model performance was evaluated based on the area under the receiver operating characteristic curve (AUC), calibration plots, decision curve analysis (DCA), accuracy, sensitivity, specificity, and F1 score. The SHapley Additive exPlanations (SHAP) method was used to interpret the model and visualize feature importance.ResultsTen predictive features were selected based on the intersection of the three feature selection methods. Among the tested models, logistic regression achieved the best overall performance, with an AUC of 0.812, an accuracy of 0.762, a sensitivity of 0.809, a specificity of 0.761, and an F1 score of 0.771 in the validation set. Calibration plots and DCA curves demonstrated good agreement and the highest net clinical benefit. SHAP analysis identified age, sex, alkaline phosphatase, uric acid, hemoglobin, and neutrophil count as the six most influential features. An easy-to-use, web-based risk calculator was developed based on the logistic model and is available at: https://t2dm.shinyapps.io/t2dm-osteoporosis/.ConclusionWe developed an interpretable and accessible ML-based online tool that enables preliminary screening of osteoporosis risk in patients with T2DM using routine blood indicators. This tool may assist clinicians in early risk identification and reduce the underdiagnosis of osteoporosis.
format Article
id doaj-art-a3331e1640f542bebfbb479cbdef4366
institution DOAJ
issn 1664-2392
language English
publishDate 2025-08-01
publisher Frontiers Media S.A.
record_format Article
series Frontiers in Endocrinology
spelling doaj-art-a3331e1640f542bebfbb479cbdef43662025-08-20T02:57:30ZengFrontiers Media S.A.Frontiers in Endocrinology1664-23922025-08-011610.3389/fendo.2025.16114991611499Development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitusQipeng Wei0Zihao Liu1Xiaofeng Chen2Hao Li3Weijun Guo4Qingyan Huang5Jinxiang Zhan6Shiji Chen7Dongling Cai8Dongling Cai9Department of Orthopedics, Panyu Hospital of Chinese Medicine, Guangzhou, ChinaPanyu Hospital of Chinese Medicine, Guangzhou University of Chinese Medicine, Guangzhou, ChinaDepartment of Orthopedics, Panyu Hospital of Chinese Medicine, Guangzhou, ChinaDepartment of Orthopedics, Panyu Hospital of Chinese Medicine, Guangzhou, ChinaDepartment of Orthopedics, Panyu Hospital of Chinese Medicine, Guangzhou, ChinaDepartment of Orthopedics, Panyu Hospital of Chinese Medicine, Guangzhou, ChinaDepartment of Orthopedics, Panyu Hospital of Chinese Medicine, Guangzhou, ChinaPanyu Hospital of Chinese Medicine, Guangzhou University of Chinese Medicine, Guangzhou, ChinaDepartment of Orthopedics, Panyu Hospital of Chinese Medicine, Guangzhou, ChinaPanyu Hospital of Chinese Medicine, Guangzhou University of Chinese Medicine, Guangzhou, ChinaObjectiveOsteoporosis is a common complication in patients with type 2 diabetes mellitus (T2DM), yet its screening rate remains low. This study aimed to develop and validate a cost-effective and interpretable machine learning (ML) model to predict the risk of osteoporosis in patients with T2DM.MethodsThis retrospective study included 1560 inpatients who underwent dual-energy X-ray absorptiometry (DXA) between January 2022 and December 2023 at Panyu Hospital of Chinese Medicine. Demographic information and laboratory test results obtained within 24 hours of hospital admission were collected. Potential predictive features were identified using univariate analysis, least absolute shrinkage and selection operator (LASSO) regression, and the Boruta algorithm. Eight supervised ML algorithms were applied to construct predictive models. Model performance was evaluated based on the area under the receiver operating characteristic curve (AUC), calibration plots, decision curve analysis (DCA), accuracy, sensitivity, specificity, and F1 score. The SHapley Additive exPlanations (SHAP) method was used to interpret the model and visualize feature importance.ResultsTen predictive features were selected based on the intersection of the three feature selection methods. Among the tested models, logistic regression achieved the best overall performance, with an AUC of 0.812, an accuracy of 0.762, a sensitivity of 0.809, a specificity of 0.761, and an F1 score of 0.771 in the validation set. Calibration plots and DCA curves demonstrated good agreement and the highest net clinical benefit. SHAP analysis identified age, sex, alkaline phosphatase, uric acid, hemoglobin, and neutrophil count as the six most influential features. An easy-to-use, web-based risk calculator was developed based on the logistic model and is available at: https://t2dm.shinyapps.io/t2dm-osteoporosis/.ConclusionWe developed an interpretable and accessible ML-based online tool that enables preliminary screening of osteoporosis risk in patients with T2DM using routine blood indicators. This tool may assist clinicians in early risk identification and reduce the underdiagnosis of osteoporosis.https://www.frontiersin.org/articles/10.3389/fendo.2025.1611499/fullosteoporosistype 2 diabetes mellitusexplainable machine learningpredictive modelrisk assessment
spellingShingle Qipeng Wei
Zihao Liu
Xiaofeng Chen
Hao Li
Weijun Guo
Qingyan Huang
Jinxiang Zhan
Shiji Chen
Dongling Cai
Dongling Cai
Development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitus
Frontiers in Endocrinology
osteoporosis
type 2 diabetes mellitus
explainable machine learning
predictive model
risk assessment
title Development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitus
title_full Development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitus
title_fullStr Development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitus
title_full_unstemmed Development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitus
title_short Development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitus
title_sort development and validation of an explainable machine learning model for predicting osteoporosis in patients with type 2 diabetes mellitus
topic osteoporosis
type 2 diabetes mellitus
explainable machine learning
predictive model
risk assessment
url https://www.frontiersin.org/articles/10.3389/fendo.2025.1611499/full
work_keys_str_mv AT qipengwei developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT zihaoliu developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT xiaofengchen developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT haoli developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT weijunguo developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT qingyanhuang developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT jinxiangzhan developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT shijichen developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT donglingcai developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus
AT donglingcai developmentandvalidationofanexplainablemachinelearningmodelforpredictingosteoporosisinpatientswithtype2diabetesmellitus