Classification of Coconut Fruit Quality Using The K-Nearest Neighbour (K-NN) Method Based on Feature Extraction: Color, Shape, and Texture - Sucinda Kardena; Fildza Izzati; Rusdah Rusdah (JURNAL TEKNIK INFORMATIKA, 2025)
In 2021, Indonesia was the world's largest coconut producer, with production reaching 17.1 million tons, according to the Food and Agriculture Organization (FAO). However, due to the long distribution time from farmers to consumers, the quality of coconuts often decreases, mainly due to manual classification. Coconuts that meet consumption standards are considered suitable, while coconuts that are overripe, damaged, or unripe are considered Non-standard. To overcome this problem, an automatic classification system was developed using machine learning with the K-Nearest Neighbor (K-NN) algorithm. The total required dataset is around 500, comprising 250 standard coconut datasets and 250 non-standard coconut datasets. The dataset was taken from coconut Images from Indragiri Hilir, Riau Province. Coconut features colour, shape, and texture.. The development process used the Cross Industry Standard Process for Data Mining (CRISP-DM). The evaluation used a confusion matrix .This study explores five training-test ratio data split scenarios of 90:10, 80:20, 70:30, 60:40, and 50:50. The highest accuracy, 96%, is achieved with a data split of 90:10 and a K value 5. Then, the K-NN model will be compared with other models,  for Support Vector Machine (SVM) with RBF kernel accuracy of 94%, SVM with Linear kernel of 90%, Random Forest with accuracy of 92%, and Convolutional Neural Network (CNN) with accuracy of 86%.