Classification of Coconut Fruit Quality Using The K-Nearest Neighbour (K-NN) Method Based on Feature Extraction: Color, Shape, and Texture
Abstract
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%.
Keywords
Full Text:
PDFReferences
R. Sari, “Strategi Pemerintah Kabupaten Indragiri Hilir Dalam Menjaga Stabiltas Harga Guna Meningkatkan Kesejahteraan Petani Kelapa Di Kecamatan Batang Tuaka,” Jisip-Unja, vol. 5, no. 1, pp. 52–63, 2021.
H. Anggrasari, A. K. Sari, and F. R. Arminda, “Indonesian Coconut Oil Export Opportunities with Main Trade Partner Countries in the International Market,” Bul. Penelit. Sos. Ekon. Pertan. Fak. Pertan. Univ. Haluoleo, vol. 25, no. 1, pp. 44–55, 2023, doi: 10.37149/bpsosek.v25i1.445.
R. Nandaputra, H. T. Sukmana, S. Aripiyanto, Y. Durrachman, D. Khairani, and S. U. Masruroh, “Transfer Learning for Coconut Quality Classification Using the Pretrained Model Efficientnet,” in 2024 12th International Conference on Cyber and IT Service Management (CITSM), 2024, pp. 1–7. doi: 10.1109/CITSM64103.2024.10775588.
T. C. Lim, J. O. Torregosa, A. R. A. Pescadero, and R. S. Pangantihon, “De-husked Coconut Quality Evaluation using Image Processing and Machine Learning Techniques,” ACM Int. Conf. Proceeding Ser., pp. 28–33, 2019, doi: 10.1145/3383783.3383789.
S. Siddesha and S. K. Niranjan, “Color and texture in classification of coconut,” Int. J. Innov. Technol. Explor. Eng., vol. 8, no. 8, pp. 1745–1750, 2019.
N. A. Fadchar and J. C. D. Cruz, “A Non-Destructive Approach of Young Coconut Maturity Detection using Acoustic Vibration and Neural Network,” Proc. - 2020 16th IEEE Int. Colloq. Signal Process. its Appl. CSPA 2020, no. Cspa, pp. 136–140, 2020, doi: 10.1109/CSPA48992.2020.9068723.
J. A. Widians, H. S. Pakpahan, E. Budiman, H. Haviluddin, and M. Soleha, “Klasifikasi Jenis Bawang Menggunakan Metode K-Nearest Neighbor Berdasarkan Ekstraksi Fitur Bentuk dan Tekstur,” J. Rekayasa Teknol. Inf., vol. 3, no. 2, p. 139, 2019, doi: 10.30872/jurti.v3i2.3213.
H. P. Hadi and E. H. Rachmawanto, “Ekstraksi Fitur Warna Dan Glcm Pada Algoritma Knn Untuk Klasifikasi Kematangan Rambutan,” J. Inform. Polinema, vol. 8, no. 3, pp. 63–68, 2022, doi: 10.33795/jip.v8i3.949.
S. F. A. Wijaya, K. Koredianto, and S. Saidah, “Analisis Perbandingan K-Nearest Neighbor dan Support Vector Machine pada Klasifikasi Jenis Sapi dengan Metode Gray Level Coocurrence Matrix,” J. Ilmu Komput. dan Inform., vol. 2, no. 2, pp. 93–102, 2022, doi: 10.54082/jiki.27.
M. Muchtar and R. A. Muchtar, “Perbandingan Metode Knn Dan Svm Dalam Klasifikasi Kematangan Buah Mangga Berdasarkan Citra Hsv Dan Fitur Statistik,” J. Inform. dan Tek. Elektro Terap., vol. 12, no. 2, pp. 876–884, 2024, doi: 10.23960/jitet.v12i2.4010.
E. F. Vermote, S. Skakun, I. Becker-Reshef, and K. Saito, “Remote sensing of coconut trees in Tonga using very high spatial resolution WorldView-3 data,” Remote Sens., vol. 12, no. 19, pp. 1–8, 2020, doi: 10.3390/RS12193113.
Y. Prabowo and K. N. Nasahara, “Detecting and Counting Coconut Trees in Pleiades Satellite Imagery Using Histogram of Oriented Gradients and Support Vector Machine,” Int. J. Remote Sens. Earth Sci., vol. 16, no. 1, p. 87, 2019, doi: 10.30536/j.ijreses.2019.v16.a3089.
L. M. B. Alonzo, F. B. Chioson, H. S. Co, N. T. Bugtai, and R. G. Baldovino, “A machine learning approach for coconut sugar quality assessment and prediction,” 2018 IEEE 10th Int. Conf. Humanoid, Nanotechnology, Inf. Technol. Commun. Control. Environ. Manag. HNICEM 2018, pp. 1–4, 2019, doi: 10.1109/HNICEM.2018.8666315.
A. Aquino, M. G. A. Bautista, A. Bandala, and E. Dadios, “Color quality assessment of coconut sugar using Artificial Neural Network (ANN),” 8th Int. Conf. Humanoid, Nanotechnology, Inf. Technol. Commun. Control. Environ. Manag. HNICEM 2015, no. December, 2016, doi: 10.1109/HNICEM.2015.7393182.
D. Nesarajan, L. Kunalan, M. Logeswaran, S. Kasthuriarachchi, and D. Lungalage, “Coconut Disease Prediction System Using Image Processing and Deep Learning Techniques,” 4th Int. Conf. Image Process. Appl. Syst. IPAS 2020, pp. 212–217, 2020, doi: 10.1109/IPAS50080.2020.9334934.
I. Bhat, U. V, N. Jagadeesh, S. Bhat, and R. S. Shenoy, “Tender Coconut Classification using Decision Tree and Deep Learning Technique,” 2023 10th Int. Conf. Signal Process. Integr. Networks, pp. 395–398, 2023, doi: 10.1109/SPIN57001.2023.10117353.
A. S. Sagayaraj, T. K. Devi, and S. Umadevi, “Prediction of Sulfur Content in Copra Using Machine Learning Algorithm,” Appl. Artif. Intell., vol. 35, no. 15, pp. 2228–2245, 2021, doi: 10.1080/08839514.2021.1997214.
J. A. Caladcad et al., “Determining Philippine Coconut Maturity Level Using Machine Learning Algorithms Based On Acoustic Signal,” Comput. Electron. Agric., vol. 172, no. November 2019, p. 105327, 2020, doi: 10.1016/j.compag.2020.105327.
K. Vishruth, G. B. Srujana, and S. Shetty, “Analyzation of Quality of Coconut,” no. May, pp. 5522–5527, 2019.
H. T. Sukmana, Puspitasari, A. Alamsyah, S. Aripiyanto, and L. K. Oh, “Improving Performance of Copra Type Classification Using Feature Extraction With K-Nearest Neighbour Algorithm,” Int. J. Ebus. eGovernment Stud., vol. 15, no. 1, pp. 512–532, 2023, doi: 10.34111/ijebeg.2023150123.
A. Anton, N. F. Nissa, A. Janiati, N. Cahya, and P. Astuti, “Application of Deep Learning Using Convolutional Neural Network (CNN) Method For Women’s Skin Classification,” Sci. J. Informatics, vol. 8, no. 1, pp. 144–153, 2021, doi: 10.15294/sji.v8i1.26888.
H. Mayatopani, R. I. Borman, W. T. Atmojo, and Arisantoso, “Classification of Vehicle Types Using Backpropagation,” J. Ris. Inform., vol. 4, no. 1, 2021, [Online]. Available: https://ejournal.kresnamediapublisher.com/index.php/jri/article/view/139
Suharjito, B. Imran, and A. S. Girsang, “Family relationship identification by using extract feature of gray level co-zoccurrence matrix (GLCM) based on parents and children fingerprint,” Int. J. Electr. Comput. Eng., vol. 7, no. 5, pp. 2738–2745, 2017, doi: 10.11591/ijece.v7i5.pp2738-2745.
D. Rajput, W. J. Wang, and C. C. Chen, “Evaluation of a decided sample size in machine learning applications,” BMC Bioinformatics, vol. 24, no. 1, pp. 1–17, 2023, doi: 10.1186/s12859-023-05156-9.
“ICAO document 07 - Methodology for Actual Life Cycle Emissions - March 2024.pdf,” no. March, 2024.
E. A. B. Flores, H. V. Olivera, I. C. M. Valencia, and C. F. M. Cubas, “Fruit Fly Classification (Diptera: Tephritidae) in Images, Applying Transfer Learning,” 2025, [Online]. Available: http://arxiv.org/abs/2502.00939
DOI: https://doi.org/10.15408/jti.v18i1.41225
Refbacks
- There are currently no refbacks.
Copyright (c) 2025 Sucinda Kardena, Fildza Izzati,Rusdah

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
3rd Floor, Dept. of Informatics, Faculty of Science and Technology, UIN Syarif Hidayatullah Jakarta
Jl. Ir. H. Juanda No.95, Cempaka Putih, Ciputat Timur.
Kota Tangerang Selatan, Banten 15412
Tlp/Fax: +62 21 74019 25/ +62 749 3315
Handphone: +62 8128947537
E-mail: jurnal-ti@apps.uinjkt.ac.id
Jurnal Teknik Informatika by Prodi Teknik Informatika Universitas Islam Negeri Syarif Hidayatullah Jakarta is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at http://journal.uinjkt.ac.id/index.php/ti.
JTI Visitor Counter: View JTI Stats