This repository presents a re-analysis and reimplementation of the 2021 study:
“Analysis of Pre-existing Conditions in COVID-19 Patients: Application of Neural Networks in Patient Segmentation.” (Análise de pré-condições existentes em pacientes com COVID-19: aplicação de redes neurais na segmentação de pacientes.)
The goal of this project is to demonstrate how machine learning design choices can artificially inflate performance metrics and ultimately reduce the clinical usefulness of predictive models in healthcare.
By reconstructing the original pipeline and correcting its methodological flaws, this repository highlights common pitfalls in clinical ML research and proposes a more robust and interpretable modeling approach.
The re-analysis of the original study uncovered flaws that undermine the real-world applicability of the reported results.
The dataset was balanced via undersampling before the train/test split.
This introduces statistical leakage, because the test set no longer reflects the true distribution of the population. As a result, performance metrics become optimistically biased.
The original model used variables such as:
icuintubedpatient_type
to predict mortality.
However, these variables describe late-stage clinical interventions, meaning the model effectively learns to detect patients already in critical condition.
The model mixes pre-existing comorbidities with current clinical status.
This makes the model unsuitable for early risk assessment, since some predictors only become available after hospitalization.
The original pipeline lacked several standard ML practices:
- No cross-validation
- No baseline comparisons
- No systematic hyperparameter tuning
- Over-reliance on a single neural network architecture
We correct the mentioned pitfalls, emphasizing explainability in models and metrics such as PR-AUC and ROC-AUC.
This project is intended for research and methodological analysis only and is not designed for clinical decision-making.