K-Nearest Neighbors Classification Analysis of Rice Farmer Productivity Using Harvest Data for Agricultural Evaluation in Sayur Matinggi District
DOI:
https://doi.org/10.69916/jkbti.v5i3.512Keywords:
transfer learning, ResNet-50, fine-tuning, tomato leaf disease classification, convolutional neural networkAbstract
Rice productivity evaluation in Sayur Matinggi District has traditionally relied on descriptive comparisons of harvest records, which do not provide a consistent classification of productivity levels across villages. This study develops a web-based analytical system using the K-Nearest Neighbors (KNN) algorithm to classify rice farmer productivity from harvest data collected in 19 villages during 2023-2025. The original wide-format dataset was transformed into 57 village-year observations. Productivity labels were constructed objectively using the 33rd and 66th quantiles of the production-to-harvested-area ratio, producing Low, Medium, and High classes. A stratified random split allocated 45 observations to training data and 12 observations to testing data. Three numerical attributes were used in the final model: harvested area, rice production, and cropping index. Min-Max normalization was applied before Euclidean-distance computation and majority voting. Evaluation of K values from 1 to 10 showed the highest accuracy at K=4 and K=5, both reaching 41.67%; K=4 was selected as the simpler model. At K=4, five of twelve testing observations were classified correctly. The confusion matrix showed a tendency to over-predict the Medium class, while macro-average precision, recall, and F1-score were 44.44%, 38.33%, and 34.43%, respectively. Functional black-box testing across twelve scenarios produced results consistent with the expected outputs. The findings indicate that the KNN workflow was implemented correctly, while the limited predictive accuracy is primarily associated with small sample size and weak class separability in the available harvest attributes.
Downloads
References
A. Leiansyah and A. Putra, “Prosiding Diseminasi Ilmiah UM Jambi EVALUASI POTENSI SEKTOR PERTANIAN PROVINSI JAMBI DALAM PERSPEKTIF KONTRIBUSI DAN PRODUKTIVITAS,” 2024.
N. N. Khasanah and E. Y. A. Gunanto, “Pengaruh Luas Panen Padi, Produktivitas Lahan, Pertumbuhan Harga Beras dan Jumlah Penduduk terhadap Ketersediaan Beras di Indonesia tahun 1990-2022,” Diponegoro J. Econ., vol. 13, no. 2, pp. 67–79, Jun. 2024, doi: 10.14710/djoe.44900.
D. A. Saputri, “Pemanfaatan data mining dalam pengolahan data hasil panen untuk mendukung pengambilan keputusan pertanian,” J. Sist. Inf. dan Komputasi, vol. 8, no. 1, pp. 22–31, 2025.
K. Mustaqim, N. Riza, and M. R. Hidayatullah, “Perbandingan Metode Regresi Linear Dan K-Nearest Neighbor (KNN) Dalam Memprediksi Produksi Tanaman Padi Di Pulau Sumatera,” Data Sci. Indones., vol. 4, no. 2, pp. 60–74, 2024.
B. Y. Yana, Y. V. Via, and A. L. Nurlaili, “Penerapan Algoritma K-Nearest Neighbor Dalam Klasifikasi Penyakit Daun Padi Menggunakan Ekstraksi HOG,” J. Algoritm., vol. 6, no. 1, pp. 110–120, 2025, doi: 10.35957/algoritme.v6i1.12154.
H. N. Wismadi et al., “Jurnal Optimasi Teknik Industri Klasifikasi Varietas Biji Kismis dengan Artificial Neural Network,” J. Optimasi Tek. Ind., vol. 5, no. 1, pp. 8–13, 2023.
A. S. Putra, A. Irianti, and D. A. Heri, “Identifikasi Hama Dan Penyakit Pada Tanaman Kacang Tanah menggunakan Case Based Reasoning dan Algoritma K-Nearest Neighbor,” Konf. Nas. Ilmu Komput., pp. 32–38, 2021.
Titi Supianti, A. A. R. Ashril, Lalu Puji Indra Kharisma, and Khairunnazri, “Sistem Pakar Diagnosa Penyakit Bawang Merah Menggunakan Metode Forward Chainning,” Tek. Teknol. Inf. dan Multimed., vol. 1, no. 2, pp. 7–13, 2021, doi: 10.46764/teknimedia.v1i2.18.
S. S. Sitanggang and A. S. Manalu, “Implementation of Additive Weighting in Providing in Receiving Bidik Misi Scholarships at the Politeknik Bisnis Indonesia,” J. Comput. Networks, Archit. High Perform. Comput., vol. 2, no. 1, pp. 171–179, 2020, doi: 10.47709/cnahpc.v2i1.949.
A. Prasetio, N. Mulyani, and F. M. Yuma, “Metode SAW dalam Penentuan Pemberian Kredit Calon Konsumen pada PT. Interyasa Mitra Mandiri,” J-Com (Journal Comput., vol. 1, no. 1, pp. 65–72, 2021, doi: 10.33330/j-com.v1i1.1090.
S. T. Ananda, A. Susano, and E. A. R. Pinahayu, “Design of A Decision Support System for Employee Recruitment Using the Simple Additive Weighting (SAW) Method Based on Java,” Int. J. Law Soc. Sci. Manag., vol. 1, no. 4, 2024, doi: 10.69726/ijlssm.v1i4.56.
J. Olaniyan, D. Olaniyan, I. C. Obagbuwa, B. M. Esiefarienrhe, and M. Odighi, “Transformative Transparent Hybrid Deep Learning Framework for Accurate Cataract Detection,” Appied Sci., pp. 1–20, 2024.
T. Bagaskara and R. Aulia, “A Hybrid YOLOv5-SqueezeNet Framework with Crop-Union Context Verification for Real-Time Motorcycle Rider Identification,” J. Comput. Technol., vol. 4, no. 1, pp. 34–42, 2026.
S. Mehdipour, S. A. Mirroshandel, and S. A. Tabatabaei, “Vision transformers in precision agriculture: A comprehensive survey,” Intell. Syst. with Appl., vol. 29, p. 200617, 2026, doi: https://doi.org/10.1016/j.iswa.2025.200617.
B. M. Abuhayi and A. A. Mossa, “Coffee disease classification using Convolutional Neural Network based on feature concatenation,” Informatics Med. Unlocked, vol. 39, no. April, p. 101245, 2023, doi: 10.1016/j.imu.2023.101245.
J. Guo, X. Guo, Q. Yi, H. Hao, and Y. Zhao, “Retinal vessel segmentation driven by structure prior tokens.,” Med. Phys., vol. 52, no. 8, p. e18018, Aug. 2025, doi: 10.1002/mp.18018.
M. T. Rahmawita, R. Riswandi, I. Maita, and Z. Zarnelly, “ANALISIS KEPUASAN MAHASISWA DENGAN METODE EUCS DALAM PENGGUNAAN SIASY FAKULTAS TARBIYAH DAN KEGURUAN,” J. Ilm. Rekayasa dan Manaj. Sist. Inf., vol. 8, no. 2, p. 201, Aug. 2022, doi: 10.24014/rmsi.v8i2.18487.
M. Ghahremani, H. A. Otieno, M. Kazreen, and S. Shiaeles, “Machine Learning-Based Loan Approval Automation: Enhancing Efficiency, Accuracy and Fairness in Credit Decision-Making,” Expert Syst., vol. 43, no. 7, p. e70307, 2026, doi: https://doi.org/10.1111/exsy.70307.
B. Imran, Zaeniah, Sriasih, S. Erniwati, and Salman, “Data Mining Using a Support Vector Machine , Decision Tree , Logistic Regression and Random Forest for,” J. INFOKUM, vol. 10, no. 2, pp. 792–802, 2022.
P. Palinggik Allorerung, A. Erna, M. Bagussahrir, and S. Alam, “Analisis Performa Normalisasi Data untuk Klasifikasi K-Nearest Neighbor pada Dataset Penyakit,” 2024.
M. A. Aprihartha, T. N. Alam, and M. Husniyadi, “Perbandingan Metrik Euclidean dan Metrik Manhattan untuk K-Nearest Neighbors dalam Klasifikasi Kismis,” J. Ilmu Komput. dan Inform., vol. 4, no. 1, pp. 21–30, 2024.
W. Nurazijah, R. Kurniawan, and Y. A. Wijaya, “Analisis Dampak Nilai K Optimal Terhadap Akurasi Pada Data Balita Puskesmas Cipaku,” JIKA (Jurnal Inform., vol. 8, no. 2, pp. 197–203, 2024.
D. N. Aini, B. Oktavianti, M. J. Husain, D. A. Sabillah, and T. Rizaldi, “Seleksi Fitur untuk Prediksi Hasil Produksi Agrikultur pada Algoritma K-Nearest Neighbor (KNN),” J. Sist. Komput. dan Inform. Hal, vol. 140, p. 145, 2022.
Downloads
Published
Scite Metrics
Altmetric
How to Cite
Issue
Section
License
Copyright (c) 2026 Ahmad Fauzan Purba, Mulkan Azhari

This work is licensed under a Creative Commons Attribution 4.0 International License.
Most read articles by the same author(s)
- Taufik Rifki Al Hafiz Lubis, Mulkan Azhari, Implementation of the Density-Based Spatial Clustering (DBSCAN) Method to Identify Beauty Clinic Customer Purchasing Patterns , Jurnal Kecerdasan Buatan dan Teknologi Informasi: Vol. 5 No. 3 (2026): September 2026 In progress.
- Azka Naufal El Rumi, Mulkan Azhari, Implementation of a Web-Based Rule-Based System for Determining Goat Health Status from Clinical Symptoms and Feeding Patterns , Jurnal Kecerdasan Buatan dan Teknologi Informasi: Vol. 5 No. 3 (2026): September 2026 In progress.







