Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi)
Vol 9 No 4 (2025): OCTOBER-DECEMBER 2025

Klasifikasi Kualitas Tanah Berdasarkan Kandungan pH, Kelembapan, dan Suhu Menggunakan Algoritma K-Nearest Neighbors

Md Wira Putra Dananjaya (Universitas Pendidikan Nasional)
Gede Humaswara Prathama (Universitas Pendidikan Nasional)
I Gusti Ngurah Darma Paramartha (Universitas Pendidikan Nasional)
Putu Gita Pujayanti (Universitas Pendidikan Nasional)



Article Info

Publish Date
01 Oct 2025

Abstract

This study aims to analyze soil quality using the K-Nearest Neighbors (KNN) algorithm based on environmental parameters such as temperature, humidity, pH, and nutrient content (N, P, K). The dataset used consists of 660 entries covering 22 different classes describing soil types with varying characteristics. The KNN model was applied to classify soil quality, and the results were evaluated using the Confusion Matrix and Classification Report. The accuracy of the model obtained was around 61%, indicating potential improvements in the classification of some more difficult soil classes. The model performed better on certain classes such as kidney beans, chickpeas, and grapes, but was less than optimal on other classes such as watermelon and pomegranate. These results indicate class alignment in the dataset that affects model performance. This study contributes to the application of machine learning algorithms in agriculture, especially for soil quality monitoring. In the future, this study opens up opportunities for further improvements by using parameter optimization techniques and other more complex algorithms. Thus, the results of this study can be used as a basis for developing intelligent systems for more effective and efficient soil management.

Copyrights © 2025






Journal Info

Abbrev

jtik

Publisher

Subject

Computer Science & IT Control & Systems Engineering Decision Sciences, Operations Research & Management

Description

Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi), e-ISSN: 2580-1643 is a free and open-access journal published by the Research Division, KITA Institute, Indonesia. JTIK Journal provides media to publish scientific articles from scholars and experts around the world related to Hardware ...