Published: 2025-10-01

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

DOI: 10.35870/jtik.v9i4.4049

Issue Cover

Downloads

Article Metrics
Share:

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.

Keywords

KNN ; Agriculture ; Classification

Peer Review Process

This article has undergone a double-blind peer review process to ensure quality and impartiality.

Indexing Information

Discover where this journal is indexed at our indexing page to understand its reach and credibility.

Open Science Badges

This journal supports transparency in research and encourages authors to meet criteria for Open Science Badges by sharing data, materials, or preregistered studies.

Similar Articles

You may also start an advanced similarity search for this article.