Leveraging K-Nearest Neighbors for Enhanced Fruit Classification and Quality Assessment

  • I Gede Iwan Sudipa Institut Bisnis dan Teknologi Indonesia
  • Rezania Agramanisti Azdy Universitas Bina Darma
  • Ika Arfiani Universitas Ahmad Dahlan
  • Nicodemus Mardanus Setiohardjo Politeknik Negeri Kupang
  • Sumiyatun Universitas Teknilogi Digital Indonesia

Keywords: K-Nearest Neighbors, Fruit Classification, Quality Assessment, Agricultural Technology, Machine Learning, Cross-Validation

Abstract

This study investigates the application of the K-Nearest Neighbors (KNN) algorithm for fruit classification and quality assessment, aiming to enhance agricultural practices through machine learning. Employing a comprehensive dataset that encapsulates various fruit attributes such as size, weight, sweetness, crunchiness, juiciness, ripeness, acidity, and quality, the research leverages a 5-fold cross-validation method to ensure the reliability and generalizability of the KNN model's performance. The findings reveal that the KNN algorithm demonstrates high accuracy, precision, recall, and F1-Score across all metrics, indicating its efficacy in classifying fruits and predicting their quality accurately. These results not only validate the algorithm's potential in agricultural applications but also align with existing research on machine learning's capability to tackle complex classification problems. The study's discussions extend to the practical implications of implementing a KNN-based model in the agricultural sector, highlighting the possibility of revolutionizing quality control and inventory management processes. Moreover, the research contributes to the field by confirming the hypothesis regarding the effectiveness of KNN in agricultural settings and lays the foundation for future explorations that could integrate multiple machine learning techniques for enhanced outcomes. Recommendations for subsequent studies include expanding the dataset and exploring algorithmic synergies, aiming to further the advancements in agricultural technology and machine learning applications.

Downloads

Download data is not yet available.

References

N. D. Mu’azu, “K-nearest neighbor based computational intelligence and RSM predictive models for extraction of Cadmium from contaminated soil,” Ain Shams Eng. J., vol. 14, no. 4, 2023, doi: 10.1016/j.asej.2022.101944.

R. Siddalingappa, “K-nearest-neighbor algorithm to predict the survival time and classification of various stages of oral cancer: a machine learning approach,” F1000Research, vol. 11, p. 70, 2022, doi: 10.12688/f1000research.75469.2.

A. A. Ewees, “Performance analysis of Chaotic Multi-Verse Harris Hawks Optimization: A case study on solving engineering problems,” Eng. Appl. Artif. Intell., vol. 88, 2020, doi: 10.1016/j.engappai.2019.103370.

E. Alcaras, “Machine Learning Approaches for Coastline Extraction from Sentinel-2 Images: K-Means and K-Nearest Neighbour Algorithms in Comparison,” Communications in Computer and Information Science, vol. 1651. pp. 368–379, 2022, doi: 10.1007/978-3-031-17439-1_27.

E. Najwaini, T. E. Tarigan, and F. P. Putra, “Penerapan Algoritma K-Nearest Neighbors ( KNN ) pada Dataset Brain Tumor,” Int. J. Artif. Intell. Med. Issues, vol. 1, no. 1, pp. 14–19, 2023, doi: 10.56705/ijaimi.v1i1.85.

O. Karal, “Performance comparison of different kernel functions in SVM for different k value in k-fold cross-validation,” Proc. - 2020 Innov. Intell. Syst. Appl. Conf. ASYU 2020, 2020, doi: 10.1109/ASYU50717.2020.9259880.

B. D. Finley, Optimizing Data Pre-Processing Transformations with Reinforcement Learning. search.proquest.com, 2022.

J. Zhao, K. S. Chong, W. Shu, and ..., “A Data Pre-Processing Module for Improved-Accuracy Machine-Learning-based Micro-Single-Event-Latchup Detection,” 2023 IEEE 9th Int. …, 2023, doi: 10.1109/SMC-IT56444.2023.00009.

K. N. Myint and Y. Y. Hlaing, “Predictive Analytics System for Stock Data: methodology, data pre-processing and case studies,” 2023 IEEE Conf. Comput. …, 2023, doi: 10.1109/ICCA51723.2023.10182047.

G. Ketepalli and P. Bulla, “Data Preparation and Pre-processing of Intrusion Detection Datasets using Machine Learning,” 2023 Int. Conf. …, 2023, doi: 10.1109/ICICT57646.2023.10134025.

R. Gal, M. Arar, Y. Atzmon, A. H. Bermano, and ..., “Encoder-based domain tuning for fast personalization of text-to-image models,” ACM Trans. …, 2023, doi: 10.1145/3592133.

S. Horiguchi, Y. Fujita, S. Watanabe, and ..., “Encoder-decoder based attractors for end-to-end neural diarization,” … /ACM Trans. …, 2022, doi: 10.1109/TASLP.2022.3162080.

S. Hidayat, H. M. T. Ramadhan, and ..., “Comparison of K-Nearest Neighbor and Decision Tree Methods using Principal Component Analysis Technique in Heart Disease Classification,” Indones. J. …, 2023, doi: 10.56705/ijodas.v4i2.70.

X. Hu, “K-Nearest Neighbor Estimation of Functional Nonparametric Regression Model under NA Samples,” Axioms, vol. 11, no. 3, 2022, doi: 10.3390/axioms11030102.

C. Feng, “An Enhanced Quantum K-Nearest Neighbor Classification Algorithm Based on Polar Distance,” Entropy, vol. 25, no. 1, 2023, doi: 10.3390/e25010127.

H. Oumarou and N. Rismayanti, “Automated Classification of Empon Plants: A Comparative Study Using Hu Moments and K-NN Algorithm,” Indones. J. Data …, 2023, doi: 10.56705/ijodas.v4i3.115.

T. A. Reist, “Cross validation of aerodynamic shape optimization methodologies for aircraft wing-body optimization,” AIAA J., vol. 58, no. 6, pp. 2581–2595, 2020, doi: 10.2514/1.J059091.

K. M. Bain, “Cross-validation of three Advanced Clinical Solutions performance validity tests: Examining combinations of measures to maximize classification of invalid performance,” Appl. Neuropsychol., vol. 28, no. 1, pp. 24–34, 2021, doi: 10.1080/23279095.2019.1585352.

A. Das, “Assessment of peri-urban wetland ecological degradation through importance-performance analysis (IPA): A study on Chatra Wetland, India,” Ecol. Indic., vol. 114, 2020, doi: 10.1016/j.ecolind.2020.106274.

K. Nidhul, “Enhanced thermo-hydraulic performance in a V-ribbed triangular duct solar air heater: CFD and exergy analysis,” Energy, vol. 200, 2020, doi: 10.1016/j.energy.2020.117448.

Published
2024-03-31
How to Cite
Iwan Sudipa, I. G., Azdy, R. A., Arfiani, I., Setiohardjo, N. M., & Sumiyatun. (2024). Leveraging K-Nearest Neighbors for Enhanced Fruit Classification and Quality Assessment. Indonesian Journal of Data and Science, 5(1), 30-36. https://doi.org/10.56705/ijodas.v5i1.125