Jurnal Pengabdian Masyarakat dan Riset Pendidikan
Vol. 4 No. 3 (2026): Jurnal Pengabdian Masyarakat dan Riset Pendidikan Volume 4 Nomor 3 (Januari 202

Penerapan Algoritma k-Nearest Neighbor untuk Klasifikasi Kondisi Lingkungan Pertanian Berbasis IoT : Penelitian

Panji Pangestu Saputra (Unknown)
Hasbi Firmansyah (Unknown)
Rizki Prasetyo Tulodo (Unknown)
Priyo Haryoko (Unknown)
Wahyu Asriyani (Unknown)



Article Info

Publish Date
24 Dec 2025

Abstract

The development of the Internet of Things (IoT) has encouraged the adoption of smart technologies in agriculture to enable real-time environmental monitoring. This study aims to apply the k-Nearest Neighbor (k-NN) algorithm to classify agricultural environmental conditions into ideal and non-ideal categories based on IoT sensor data. The dataset used in this research was obtained from an open-source repository and consists of several environmental parameters, including temperature, humidity, and soil moisture. The research stages include data preprocessing, attribute and label determination, data normalization using the z-transformation method, and model evaluation through cross validation. The performance of the classification model was assessed using accuracy, precision, recall, and F-measure metrics. The experimental results indicate that the k-NN algorithm is capable of providing good classification performance in identifying agricultural environmental conditions. However, limitations were observed in detecting minority class instances, suggesting the need for further parameter optimization and model enhancement. This research is expected to serve as a foundation for the development of IoT-based smart agriculture systems to support more effective decision-making in agricultural environmental management.

Copyrights © 2026






Journal Info

Abbrev

jerkin

Publisher

Subject

Humanities Education Languange, Linguistic, Communication & Media Mathematics Other

Description

Jurnal Pengabdian Masyarakat dan Riset Pendidikan is a journal on Faculty of Education. Jurnal JERKIN: Jurnal Pengabdian Masyarakat dan Riset Pendidikan is under the auspices of the Faculty of Education, Universitas Pahlawan Tuanku Tambusai. The journal is registered with E-ISSN: 2961-9890. Jurnal ...