International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 186 - Number 21 |
Year of Publication: 2024 |
Authors: Kartik Deogire, Sahil Dhake, Shreevallabh Chidrawar, Dhanashree Patil |
10.5120/ijca2024923639 |
Kartik Deogire, Sahil Dhake, Shreevallabh Chidrawar, Dhanashree Patil . Prediction of Risk of Heart Attack using Machine Learning Techniques. International Journal of Computer Applications. 186, 21 ( May 2024), 20-29. DOI=10.5120/ijca2024923639
The usefulness of machine learning models in forecasting the risk of a heart attack based on health-related variables is examined in this study. The classification models Gaussian Naive Bayes, K-Nearest Neighbors and Random Forest were created and assessed using performance measures like recall, accuracy, precision, F1-score. The dataset was heavily preprocessed, handling null values, duplicates, outliers, and feature transformation. It had 10 predictor variables and a target variable with 5110 observations. The most instructive elements for model training were found using feature selection approaches. Using k-fold cross-validation for KNN and GridSearchCV for Random Forest, hyperparameter tweaking was carried out for the models on the remaining 25% of the dataset after they had been trained on 75% of it. The results show that KNN outperformed Gaussian Naive Bayes and Random Forest, with the greatest accuracy of 96.4% following hyperparameter adjustment. SMOTE was also used to improve model robustness by addressing class imbalance. In summary, this study's best model for predicting the likelihood of a heart attack was KNN. These results demonstrate how machine learning models can improve early detection and individualized patient care by advancing risk assessment and intervention tactics in the healthcare industry.