Skip to content
Research Article Open access CC BY 4.0

Analysis of Breast Cancer Data Using KNN Algorithm

Ifeoluwa Valentina AYOOLA, Afolabi Gabriel ARIWAYO, Abayomi Samuel OKE

Advances in Research · pp. 535–544 · Published 30 Dec 2024

10.9734/air/2024/v25i61226

Abstract

Comparing the performance of machine learning algorithms over the same dataset is the current research trend. The fact that each algorithm has its underlying assumptions indicate that not all algorithms should be compared with each other on the same dataset. Hence, every algorithm should be compared only when the dataset satisfies the underlying assumptions. Algorithms that are suitable for a certain dataset should only be compared with each other at the optimal level. To pave a way for this, this study investigates the performance of several variations of the -Nearest Neighbors (NN) algorithm on a dataset comprising 569 breast cancer cases from the United States. The research evaluates the impact of three distance metrics, namely; Chebyshev, Manhattan, and Euclidean, across various values of . The analysis reveals that the optimal metric is Euclidean distance metric and the optimal  values are  and  The optimal results obtained is 97.37% accuracy, 97.26% (Benign) and 97.56% (Malignant) precision, 98.61% (Benign) and 95.24% (Malignant) recall, and 97.93% (Benign) and 96.39% (Malignant) F1-scores. Additionally, the two optimal models (for  and ) exhibit strong agreement on the feature’s importance except compactness feature. Further analysis is recommended to better understand the role of compactness in breast cancer diagnosis.

Machine learning k nearest neighbor breast cancer hyperparameter tuning distance metrics

Cited by 1

1 citation reported by external sources — individual citing-article records aren't available to list yet.

Article metrics

Real usage data collected on this platform.

0

Page views

0

PDF downloads

0

Outbound clicks

1

Citations

Views by country

Approximate, from request IP at view time — not citizenship or institution. Countries with fewer than 5 views are grouped as "Other".

No views recorded yet.

Traffic sources

Referring site, by host.

No traffic recorded yet.

Views and downloads exclude known bots/crawlers. Citations combines this platform's own DOI-resolved index with each external source's own reported total — see Cited by above for individually listed citing works. Last refreshed 0 seconds ago.