Enhancing Flower Type Classification Using K-Nearest Neighbors (KNN)

International Journal of Computer Science and Engineering |
© 2025 by SSRG - IJCSE Journal |
Volume 12 Issue 6 |
Year of Publication : 2025 |
Authors : Prit Senjaliya, Khushi Prajapati, Avani Vagadiya |
How to Cite?
Prit Senjaliya, Khushi Prajapati, Avani Vagadiya, "Enhancing Flower Type Classification Using K-Nearest Neighbors (KNN)," SSRG International Journal of Computer Science and Engineering , vol. 12, no. 6, pp. 10-15, 2025. Crossref, https://doi.org/10.14445/23488387/IJCSE-V12I16P102
Abstract:
This research uses a custom-generated dataset to implement the K-Nearest Neighbors (KNN) algorithm for flower classification. The dataset that has been taken for this research consists of 1,000 samples with features including petal and sepal dimensions and tilt angle. Data preprocessing techniques have been employed to improve and clean the manually generated dataset and optimize the performance of the classification model. A 10-fold cross-validation approach has been applied to evaluate the accuracy of classification algorithms and analyze the impact of different hyperparameters on the performance of the KNN algorithm. This study highlights the importance of the feature selection method, data normalization, and k-value optimization in achieving higher accuracy in the classification process. Furthermore, this research focuses on the challenges encountered during model training, such as class imbalance and overfitting. This study also provides perceptions of enhancing KNN's efficiency in multi-class classification tasks and establishes its potential for real-world applications in automated flower identification and similar pattern recognition problems.
Keywords:
Data Preprocessing, Flower Classification, Hyperparameter Tuning, K-Nearest Neighbors, Machine Learning, Multi-Class Classification.
References:
[1] Amer F.A.H. Alnuaimi, and Tasnim H.K. Albaldawi, “An Overview of Machine Learning Classification Techniques,” BIO Web of Conferences, 2024.
[CrossRef] [Google Scholar] [Publisher Link]
[2] Shovan Chowdhury, and Marco P. Schoen, “Research Paper Classification using Supervised Machine Learning Techniques,” 2020 Intermountain Engineering, Technology and Computing, 2020.
[CrossRef] [Google Scholar] [Publisher Link]
[3] Jingwen Sun, Weixing Du, and Niancai Shi, “A Survey of kNN Algorithm,” Information Engineering and Applied Computing, vol. 1, no. 1, 2018.
[CrossRef] [Publisher Link]
[4] Wei Lv et al., “Research and Application of Intersection Similarity Algorithm Based on KNN Classification Model,” 2021 International Conference on Artificial Intelligence, Big Data and Algorithms, 2021.
[CrossRef] [Google Scholar] [Publisher Link]
[5] Yang Gong, and Pan Zhang, “Research and Realization of Air Quality Grade Prediction Based on KNN,” 2021 3rd International Conference on Artificial Intelligence and Advanced Manufacture, 2021.
[CrossRef] [Google Scholar] [Publisher Link]
[6] Yaling Zhu, Jundi Wang, and Xiangwei Li, “Research on GA-KNN Image Classification Algorithm,” 2022 4th International Conference on Artificial Intelligence and Advanced Manufacturing, 2022.
[CrossRef] [Google Scholar] [Publisher Link]
[7] Lisha Yao, and Tiancheng Cao, “Research on Talent Classification Based on Improved KNN Algorithm,” 2022 International Symposium on Control Engineering and Robotics, 2022.
[CrossRef] [Google Scholar] [Publisher Link]
[8] Loredana Firte, Camelia Lemnaru, and Rodica Potolea, “Spam Detection Filter using KNN Algorithm and Resampling,” Proceedings of the 2010 IEEE 6th International Conference on Intelligent Computer Communication and Processing, 2010. [CrossRef] [Google Scholar] [Publisher Link]
[9] Junhao Tan, “Stock Index Forecasting Model Based on Short-term Volatility Trend and KNN Algorithm,” 2022 8th Annual International Conference on Network and Information Systems for Computers, 2022.
[CrossRef] [Google Scholar] [Publisher Link]
[10] F.Y. Osisanwo et al., “Supervised Machine Learning Algorithms: Classification and Comparison,” International Journal of Computer Trends and Technology, vol. 48, no. 2, 2017.
[CrossRef] [Google Scholar] [Publisher Link]
[11] Uduak Idio Akpan, and Andrew Starkey, “Review of Classification Algorithms with Changing Inter-class Distances,” Machine Learning with Applications, vol. 4, 2021.
[CrossRef] [Google Scholar] [Publisher Link]
[12] Li‑Yu Hu et al., “The Distance Function Effect on k‑nearest Neighbor Classification for Medical Datasets,” Springer Plus, vol. 5, 2016.
[CrossRef] [Google Scholar] [Publisher Link]