From risk factors to individualized prediction: development and internal validation of a machine learning model for early identification of postoperative pneumonia after lung cancer surgery.
6 affiliations
- 1Department of Surgery, Surgery Bitenc, Ljubljana, Slovenia.
- 2Faculty of Medicine, University of Ljubljana, Ljubljana, Slovenia.
- 3Faculty of Computer and Information Science, University of Ljubljana, Ljubljana, Slovenia.
- 4Department of Infectious Diseases, University Medical Centre Ljubljana, Ljubljana, Slovenia.
- 5Laboratory for Respiratory Microbiology, University Clinic Golnik, Golnik, Slovenia.
- 6Department of Internistic Oncology, University Clinic Golnik, Golnik, Slovenia.
Abstract
Postoperative pneumonia (POP) remains one of the most common infectious complications following lung cancer surgery and is associated with substantial morbidity. Although several risk factors for POP have been identified, clinically applicable approaches for early individualized risk stratification remain limited. This study aimed to develop and internally validate machine learning models for early prediction of POP using routinely available perioperative variables. In this prospective single-center cohort study, 258 consecutive patients undergoing pulmonary resection for non-small cell lung cancer or pulmonary carcinoid tumors were screened, of whom 200 were included in the final study cohort. POP was defined by newly developed postoperative radiographic abnormalities accompanied by clinical signs of infection requiring antibiotic therapy. Machine learning models, including logistic regression (LR), Naïve Bayes (NB), random forest (RF), and XGBoost (XGB), were developed to predict POP using demographic, clinical, laboratory, surgical, and postoperative day 1 radiographic variables. Model performance was assessed using nested leave-one-out cross-validation and quantified by the area under the receiver operating characteristic curve (AUROC). A nomogram was constructed from the best-performing model to facilitate individualized risk estimation. Different decision thresholds were explored to evaluate clinically relevant trade-offs between sensitivity and specificity. POP occurred in 47 of 200 patients (23.5%), while no POP-related mortality was observed. LR demonstrated the best predictive performance (AUROC 0.701±0.070), followed by NB (0.698±0.103), RF (0.656±0.217), and XGB (0.589±0.179). The most influential predictors included advanced age, perioperative changes in C-reactive protein concentration (ΔCRP), elevated preoperative CRP levels, prolonged operative duration, and abnormal postoperative day 1 chest radiographic findings. At a decision threshold of 25%, the model correctly identified 25 of 47 POP cases (53.2%), whereas increasing the threshold to 32.5% reduced false-positive classifications from 42 to 24 at the expense of missing an additional four POP cases. Machine learning models based on routinely available perioperative variables enabled early individualized prediction of POP following lung cancer surgery. LR provided the best balance between predictive performance, stability, and interpretability, allowing the development of an interpretable nomogram for individualized risk estimation. The model may have potential to support risk-adapted postoperative surveillance and more efficient allocation of healthcare resources; however, external validation is required before clinical implementation.
Related
- Development and internal validation of a machine learning prediction model for postoperative hemorrhage following modified radical mastectomy for breast cancer
- A Nomogram for Individualized Frailty Identification in Older Inpatients with Schizophrenia: Development and Internal Validation
- Development and internal validation of a clinical prediction model for postoperative venous thromboembolism after neurosurgical intervention in patients with traumatic brain injury
- Development and internal validation of a prediction model for severe postoperative complications (Thoracic Morbidity and Mortality Grade ≥ III) after radical esophagectomy.
- Machine Learning–Based Prediction of Major Postoperative Complications After Noncardiac Surgery Under General Anesthesia Using Routinely Available Electronic Health Record Data: Retrospective Multicenter Development and Validation Study
BibTeX
@article{petrovic2026from,
title = {{From risk factors to individualized prediction: development and internal validation of a machine learning model for early identification of postoperative pneumonia after lung cancer surgery.}},
author = {Sabrina Petrovic and Tilen Gabršček and Bojana Beovic and Viktorija Tomič and Marko Bitenc and Ales Rozman and Mateja Marc Malovrh and Vladimir Dimitric and Tomaz Jensterle and Aleksander Sadikov},
journal = {Journal of thoracic disease},
year = {2026},
month = oct,
doi = {10.21037/jtd-2026-1970},
url = {https://europepmc.org/article/MED/42996701},
note = {CC BY-NC-ND},
}
RIS
TY - JOUR
TI - From risk factors to individualized prediction: development and internal validation of a machine learning model for early identification of postoperative pneumonia after lung cancer surgery.
AU - Sabrina Petrovic
AU - Tilen Gabršček
AU - Bojana Beovic
AU - Viktorija Tomič
AU - Marko Bitenc
AU - Ales Rozman
AU - Mateja Marc Malovrh
AU - Vladimir Dimitric
AU - Tomaz Jensterle
AU - Aleksander Sadikov
PY - 2026
DA - 2026/10/27
JO - Journal of thoracic disease
DO - 10.21037/jtd-2026-1970
UR - https://europepmc.org/article/MED/42996701
AB - Postoperative pneumonia (POP) remains one of the most common infectious complications following lung cancer surgery and is associated with substantial morbidity. Although several risk factors for POP have been identified, clinically applicable approaches for early individualized risk stratification remain limited. This study aimed to develop and internally validate machine learning models for early prediction of POP using routinely available perioperative variables. In this prospective single-center cohort study, 258 consecutive patients undergoing pulmonary resection for non-small cell lung cancer or pulmonary carcinoid tumors were screened, of whom 200 were included in the final study cohort. POP was defined by newly developed postoperative radiographic abnormalities accompanied by clinical signs of infection requiring antibiotic therapy. Machine learning models, including logistic regression (LR), Naïve Bayes (NB), random forest (RF), and XGBoost (XGB), were developed to predict POP using demographic, clinical, laboratory, surgical, and postoperative day 1 radiographic variables. Model performance was assessed using nested leave-one-out cross-validation and quantified by the area under the receiver operating characteristic curve (AUROC). A nomogram was constructed from the best-performing model to facilitate individualized risk estimation. Different decision thresholds were explored to evaluate clinically relevant trade-offs between sensitivity and specificity. POP occurred in 47 of 200 patients (23.5%), while no POP-related mortality was observed. LR demonstrated the best predictive performance (AUROC 0.701±0.070), followed by NB (0.698±0.103), RF (0.656±0.217), and XGB (0.589±0.179). The most influential predictors included advanced age, perioperative changes in C-reactive protein concentration (ΔCRP), elevated preoperative CRP levels, prolonged operative duration, and abnormal postoperative day 1 chest radiographic findings. At a decision threshold of 25%, the model correctly identified 25 of 47 POP cases (53.2%), whereas increasing the threshold to 32.5% reduced false-positive classifications from 42 to 24 at the expense of missing an additional four POP cases. Machine learning models based on routinely available perioperative variables enabled early individualized prediction of POP following lung cancer surgery. LR provided the best balance between predictive performance, stability, and interpretability, allowing the development of an interpretable nomogram for individualized risk estimation. The model may have potential to support risk-adapted postoperative surveillance and more efficient allocation of healthcare resources; however, external validation is required before clinical implementation.
SN - 2072-1439
SN - 2077-6624
ER -