K-Nearest Neighbor Algorithm for Heart Disease Detection: A Comparative Evaluation of Minkowski and Manhattan Distances
Simeon Yuda Prasetyo, Ghinaa Zain Nabiilah, Zahra Nabila Izdihar, Abram Setyo Prabowo, Hafizh Ash Shiddiqi
Abstract
Cardiovascular disease, encompassing heart-related issues, is the leading global cause of mortality, claiming over 17.9 million lives annually according to the World Health Organization (WHO). This emphasizes the need for precise prediction and early intervention, as accurate diagnosis and timely action can significantly reduce this burden. In this study, we explore the application of the K-Nearest Neighbor (KNN) algorithm for heart disease prediction, with a specific focus on the Minkowski and Manhattan distance metrics. By employing a diverse dataset, we investigate the influence of different neighbor quantities (1, 3, 5, 7, and 9) and distance metrics, shedding light on the optimal configuration for accurate predictions. The results highlight that the KNN algorithm configured with 7 neighbors and utilizing the Manhattan distance metric achieves the highest accuracy at 91.304%, surpassing the Minkowski metric. This research underscores the potential of machine learning in healthcare and recommends further exploration of neighbor quantities and alternative distance metrics to continually enhance the accuracy and effectiveness of heart disease prediction models. These insights provide valuable contributions to the advancement of sophisticated heart failure prediction models, benefiting medical diagnostics and predictive modeling in the field of cardiology, ultimately working towards the reduction of the global heart disease burden.