Enhancing Heart Disease Prediction through Machine Learning: A Comparative Analysis of Algorithm Generalization across Datasets with Various Distributions

Authors

  • Siming Lyu

DOI:

https://doi.org/10.61173/h990a243

Keywords:

Machine learning, generalization, grid search

Abstract

Heart disease, due to its high prevalence and mortality, remains a key area of global research. Although traditional diagnostic methods are effective, they are often invasive and time-consuming, highlighting the need for non-invasive, AI-based approaches. A significant challenge in real-world applications is ensuring model generalization across different datasets, particularly when the datasets are small. In this study, the performance of machine learning models, including Decision Tree, Random Forest, Support Vector Machine (SVM), and Multi-Layer Perceptron (MLP), was evaluated on two distinct heart disease datasets with different distributions and relatively small sizes. Two datasets with varying distributions were used for training and testing, with the primary focus on assessing model generalization in crossdataset applications. It is shown in the results that, while the Decision Tree model performed best after hyperparameter tuning, the improvements in Random Forest and MLP were limited, and SVM exhibited a decline in performance after tuning in the cross-dataset task. It was found that grid search tuning has limitations in cross-dataset scenarios, especially with small datasets, where complex models are prone to overfitting. The study demonstrates that, with smaller datasets, simpler models like Decision Trees often adapt better to different datasets. Furthermore, transfer learning and domain adaptation techniques are suggested as crucial for improving model generalization. Future research should focus on employing these techniques to enhance the robustness and accuracy of heart disease prediction models across diverse datasets.

References

[1] Joachims T. Training linear SVMs in linear time. InProceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining 2006 Aug 20 (pp. 217-226).

[2] Tang Y, Zhang YQ, Chawla NV, Krasser S. SVMs modeling for highly imbalanced classification. IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics). 2008 Dec 9;39(1):281-8.

[3] Weston J, Mukherjee S, Chapelle O, Pontil M, Poggio T, Vapnik V. Feature selection for SVMs. Advances in neural information processing systems. 2000;13.

[4] Subramani S, Varshney N, Anand MV, Soudagar ME, Al-Keridis LA, Upadhyay TK, Alshammari N, Saeed M, Subramanian K, Anbarasu K, Rohini K. Cardiovascular diseases prediction by machine learning incorporation with deep learning. Frontiers in medicine. 2023 Apr 17;10:1150933.

[5] Yi X, Walia E, Babyn P. Generative adversarial network in medical imaging: A review. Medical image analysis. 2019 Dec 1;58:101552.

[6] Singh NK, Raza K. Medical image generation using generative adversarial networks: A review. Health informatics: A computational perspective in healthcare. 2021:77-96.

[7] Kaggle. Heart Disease Dataset. 2024. https://www.kaggle. com/datasets/mexwell/heart-disease-dataset

[8] Kaggle. Heart Disease Dataset. 2021. https://www.kaggle. com/datasets/yasserh/heart-disease-dataset

[9] Raczko E, Zagajewski B. Comparison of support vector machine, random forest and neural network classifiers for tree species classification on airborne hyperspectral APEX images. European Journal of Remote Sensing. 2017 Jan 1;50(1):144-54.

[10] Zhang C, Liu Y, Tie N. Forest Land Resource Information Acquisition with Sentinel-2 Image Utilizing Support Vector Machine, K-Nearest Neighbor, Random Forest, Decision Trees and Multi-Layer Perceptron. Forests. 2023 Jan 29;14(2):254.

Downloads

Published

2024-10-29