Exploring Cosine and Euclidean Metrics in K-Nearest Neighbors for Breast Cancer Diagnosis
Simeon Yuda Prasetyo, Ghinaa Zain Nabiilah, Erna Fransisca Angela Sihotang, Kelvin Asclepius Minor · 2024
Breast cancer is a prevalent and heterogeneous disease posing a significant global health burden, with millions of new cases diagnosed annually. Early detection is paramount for improving patient outcomes and reducing mortality rates associated with breast cancer. Machine learning techniques offer promising avenues for enhancing early detection and diagnosis. This research explores the efficacy of Cosine and Euclidean metrics within the K-Nearest Neighbors (KNN) algorithm for breast cancer diagnosis. Utilizing a comprehensive dataset, experiments were conducted varying the number of neighbors and distance metrics. Results indicate that both Cosine and Euclidean metrics yield robust performance, with average accuracies of approximately 94.85% and 94.96%, respectively. The best-performing model achieved an accuracy of 95.61% for both metrics. These findings underscore the potential of the KNN algorithm in accurately predicting breast cancer outcomes. Future research could explore alternative distance metrics and machine learning models to further improve diagnostic accuracy in breast cancer detection, thereby advancing clinical practice and patient care. This study contributes valuable insights into the utilization of machine learning algorithms for breast cancer diagnosis and emphasizes the importance of leveraging computational techniques for early detection, ultimately leading to improved prognosis and patient outcomes.