Development and validation of an explainable machine learning model for predicting postoperative pulmonary complications after lung cancer surgery: a machine learning study.
Shaolin Chen, Ting Deng, Qing Yang, Jin Li, Juanyan Shen, Xu Luo, Juan Tang, Xulian Zhang, Jordan Tovera Salvador, Junliang Ma
{"title":"Development and validation of an explainable machine learning model for predicting postoperative pulmonary complications after lung cancer surgery: a machine learning study.","authors":"Shaolin Chen, Ting Deng, Qing Yang, Jin Li, Juanyan Shen, Xu Luo, Juan Tang, Xulian Zhang, Jordan Tovera Salvador, Junliang Ma","doi":"10.1016/j.eclinm.2025.103386","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Early identification and prediction of postoperative pulmonary complications (PPCs) are vital for patient management in lung cancer (LC) surgery. However, existing predictive models often lack comprehensive validation and interpretability. This study aimed to develop and validate an explainable machine learning (ML) model to predict PPCs in patients with LC undergoing surgery.</p><p><strong>Methods: </strong>A risk factor variable pool was determined by meta-analysis and Delphi surveys. Patients undergoing LC surgery who were admitted to the Thoracic Surgery Department at the Affiliated Hospital of Zunyi Medical University from 1st January 2022 to 31st October 2023 (retrospective) and from 1st November 2023 to 31st July 2024 (prospective) were used for model development and prospective validation, respectively. The retrospective cohort was randomly split into a training set and an internal validation set at an 8:2 ratio. Feature selection involved univariate analysis, collinearity analysis, nine ML algorithms, and expert consensus. Twelve independent ML models and 26 stacking ensemble models were developed. Predictive performance was evaluated using the area under the receiver-operating-characteristic curve (AUROC), accuracy, sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and F1 score. Prospective validation was analysed using AUC, Hosmer-Lemeshow test, calibration curves, and decision curve analysis (DCA). The Shapley Additive Explanation (SHAP) method was utilised to interpret the predictive model.</p><p><strong>Findings: </strong>A total of 883 patients were included in the retrospective cohort with an incidence of PPCs of 35.4% (313/883), and a total of 308 patients were included in the prospective cohort with PPCs of 29.5% (91/308). Nine key characteristics were selected for model development: age, duration of surgery, Charson comorbidity index (CCI), tumour stage, measured carbon monoxide diffusion (DLCO, mmol/min/kPa), intra-operative infusion volume (IFIV, mL), red blood cell volume distribution width-coefficient of variation (RDW-CV, %), body mass index (BMI), and number of years of smoking. Amongst the independent models, the Gradient Boosting Decision Tree (GBDT) showed best performance, achieving an AUROC of 0.829 (95% CI: 0.774-0.885). The stacking ensemble combining Support Vector Machine (SVM) and Decision Tree (DT) showed the highest overall performance, with an AUROC of 0.860 (95% CI: 0.809-0.911), and DCA showed higher clinical utility compared to other models. In the prospective validation, the AUROC was 0.790 (95% CI: 0.744-0.835).</p><p><strong>Interpretation: </strong>The stacking ensemble model combining SVM and DT demonstrated robust predictive performance and favourable clinical utility for prediction PPCs in patients undergoing LC surgery. However, the model has not been applied in clinical practice and requires future validation in large, multi-centre cohorts. Further work should aim to identify high-risk patients early through clinical data analysis, enabling timely interventions and more efficient allocation of limited healthcare resources.</p><p><strong>Funding: </strong>The Science and Technology Foundation of Guizhou Provincial Health Commission; the Key Talent Team of Guizhou Provincial Science and Technology Innovation; and Guizhou Science and Technology Cooperation Basic Research Project.</p>","PeriodicalId":11393,"journal":{"name":"EClinicalMedicine","volume":"86 ","pages":"103386"},"PeriodicalIF":10.0000,"publicationDate":"2025-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12337024/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"EClinicalMedicine","FirstCategoryId":"3","ListUrlMain":"https://doi.org/10.1016/j.eclinm.2025.103386","RegionNum":1,"RegionCategory":"医学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"MEDICINE, GENERAL & INTERNAL","Score":null,"Total":0}
引用次数: 0
Abstract
Background: Early identification and prediction of postoperative pulmonary complications (PPCs) are vital for patient management in lung cancer (LC) surgery. However, existing predictive models often lack comprehensive validation and interpretability. This study aimed to develop and validate an explainable machine learning (ML) model to predict PPCs in patients with LC undergoing surgery.
Methods: A risk factor variable pool was determined by meta-analysis and Delphi surveys. Patients undergoing LC surgery who were admitted to the Thoracic Surgery Department at the Affiliated Hospital of Zunyi Medical University from 1st January 2022 to 31st October 2023 (retrospective) and from 1st November 2023 to 31st July 2024 (prospective) were used for model development and prospective validation, respectively. The retrospective cohort was randomly split into a training set and an internal validation set at an 8:2 ratio. Feature selection involved univariate analysis, collinearity analysis, nine ML algorithms, and expert consensus. Twelve independent ML models and 26 stacking ensemble models were developed. Predictive performance was evaluated using the area under the receiver-operating-characteristic curve (AUROC), accuracy, sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), and F1 score. Prospective validation was analysed using AUC, Hosmer-Lemeshow test, calibration curves, and decision curve analysis (DCA). The Shapley Additive Explanation (SHAP) method was utilised to interpret the predictive model.
Findings: A total of 883 patients were included in the retrospective cohort with an incidence of PPCs of 35.4% (313/883), and a total of 308 patients were included in the prospective cohort with PPCs of 29.5% (91/308). Nine key characteristics were selected for model development: age, duration of surgery, Charson comorbidity index (CCI), tumour stage, measured carbon monoxide diffusion (DLCO, mmol/min/kPa), intra-operative infusion volume (IFIV, mL), red blood cell volume distribution width-coefficient of variation (RDW-CV, %), body mass index (BMI), and number of years of smoking. Amongst the independent models, the Gradient Boosting Decision Tree (GBDT) showed best performance, achieving an AUROC of 0.829 (95% CI: 0.774-0.885). The stacking ensemble combining Support Vector Machine (SVM) and Decision Tree (DT) showed the highest overall performance, with an AUROC of 0.860 (95% CI: 0.809-0.911), and DCA showed higher clinical utility compared to other models. In the prospective validation, the AUROC was 0.790 (95% CI: 0.744-0.835).
Interpretation: The stacking ensemble model combining SVM and DT demonstrated robust predictive performance and favourable clinical utility for prediction PPCs in patients undergoing LC surgery. However, the model has not been applied in clinical practice and requires future validation in large, multi-centre cohorts. Further work should aim to identify high-risk patients early through clinical data analysis, enabling timely interventions and more efficient allocation of limited healthcare resources.
Funding: The Science and Technology Foundation of Guizhou Provincial Health Commission; the Key Talent Team of Guizhou Provincial Science and Technology Innovation; and Guizhou Science and Technology Cooperation Basic Research Project.
期刊介绍:
eClinicalMedicine is a gold open-access clinical journal designed to support frontline health professionals in addressing the complex and rapid health transitions affecting societies globally. The journal aims to assist practitioners in overcoming healthcare challenges across diverse communities, spanning diagnosis, treatment, prevention, and health promotion. Integrating disciplines from various specialties and life stages, it seeks to enhance health systems as fundamental institutions within societies. With a forward-thinking approach, eClinicalMedicine aims to redefine the future of healthcare.