Ventricular Septal Defect (VSD) is one of the most common congenital heart defects. Predicting whether isolated VSD will close spontaneously, require surgical intervention, or remain unclosed is essential for optimizing patient management and avoiding unnecessary treatment. This study aimed to develop and evaluate machine learning (ML) models for predicting VSD outcomes using maternal and neonatal clinical characteristics. A retrospective dataset of 382 patients with isolated VSD was analyzed and categorized into spontaneous closure, surgical closure, and non-closure outcomes. Data preprocessing included duplicate removal and listwise deletion of records with missing values. To address class imbalance, random undersampling and oversampling were applied exclusively to the training set (80%), while the independent test set (20%) remained unchanged. Five ML algorithms-Decision Tree, Random Forest, K-Nearest Neighbor, Naive Bayes, and XGBoost-were evaluated using accuracy, macro-average area under the receiver operating characteristic curve (AUC), and class-specific F1-scores. XGBoost achieved the best overall performance with an accuracy of 65.8% and a macro-average AUC of 0.81, demonstrating balanced classification across all outcome groups. Although Decision Tree and Random Forest produced the highest F1-score (92.3%) for the minority surgical closure class, their overall multiclass performance was inferior to XGBoost. Sampling strategies had minimal impact on overall predictive performance, although ensemble-based methods showed greater robustness to class imbalance. These findings suggest that ML, particularly XGBoost, provides a promising approach for early risk stratification of isolated VSD, supporting personalized clinical decision-making and improving identification of patients requiring surgical intervention.
Copyrights © 2026