Development and validation of an explainable web-based machine learning model for predicting early postoperative hypocalcemia in patients with differentiated thyroid cancer.
{"title":"Development and validation of an explainable web-based machine learning model for predicting early postoperative hypocalcemia in patients with differentiated thyroid cancer.","authors":"Jiaqi Ye, Yuanyuan Wang","doi":"10.21037/gs-2026-0211","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Early postoperative hypocalcemia is one of the most common complications after surgery for differentiated thyroid cancer (DTC) and may lead to prolonged hospitalization and impaired postoperative recovery. Most existing prediction tools are based on conventional regression methods and may be insufficient to capture complex interactions among clinical variables. This study aimed to develop and validate an interpretable machine learning model and a web-based calculator for early prediction of postoperative hypocalcemia in patients with DTC.</p><p><strong>Methods: </strong>This retrospective cohort study included 1,222 patients with DTC who underwent surgery at a tertiary hospital between February 2021 and October 2025. Candidate predictors were screened using a combined feature selection strategy incorporating least absolute shrinkage and selection operator (LASSO) regression and the Boruta algorithm. Eight machine learning algorithms were developed and compared. Model performance was evaluated using the area under the receiver operating characteristic curve (AUC) and calibration metrics. Model interpretability was assessed using SHapley Additive exPlanations (SHAP), and the optimal model was deployed as a web-based calculator.</p><p><strong>Results: </strong>Seven consensus variables were selected for final model construction. Among the eight algorithms, the light gradient boosting machine (LGBM) achieved the best overall performance in the testing cohort, with an AUC of 0.875 [95% confidence interval (CI): 0.838-0.912] and a Brier score of 0.132, indicating good discrimination and calibration. SHAP analysis showed that bilateral central lymph node dissection (CLND), severe preoperative vitamin D deficiency, and thyroid capsular invasion were the most influential predictors of postoperative hypocalcemia. The final model was implemented as a freely accessible web-based clinical tool.</p><p><strong>Conclusions: </strong>We developed an explainable web-based LGBM model that showed good predictive performance for early postoperative hypocalcemia in patients with DTC. By combining accurate risk estimation with transparent interpretation, this tool may help clinicians identify high-risk patients and support individualized perioperative management.</p>","PeriodicalId":12760,"journal":{"name":"Gland surgery","volume":"15 7","pages":"193"},"PeriodicalIF":1.9000,"publicationDate":"2026-07-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13462814/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Gland surgery","FirstCategoryId":"3","ListUrlMain":"https://doi.org/10.21037/gs-2026-0211","RegionNum":3,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/7/23 0:00:00","PubModel":"Epub","JCR":"Q3","JCRName":"SURGERY","Score":null,"Total":0}
引用次数: 0
Abstract
Background: Early postoperative hypocalcemia is one of the most common complications after surgery for differentiated thyroid cancer (DTC) and may lead to prolonged hospitalization and impaired postoperative recovery. Most existing prediction tools are based on conventional regression methods and may be insufficient to capture complex interactions among clinical variables. This study aimed to develop and validate an interpretable machine learning model and a web-based calculator for early prediction of postoperative hypocalcemia in patients with DTC.
Methods: This retrospective cohort study included 1,222 patients with DTC who underwent surgery at a tertiary hospital between February 2021 and October 2025. Candidate predictors were screened using a combined feature selection strategy incorporating least absolute shrinkage and selection operator (LASSO) regression and the Boruta algorithm. Eight machine learning algorithms were developed and compared. Model performance was evaluated using the area under the receiver operating characteristic curve (AUC) and calibration metrics. Model interpretability was assessed using SHapley Additive exPlanations (SHAP), and the optimal model was deployed as a web-based calculator.
Results: Seven consensus variables were selected for final model construction. Among the eight algorithms, the light gradient boosting machine (LGBM) achieved the best overall performance in the testing cohort, with an AUC of 0.875 [95% confidence interval (CI): 0.838-0.912] and a Brier score of 0.132, indicating good discrimination and calibration. SHAP analysis showed that bilateral central lymph node dissection (CLND), severe preoperative vitamin D deficiency, and thyroid capsular invasion were the most influential predictors of postoperative hypocalcemia. The final model was implemented as a freely accessible web-based clinical tool.
Conclusions: We developed an explainable web-based LGBM model that showed good predictive performance for early postoperative hypocalcemia in patients with DTC. By combining accurate risk estimation with transparent interpretation, this tool may help clinicians identify high-risk patients and support individualized perioperative management.
期刊介绍:
Gland Surgery (Gland Surg; GS, Print ISSN 2227-684X; Online ISSN 2227-8575) being indexed by PubMed/PubMed Central, is an open access, peer-review journal launched at May of 2012, published bio-monthly since February 2015.