基于机器学习的肝移植术后糖尿病风险评估模型的构建与验证
DOI: 10.12449/JCH260822
Construction and validation of a machine learning-based risk assessment model for post-transplant diabetes mellitus
-
摘要:
目的 构建并验证基于多种机器学习算法的肝移植术后糖尿病(PTDM)风险评估模型,以实现PTDM的早期识别。 方法 回顾性收集山西医科大学第一医院2020年4月1日—2024年12月31日行同种异体肝移植患者的临床资料。按照7∶3比例随机分为训练集和测试集,采用Lasso回归分析结合5折交叉验证进行特征选择。在训练集中分别构建逻辑斯谛回归(LR)、决策树(DT)、朴素贝叶斯(NB)、随机森林(RF)、K-近邻(KNN)、极端梯度提升(XGBoost)和自适应提升(AdaBoost)共7种机器学习模型。在测试集中采用准确率、精确率、召回率、特异度、F1分数、受试者操作特征曲线下面积(AUROC)、精确率-召回率曲线下面积(AUPRC)等方法比较各模型的预测性能,并采用Brier评分与决策曲线分析评估模型的校准度和临床实用价值,使用沙普利加性解释(SHAP)方法进行特征重要性分析。计量资料两组间比较采用成组t检验或Wilcoxon秩和检验。计数资料两组间比较采用χ2检验或Fisher精确检验。 结果 共纳入135例肝移植受者,其中26例发生PTDM;训练集94例,测试集41例。特征提取筛选得到性别、超重或肥胖、无肝期、手术时长、住院时长、术后早期低镁血症以及空腹血糖受损(IFG)共7项特征。在测试集中,XGBoost模型表现最佳,其AUROC为0.907(95%置信区间:0.807~0.989),AUPRC为0.649(95%置信区间:0.339~0.955),准确率为0.878,精确率为0.667,召回率为0.750,F1分数为0.706,特异度为0.909,Brier评分为0.104。决策曲线分析显示,当阈值概率低于0.667时,使用XGBoost模型进行临床决策可获得较高的净获益。SHAP分析显示,特征重要性排序依次为住院时长、手术时长、超重或肥胖、性别、IFG、无肝期及术后早期低镁血症。 结论 基于XGBoost算法构建的肝移植受者PTDM风险评估模型表现优异,能够有效识别潜在的高风险人群,但其泛化能力仍需多中心、大样本数据进一步验证。 Abstract:Objective To construct and validate a risk assessment model for post-transplant diabetes mellitus (PTDM) using multiple machine learning algorithms, and to realize the early identification of PTDM. Methods A retrospective analysis was performed for the clinical data of the patients who underwent allogeneic liver transplantation in The First Hospital of Shanxi Medical University from April 1, 2020 to December 31, 2024, and they were randomly divided into a training set and a validation set at a ratio of 7∶3. The LASSO regression analysis combined with 5-fold cross-validation was used for feature selection. Seven machine learning models were developed in the training set, i.e., logistic regression (LR), decision tree (DT), Naive Bayes (NB), random forest (RF), K-nearest neighbor (KNN), extreme gradient boosting (XGBoost), and adaptive boosting (AdaBoost). In the validation set, various methods were used to assess the predictive performance of each model, such as accuracy, precision, recall rate, specificity, F1 score, area under the receiver operating characteristic curve (AUROC), and area under the precision-recall curve (AUPRC). The Brier score and decision curve analysis were used to assess the calibration and clinical practicability of the models, and the SHAP method was used to analyze feature importance. The independent-samples t test or the Wilcoxon rank-sum test was used for comparison of continuous data between two groups, and the chi-square test or the Fisher’s exact test was used for comparison of categorical data between two groups. Results A total of 135 liver transplant recipients were enrolled, among whom 26 developed PTDM, and there were 94 patients in the training set and 41 in the validation set. Feature extraction and screening identified 7 key features of sex, overweight or obesity, anhepatic phase, time of operation, length of hospital stay, early postoperative hypomagnesemia, and impaired fasting glucose (IFG). In the validation set, the XGBoost model showed the best predictive performance, with an AUROC of 0.907 (95% confidence interval [CI]: 0.807 — 0.989), an AUPRC of 0.649 (95%CI: 0.339 — 0.955), an accuracy of 0.878, a precision of 0.667, a recall rate of 0.750, an F1-score of 0.706, a specificity of 0.909, and a Brier score of 0.104. The decision curve analysis showed that when the threshold probability was below 0.667, application of the XGBoost model in clinical decision-making provided relatively high net benefit. The SHAP analysis showed that the length of hospital stay ranked first in terms of feature importance, followed by time of operation, overweight or obesity, sex, IFG, anhepatic phase, and early postoperative hypomagnesemia. Conclusion The risk assessment model for PTDM in liver transplant recipients based on XGBoost algorithm has excellent performance and can effectively identify high-risk individuals; however, multicenter large-sample data are needed for further validation. -
Key words:
- Liver Transplantation /
- Diabetes Mellitus /
- Machine Learning /
- Models, Statistical
-
表 1 PTDM组与非PTDM组患者特征比较
Table 1. Comparison of baseline characteristics between patients in the PTDM and non-PTDM groups
项目 非PTDM组(n=109) PTDM组(n=26) 统计值 P值 年龄[例(%)] χ2=0.50 0.479 <45岁 31(28.4) 5(19.2) ≥45岁 78(71.6) 21(80.8) 性别[例(%)] χ2=1.89 0.169 男 84(77.1) 16(61.5) 女 25(22.9) 10(38.5) 超重或肥胖[例(%)] χ2=3.99 0.046 否 68(62.4) 10(38.5) 是 41(37.6) 16(61.5) 高血压[例(%)] χ2=0.08 0.784 否 93(85.3) 21(80.8) 是 16(14.7) 5(19.2) 术前IFG[例(%)]1) χ2=9.09 0.003 否 78(83.0) 11(50.0) 是 16(17.0) 11(50.0) 血型[例(%)] 0.691 A型 29(26.6) 5(19.2) B型 33(30.3) 11(42.3) AB型 8(7.3) 2(7.7) O型 39(35.8) 8(30.8) 原发疾病[例(%)] 0.866 乙型肝炎肝硬化 50(45.9) 13(50.0) 丙型肝炎肝硬化 4(3.7) 0(0.0) 酒精性肝硬化 18(16.5) 3(11.5) 自身免疫性肝硬化 8(7.3) 3(11.5) 其他 29(26.6) 7(26.9) 是否合并肿瘤[例(%)] χ2=0.50 0.479 否 78(71.6) 21(80.8) 是 31(28.4) 5(19.2) 腹腔积液[例(%)]1) χ2=0.38 0.827 无 35(33.0) 9(34.6) 轻度 36(34.0) 10(38.5) 中-重度 35(33.0) 7(26.9) 乙型肝炎病毒感染[例(%)] χ2=0.00 >0.05 否 58(53.2) 14(53.8) 是 51(46.8) 12(46.2) 丙型肝炎病毒感染[例(%)]1) >0.05 否 104(96.3) 25(96.2) 是 4(3.7) 1(3.8) 巨细胞病毒感染[例(%)]1) 0.400 否 90(93.8) 23(88.5) 是 6(6.3) 3(11.5) 总胆红素(μmol/L) 53.3(28.0~129.9) 66.7(36.8~156.6) Z=-0.60 0.547 白蛋白[例(%)] χ2=0.74 0.391 <30 g/L 30(27.5) 10(38.5) ≥30 g/L 79(72.5) 16(61.5) 表 1 (续)
Table 1. (continued)
项目 非PTDM组(n=109) PTDM组(n=26) 统计值 P值 术前低镁血症[例(%)]1) χ2=0.35 0.556 否 64(78.0) 13(68.4) 是 18(22.0) 6(31.6) 尿素(mmol/L) 5.2(3.9~7.3) 5.7(3.8~7.6) Z=-0.59 0.558 肌酐(μmol/L) 59.3(49.6~74.0) 59.5(46.5~73.5) Z=0.29 0.770 手术时长[例(%)]1) χ2=6.65 0.010 <10 h 71(68.3) 10(38.5) ≥10 h 33(31.7) 16(61.5) 无肝期[例(%)]1) χ2=2.66 0.103 <1 h 88(84.6) 17(68.0) ≥1 h 16(15.4) 8(32.0) 住院时长[例(%)]1) 0.002 <25 d 54(50.5) 4(15.4) ≥25 d 53(49.5) 22(84.6) 术后早期低镁血症[例(%)]1) 0.043 否 22(22.0) 1(3.8) 是 78(78.0) 25(96.2) 术后早期感染[例(%)]1) χ2=0.00 >0.05 否 37(34.6) 9(34.6) 是 70(65.4) 17(65.4) 注:1)受回顾性研究的限制,指标存在缺失值,但缺失率<30%。PTDM,移植后糖尿病;IFG,空腹血糖受损。
表 2 测试集中7种机器学习模型的性能比较
Table 2. Performance comparison of seven machine learning models in the test set
模型 准确率 精确率 召回率 F1分数 特异度 AUROC(95%CI) AUPRC(95%CI) LR 0.610 0.333 1.000 0.500 0.515 0.915(0.806~0.989) 0.733(0.396~0.965) DT 0.854 0.625 0.625 0.625 0.909 0.892(0.777~0.976) 0.552(0.264~0.900) NB 0.634 0.348 1.000 0.516 0.546 0.899(0.786~0.976) 0.694(0.356~0.921) RF 0.829 0.571 0.500 0.533 0.909 0.911(0.805~0.987) 0.656(0.333~0.958) KNN 0.585 0.286 0.750 0.414 0.546 0.769(0.564~0.922) 0.431(0.171~0.731) XGBoost 0.878 0.667 0.750 0.706 0.909 0.907(0.807~0.989) 0.649(0.339~0.955) AdaBoost 0.829 0.546 0.750 0.632 0.849 0.896(0.777~0.986) 0.687(0.376~0.960) 注:LR,逻辑斯谛回归;DT,决策树;NB,朴素贝叶斯;RF,随机森林;KNN,K-近邻;XGBoost,极端梯度提升;AdaBoost,自适应提升;AUROC,受试者操作特征曲线下面积;AUPRC,精确率-召回率曲线下面积;95%CI,95%置信区间。
-
[1] Xia Qiang, Feng Hao. Current status and challenges of liver transplantation oncology[J]. Chin J Dig Surg, 2026, 25( 1): 69- 75. DOI: 10.3760/cma.j.cn115610-20251106-00677.夏强, 冯浩. 肝脏移植肿瘤学的现状与挑战[J]. 中华消化外科杂志, 2026, 25( 1): 69- 75. DOI: 10.3760/cma.j.cn115610-20251106-00677. [2] Chen Yining, Xiao Yun, Han Xiaoyu, et al. Diagnosis and individualized drug therapy for the rejection with hy-perglycemia after liver Transplantation[J]. Chin J Clin Pharmacol Ther, 2023, 28( 5): 550- 555. DOI: 10.12092/j.issn.1009-2501.2023.05.009.陈以宁, 肖云, 韩晓雨, 等. 肝移植术后排斥合并高血糖的诊治和用药的实践与思考[J]. 中国临床药理学与治疗学, 2023, 28( 5): 550- 555. DOI: 10.12092/j.issn.1009-2501.2023.05.009. [3] Chin Y H, Tan H Q M, Ng C H, et al. A time-based meta-analysis on the incidence of new onset diabetes after liver transplantation[J]. J Clin Med, 2021, 10( 5): 1045. DOI: 10.3390/jcm10051045. [4] Ling Q, Xu X, Xie H Y, et al. New-onset diabetes after liver transplantation: A national report from China Liver Transplant Registry[J]. Liver Int, 2016, 36( 5): 705- 712. DOI: 10.1111/liv.13042. [5] Richardson B, Khan M Q, Brown S A, et al. Personalizing diabetes management in liver transplant recipients: The new era for optimizing risk management[J]. Hepatol Commun, 2022, 6( 6): 1250- 1261. DOI: 10.1002/hep4.1876. [6] Sarabhai T, Mathew A, Rashidi-Alavijeh J, et al. Diabetes mellitus and osteoporosis after organ transplantation: Frequency, clinical features, and treatment[J]. Dtsch Arztebl Int, 2026, 123( 10): 281- 288. DOI: 10.3238/arztebl.m2026.0019. [7] Park S S, Koo B K, Park S, et al. Impact of new-onset diabetes after transplantation on cardiovascular risk and mortality in Korea: A nationwide population-based study[J]. Diabetes Metab J, 2025, 49( 1): 117- 127. DOI: 10.4093/dmj.2024.0078. [8] Liu Yingchun, Yang Bin. Research progress on the application of artificial intelligence in liver transplantation[J]. Organ Transplant, 2024, 15( 6): 883- 888. DOI: 10.3969/j.issn.1674-7445.2024084.刘迎春, 杨斌. 人工智能在肝移植中的应用研究进展[J]. 器官移植, 2024, 15( 6): 883- 888. DOI: 10.3969/j.issn.1674-7445.2024084. [9] Sharif A, Hecking M, de Vries A P, et al. Proceedings from an international consensus meeting on posttransplantation diabetes mellitus: Recommendations and future directions[J]. Am J Transplant, 2014, 14( 9): 1992- 2000. DOI: 10.1111/ajt.12850. [10] Dong Junfeng, Xue Qiang, Teng Fei, et al. Research progress in risk factors of post-transplantation diabetes mellitus[J]. Organ Transplant, 2024, 15( 1): 145- 150. DOI: 10.3969/j.issn.1674-7445.2023154.董骏峰, 薛强, 滕飞, 等. 移植后糖尿病危险因素研究进展[J]. 器官移植, 2024, 15( 1): 145- 150. DOI: 10.3969/j.issn.1674-7445.2023154. [11] Branch of Organ Transplantation of Chinese Medical Association. Diagnosis and treatment specification for immunosuppressive therapy and rejection of liver transplantation in China(2019 edition)[J]. Organ Transplant, 2021, 12( 1): 8- 14, 28. DOI: 10.3969/j.issn.1674-7445.2021.01.002.中华医学会器官移植学分会. 中国肝移植免疫抑制治疗与排斥反应诊疗规范(2019版)[J]. 器官移植, 2021, 12( 1): 8- 14, 28. DOI: 10.3969/j.issn.1674-7445.2021.01.002. [12] Shimada S, Miyake K, Venkat D, et al. Clinical characteristics of new-onset diabetes after liver transplantation and outcomes[J]. Ann Gastroenterol Surg, 2024, 8( 3): 383- 393. DOI: 10.1002/ags3.12775. [13] Li D W, Lu T F, Hua X W, et al. Risk factors for new onset diabetes mellitus after liver transplantation: A meta-analysis[J]. World J Gastroenterol, 2015, 21( 20): 6329- 6340. DOI: 10.3748/wjg.v21.i20.6329. [14] Dascal R, Wiebe C, Niazi M, et al. Post-transplant diabetes mellitus in Canadian liver and renal transplant recipients[J]. Can Liver J, 2022, 5( 4): 466- 475. DOI: 10.3138/canlivj-2022-0010. [15] Liang J, Yi X L, Xue M J, et al. A retrospective cohort study of preoperative lipid indices and their impact on new-onset diabetes after liver transplantation[J]. J Clin Lab Anal, 2020, 34( 5): e23192. DOI: 10.1002/jcla.23192. [16] Shang Ying, Shao Fei, Kong Xinjuan. An analysis of risk factors for the development of diabetes mellitus after orthotopic liver transplantation in adults[J]. J Precis Med, 2024, 39( 4): 341- 345, 351. DOI: 10.13362/j.jpmed.202404013.尚莹, 邵非, 孔心涓. 成人原位肝移植术后糖尿病发生的危险因素分析[J]. 精准医学杂志, 2024, 39( 4): 341- 345, 351. DOI: 10.13362/j.jpmed.202404013. [17] Bai R P, An R, Chen S Y, et al. Risk factors and prediction score for new-onset diabetes mellitus after liver transplantation[J]. J Diabetes Investig, 2024, 15( 8): 1105- 1114. DOI: 10.1111/jdi.14204. [18] Chen S J, Bowen D G, Liu K, et al. Hypomagnesaemia, an independent risk factor for the development of post-transplant diabetes mellitus in liver and renal transplant recipients A systematic review[J]. J Hum Nutr Diet, 2024, 37( 6): 1407- 1419. DOI: 10.1111/jhn.13354. [19] Porrini E L, Díaz J M, Moreso F, et al. Clinical evolution of post-transplant diabetes mellitus[J]. Nephrol Dial Transplant, 2016, 31( 3): 495- 505. DOI: 10.1093/ndt/gfv368. [20] Lou Lianyu, Li Shujuan, Zhang Bingliang, et al. Construction and validation of a random forest-based prediction model for post-liver transplant diabetes mellitus[J]. J Nurs, 2026, 33( 1): 60- 67. DOI: 10.16460/j.issn2097-6569.2026.01.060.娄连玉, 李树娟, 张丙良, 等. 基于随机森林的肝移植术后糖尿病风险预测模型的构建与验证[J]. 护理学报, 2026, 33( 1): 60- 67. DOI: 10.16460/j.issn2097-6569.2026.01.060. [21] Loosen S H, Krieg S, Chaudhari S, et al. Prediction of new-onset diabetes mellitus within 12 months after liver transplantation-a machine learning approach[J]. J Clin Med, 2023, 12( 14): 4877. DOI: 10.3390/jcm12144877. [22] Liang Zhixing, Ye Linsen, Yang Yang. Application of artificial intelligence in liver transplantation[J]. J Clin Hepatol, 2022, 38( 1): 30- 34. DOI: 10.3969/j.issn.2095-5332.2024.06.016.梁智星, 叶林森, 杨扬. 人工智能在肝移植中的应用[J]. 临床肝胆病杂志, 2022, 38( 1): 30- 34. DOI: 10.3969/j.issn.2095-5332.2024.06.016. -

PDF下载 ( 2374 KB)
下载:
