Machine learning model for predicting malnutrition risk in lung cancer patients after thoracoscopic resection: a multi-center study - Chen, Tianfeng; Pan, Ruilan; Liang, Ling; Xu, Limei; Yang, Mingyue; Deng, Xiujuan; Wang, Ping (Frontiers in Oncology, 2026)
BackgroundEarly detection of malnutrition is critical for timely intervention in lung cancer patients undergoing thoracoscopic resection. Existing black-box prediction models lack clinical interpretability, limiting trust and application. The present study was conducted to predict malnutrition risk by establishing an explainable machine learning (ML) model and evaluate the model performance across several sites, so as to develop a web-based application to aid clinical decision-making.MethodsA retrospective analysis was conducted on 1, 134 lung cancer patients who underwent thoracoscopic resection at Dongguan People’s Hospital between October 2021 and October 2024, consisting of a training set (n = 795) and a testing set (n = 339). Meanwhile, an external validation cohort (n=273) was prospectively enrolled at the Affiliated Hospital of Guangdong Medical University from March to June of 2025. Furthermore, univariate and multivariate analyses were employed to determine the individual risk variables for post-operative malnutrition. This study constructed eight ML models using Gradient Boosting Machine (GBM), Neural Network, Logistic Regression, Extreme Gradient Boosting (XGBoost), Random Forest, K-Nearest Neighbors (KNN), Adaptive Boosting (AdaBoost), and Support Vector Machine (SVM). The performance of the established models was assessed by decision curve analysis (DCA) and receiver operating characteristic (ROC) curves. Meanwhile, feature contributions and visualize model outputs were quantified using the SHapley Additive exPlanations (SHAP) method to enhance clinical interpretability. Consequently, a web-based risk calculator was created to assist in personalized forecasting.ResultsAmong 1, 407 total patients, post-operative malnutrition incidence was 11.3% (159/1, 407). Multivariate analysis identified seven independent risk factors: albumin (ALB), Nutritional Risk Screening 2002 score, age, intraoperative blood loss, total drainage volume, Basic Activities of Daily Living (BADL) score, and serum potassium (K). The XGBoost model outperformed others, with AUC 0.845 (95% CI: 0.771–0.919) in the testing set and 0.886 (95% CI: 0.841–0.932) in external validation. SHAP analysis clarified the relative importance of risk factors, improving interpretability.ConclusionThe XGBoost-based explainable ML model effectively predicts malnutrition risk in lung cancer patients after thoracoscopic resection. Integrating high predictive performance with interpretability, it supports clinical risk stratification and personalized nutritional interventions to improve post-operative outcomes. A publicly available web-based calculator facilitates easy clinical application.