Comparison of Hyperparameter Tuning Techniques on KNN Algorithm to find the Best K Value using Grid Search and Random Search Methods

K-Nearest Neighbors (KNN) is a widely used classification algorithm, but its performance heavily depends on the value of the K parameter. Hyperparameter tuning methods like grid search and random search are employed to find the optimal K value. However, it remains unclear which method is superior due to their differing characteristics. This study compares these methods by evaluating accuracy, memory usage, and computing time. Grid Search was found to be superior in accuracy, with an average difference of 0.5% in accuracy, 0.67% in precision, 0.83% in recall, and 0.33% in F1-score. Conversely, Random Search excels in memory usage and computing time, with a difference of 3.4 MiB in memory usage and eight seconds in computing time. This research aims to guide machine learning practitioners in selecting the appropriate hyperparameter tuning method for the KNN algorithm based on specific priorities and needs.

Authors

Institutions

Publication Details

Published
2024-12-11
DOI
https://doi.org/10.1109/isriti64779.2024.10963519
Citations
2
Primary Topic
Data Mining and Machine Learning Applications
Type
article
Field-Weighted Citation Impact
1.56
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparison of Hyperparameter Tuning Techniques on KNN Algorithm to find the Best K Value using Grid Search and Random Search Methods

Sri Yulianti, Irfan Darmawan, Akmal Taufiq, Alam Rahmatulloh et al.
2 citations
Data Mining and Machine Learning Applications
1.56
article

Comparison of Hyperparameter Tuning Techniques on KNN Algorithm to find the Best K Value using Grid Search and Random Search Methods

Sri Yulianti, Irfan Darmawan, Akmal Taufiq, Alam Rahmatulloh, Randi Rizal
article en
2 citations

Abstract

K-Nearest Neighbors (KNN) is a widely used classification algorithm, but its performance heavily depends on the value of the K parameter. Hyperparameter tuning methods like grid search and random search are employed to find the optimal K value. However, it remains unclear which method is superior due to their differing characteristics. This study compares these methods by evaluating accuracy, memory usage, and computing time. Grid Search was found to be superior in accuracy, with an average difference of 0.5% in accuracy, 0.67% in precision, 0.83% in recall, and 0.33% in F1-score. Conversely, Random Search excels in memory usage and computing time, with a difference of 3.4 MiB in memory usage and eight seconds in computing time. This research aims to guide machine learning practitioners in selecting the appropriate hyperparameter tuning method for the KNN algorithm based on specific priorities and needs.

Siliwangi University (ID), Telkom University (ID)
Openalex Percentile: Top 11%
Data Mining and Machine Learning Applications
1.56
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Comparison of Hyperparameter Tuning Techniques on KNN Algorithm to find the Best K Value using Grid Search and Random Search Methods — Sri Yulianti, Irfan Darmawan, et al. · (2024) | TGRS Research Map | TGRS