This repository contains the Jupyter notebooks used for my Applied Data Science Master's thesis at Utrecht University / Amsterdam UMC.
The thesis looks at whether routinely collected preoperative and intraoperative clinical variables can be used to predict postoperative complications after lung and esophageal cancer surgery. A secondary aim is to explore whether a preoperative physiotherapist physical assessment risk label adds predictive value to these models.
The original clinical registry data and physiotherapy note data are not included in this repository because they contain sensitive patient-related information. Therefore, the notebooks are provided for transparency and documentation of the analysis workflow, but they cannot be fully rerun without access to the original protected datasets.
The main workflow consisted of:
- Preparing the lung and esophageal surgery cohorts.
- Standardising patient identifiers and retaining one primary surgery record per patient.
- Extracting preoperative physiotherapist physical assessment labels from ICF/physiotherapy notes.
- Merging the physical assessment data with the surgical registry cohorts.
- Defining postoperative complication outcomes.
- Training and comparing logistic regression and random forest models.
- Comparing models with and without the physical assessment risk label.
- Evaluating model performance using metrics such as ROC-AUC, PR-AUC, sensitivity, specificity, F1-score, and balanced accuracy.
- Producing descriptive tables and figures for the thesis report.
Because the clinical datasets are not publicly available, the notebooks are not intended to be directly executable by external users. They are shared to document the analysis logic, preprocessing decisions, modelling pipeline, and figure generation steps.