Predicting Heart Failure Using Machine Learning: An Evaluation of Classification Algorithms on Multiple Datasets
摘要
This research describes the implementations of heart failure prediction through a number of machine learning methods in order to improve the diagnosis of cardiovascular diseases in terms of accuracy and reliability. Using two sizeable and informational datasets, we test the efficiency of some of the classification algorithms, K-Nearest Neighbors (KNN), Support Vector Machine (SVM), Random Threat, Logistic Regression, Gradient Boosting, XGBoost, and Decision Tree. Model evaluation was done based on performance measures including F1-score, accuracy, recall, and ROC-AUC, so comprehensive assessment of model performance was accomplished. As our analysis results show, the KNN model outperformed all of the other models on Dataset-1 with an F1-score of 0.968, an accuracy of 0.969, and a recall of 0.979, which affirmatively describes their ability to be effective in actually determining heart disease cases. KNN was also closely followed by the SVM and Random Forest models in the majority of the metrics as well. On the other hand, in Dataset-2, both KNN and SVM models performed exceptionally well with an F1-score of 0.991, an accuracy of 0.993, and complete recall rates of 1.000. These models also earn the strongest metrics in terms of predicting heart failures. Other models like Random Forest, Logistic Regression, and Gradient Boosting models also seem to have performed well on both datasets which makes them reliable. The results of this study underline the importance of carefully choosing the machine learning models, depending on the properties of the dataset. The stable high rates of KNN and SVM performance indicate their promise in heart failure prediction over various datasets. This work exemplifies the usefulness of the exhaustive evaluation of metrics in pinpointing the benefits and disadvantages of the models enabling the specialists to make informed choices on the best models for predictive models in cardiovascular diseases. These machine learning methods also offer great hope in enhancing the early detection and treatment of heart failure and therefore improving patient care and cost-effective healthcare.