This media is currently not available.
Short-term PEG (stPEG) mortality risk stratification using machine learning
Poster Abstract

Aims

Patients receiving endoscopic percutaneous endoscopic gastrostomy (PEG) are usually at elevated risk of short-term mortality due to concurrent morbidity. Risk stratification algorithms to identify patients with no or elevated risk might assist appropriate patient selection. The aim of this study was to develop a machine learning-based risk stratification model for short-term (<30 days) mortality prediction. 

Methods

All PEG implantations between January 2017 and December 2023 were retrospectively included. Exclusion criteria comprised age below 18 years, multiple PEG procedures (≥2), follow-up shorter than 30 days and PEG indications due to dementia or palliative treatment. Spearman correlation with Bonferroni multiple comparison correction was used to identify feature variables. A time-based split (4:1) was applied to define the training (80%) and validation cohort (20%). After feature engineering, imputation of missing variables using K-nearest neighbour method and compensation of class imbalance with SMOTE, a logistic regression-based machine learning model was trained using the training cohort. Monte Carlo cross-validation-based (100-fold stratified random splitting with a 25% validation proportion) threshold selection was used to pre-define a rule out threshold achieving a sensitivity > 80% while maximizing the true negative classifications within the training data. This rule-out threshold was then applied to the validation data. Performance metrices were calculated and an internal validation was conducted using bootstrap analysis (n=2000). To assess for differences between the training and validation cohort a Mann–Whitney U test was used for continuous non-parametric variables and a Fisher’s exact test for categorical variables. Python alongside different packages (e.g. NumPy, pandas, SciPy, scikit-learn) with the support of Chat GPT-5 was used to develop the algorithm and to perform the statistical analysis.

Results

A total of 689 PEG implantations met the inclusion criteria. Median age of patients was 68 (IQR 60-78) years, 39% were female. The most common PEG indication was a cancer (n=314), either due to dysphagia or prophylactic (oncological), followed by stroke/cerebral haemorrhage (n=242) and neurological disease (n=133). Approximately 7.7% of patients died within 30 days after PEG placement. Spearman correlation analysis demonstrated a significand correlation between 30-day mortality and C-reactive protein (r=0.21), Charlson Comorbidity Index (r=0.163), prothrombin time (r=-0.16), age (r=0.12), leucocyte count (r=0.12) and haemoglobin (r=-0.12). ASA score was also associated with short-term mortality (30-day mortality: ASA1 = 0%; ASA2 = 3.1%; ASA3 = 8.2%; ASA4 = 8.9%). To identify patients with no or elevated risk a machine learning based approach was developed. No differences between the training (n=551) and validation cohort (n=138) were found. A logistic regression-based machine learning model was trained utilizing the features identified and listed above. To reduce overfitting, as indicated by learning curves, leucocytes were excluded from the final model. Evaluation of the model demonstrated good discrimination with an area under the receiver operating characteristic curve of 0.81 (95%CI 0.70-0.92). SHAP analysis indicated that PEG indication had only minimal predictive value (mean absolute SHAP < 0.01). Utilizing the pre-calculated rule-out threshold in the validation cohort, patients without short-term mortality could be identified with a negative predictive value and sensitivity of 100% (true negative = 91; false negative = 0; true positive = 6; false positive = 41). Given the low prevalence of short-term mortality, a reliable rule-in threshold could not be defined. Thus, the rule out threshold was used to stratify into rule out (mortality = 0%) and elevated-risk groups (mortality = 14.6%).

Conclusions

This logistic regression-based machine learning model enables stratification of patients receiving PEG implantations. Patients classified as rule out have no mortality risk. Future research should focus on external and possibly prospective validation and further refining the model for better stratification of high-risk patients.