Optimizing K-NN Algorithm for Breast Cancer Diagnosis: A Focus on Chebyshev and Minkowski Metrics
Simeon Yuda Prasetyo, Pandu Wicaksono, Zahra Nabila Izdihar, Panji Arisaputra · 2024
Breast cancer represents a significant global health concern, being the most common cancer in women and a leading cause of cancer-related deaths. Early detection is crucial for improving patient outcomes, underscoring the need for effective diagnostic tools. Machine learning techniques offer promising avenues for enhancing breast cancer detection, with the K-Nearest Neighbors (KNN) algorithm showing remarkable performance. This study investigates the efficacy of two distance metrics, Chebyshev and Minkowski, within the KNN algorithm for breast cancer diagnosis. Using a dataset sourced from Kaggle, comprising various tumor characteristics, the study evaluates KNN models with different numbers of neighbors (1–15) using accuracy, precision, recall, and F1 score metrics. The results demonstrate that the Minkowski distance consistently outperforms the Chebyshev distance across all neighbor settings, with an average accuracy of approximately 95.39%. The best-performing model is achieved using the Minkowski distance metric with 3 neighbors, exhibiting an average accuracy of approximately 96.49%. This research not only contributes to the advancement of machine learning applications in medical diagnostics but also underscores the pivotal role of algorithmic optimization in improving healthcare outcomes.