Advancing Education, Research, and Quality of Care for the Head and Neck oncology patient.
Introduction: Postoperative hypocalcemia is a common and potentially severe complication after thyroidectomy, significantly affecting patient outcomes and necessitating early intervention. This study aimed to develop a high-sensitivity, machine learning-based model to assess immediate and 30-day postoperative hypocalcemia risk in real-time, intended for eventual integration into a clinician-accessible application. Previous predictive models suffer from low sensitivity and limited generalizability due to imbalanced data and small, single-center cohorts. In this study, we used advanced feature grouping, synthetic minority oversampling technique (SMOTE) for data balancing, and a stacking ensemble of Random Forest, XGBoost, and Logistic Regression to provide accurate predictions on a large multi-institutional dataset.
Methods: We utilized data from the National Surgical Quality Improvement Program (NSQIP) database from 2016 to 2022, including 46,371 patients. Key variables such as parathyroid status, surgical approach, calcium supplementation, and tumor characteristics were grouped and optimized for model input. The dataset imbalance was corrected using SMOTE, and the model was trained using a stacking classifier to maximize predictive power. The model outputs both immediate and 30-day hypocalcemia risk predictions to inform clinical decisions.
Results: HypoCalc achieved a high ROC AUC of 0.98 and an AUPRC of 0.98, indicating excellent overall predictive capability. The model's accuracy was 93.7%, with a sensitivity (recall) of 94.6% and specificity of 92.7%. The model achieved a high F1 Score of 0.94, while Brier Score calibration showed low miscalibration with a score of 0.047. Specific risk assessment metrics included a Negative Predictive Value (NPV) of 94.5% and an F2 Score of 0.94, highlighting the model’s effectiveness in minimizing missed cases of hypocalcemia. Calibration curve analysis further demonstrated robust probability estimates.
Conclusion: HypoCalc represents a significant advancement in postoperative risk prediction for thyroidectomy patients, leveraging a large dataset and modern machine learning techniques to achieve high sensitivity and accuracy. With further prospective validation, HypoCalc could serve as a valuable clinical tool, integrated into an app, to provide clinicians with immediate and 30-day risk assessments, facilitating timely interventions for at-risk patients and improving surgical outcomes.