Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

Classification with K-Nearest Neighbors Algorithm: Comparative Analysis between the Manual and Automatic Methods for K-Selection

Author 1: Tsvetelina Mladenova Author 2: Irena Valova
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 14, No. 4 · Published 2023 · Cited by 7

DOI: https://doi.org/10.14569/IJACSA.2023.0140444

Abstract

Machine learning and the algorithms it uses have been the subject of many and varied studies with the development of artificial intelligence in recent years. One of the popular and widely used classification algorithms is the nearest neighbors’ algorithm and in particular k nearest neighbors. This algorithm has three important steps: calculation of distances; selection of the number of neighbors; and the classification itself. The choice of the value for the k parameter determines the number of neighbors and is important and has a significant impact on the degree of efficiency of the created model. This article describes a study of the influence of the way the k parameter is chosen - manually or automatically. Data sets, used for the study, are selected to be as close as possible in their features to the data generated and used by small businesses - heterogeneous, unbalanced, with relatively small volumes and small training sets. From the obtained results, it can be concluded that the automatic determination of the value of k can give results close to the optimal ones. Deviations are observed in the accuracy rate and the behavior of well-known KNN modifications with increasing neighborhood size for some of the training data sets tested, but one cannot expect that the same model's parameter values (e.g. for k) will be optimally applicable on all data sets.

Keywords

How to Cite this Article

Mladenova, T., & Valova, I. (2023). Classification with K-Nearest Neighbors Algorithm: Comparative Analysis between the Manual and Automatic Methods for K-Selection. International Journal of Advanced Computer Science and Applications, 14(4). https://doi.org/10.14569/IJACSA.2023.0140444

Mladenova, Tsvetelina, and Irena Valova. "Classification with K-Nearest Neighbors Algorithm: Comparative Analysis between the Manual and Automatic Methods for K-Selection." International Journal of Advanced Computer Science and Applications, vol. 14, no. 4, 2023, https://doi.org/10.14569/IJACSA.2023.0140444.

@article{Mladenova2023,
  title     = {Classification with K-Nearest Neighbors Algorithm: Comparative Analysis between the Manual and Automatic Methods for K-Selection},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {14},
  number    = {4},
  year      = {2023},
  publisher = {The Science and Information Organization},
  author    = {Tsvetelina Mladenova and Irena Valova},
  doi       = {10.14569/IJACSA.2023.0140444},
  url       = {https://doi.org/10.14569/IJACSA.2023.0140444}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.