Comprehensive Heart Attack Prediction Model Using Stacked Ensembles and Clinical Feature Engineering
Anandhi Jayabalan, S. Uma, S. Padmakala
Abstract
Cardiovascular disease continues to be a predominant cause of mortality globally, requiring precise and effective strategies for early identification. This work examines the application of clinical datasets to explore ensemble models and machine learning for predicting heart attacks. The dataset includes patient information about factors such as age, diabetics, levels of cholesterol, blood pressure, and smoking status. The Label Encoder is utilized to encode categorical variables, while class imbalance is tackled through the application of the Synthetic Minority Over-sampling Technique (SMOTE). The top five features were identified through the application of feature importance in Random Forest analysis. To enhance prediction accuracy, various classification techniques, including Random Forest (RF), Gradient Boosting (GB), XG Boost, and Light GBM, along with an ensemble Voting Classifier, are utilized. The best model performance was attained by intensive hyperparameter optimization using Grid Search CV. The performance of the proposed system was assessed through a stacked ensemble methodology. The Random Forest model revealed an accuracy of 87.25% and a ROC-AVC of 0.91. The results for Gradient Boosting and XG Boost showed accuracies of 85.60% and 86.80%, accompanied by ROC-AUC scores of 0.89 and 0.90, respectively. The ensemble Voting Classifier enhanced performance, reaching an accuracy of 88.15% and a ROC-AUC of 0.92. The findings indicate that utilizing an ensemble method alongside hyperparameter optimization significantly enhances prediction accuracy and facilitates the early identification of heart attack risks.