Published December 10, 2025 | Version v1

Optimized Weighted K-Nearest Neighbors Algorithm for Automated Classification of Banana Quality

  • 1. Final Year Student, Department of Computer Science and Engineering, Veer Surendra Sai University of Technology, Odisha, India.
  • 2. Associate Professor, Department of Computer Science and Technology, Veer Surendra Sai University of Technology, Odisha, India.

Description

Abstract: In this paper, the optimized weighted K-Nearest Neighbors (WKNN) algorithm was utilized for an efficient two-class automatic banana quality classification: good and bad. The seven-feature-based dataset was normalized, and then it was split into three parts: training, validation, and testing. Feature weights were incrementally adjusted based on errors over 70 training epochs evaluated on the validation set such that informative features were assigned more weight. When converged, the final KNN classifier with  k=5  neighbors was tested on a separate test batch. The model achieved 98.10%, 97.98%, 98.23%, 97.97%, and 98.10% accuracy, precision, sensitivity, specificity, and F1-score for the good quality class, respectively. The error decreased from 0.260 to 0.191 in training, and the weights of size and weight dominated. Our results demonstrate that the proposed WKNN has the potential for day-to-day banana grading with high reliability and uniformity in the automated inspection systems.

 

Files

ISARJST-2352025FT GP.pdf

Files (1.0 MB)

Name Size
md5:fbad1a920f5e541f65da8376b77e2277
1.0 MB Preview Download