Journal of Technology and Informatics (JoTI)
Vol. 8 No. 2 (2026): Vol. 8 N. 2 (2026)

Data Integrated K-Means Clustering And Random Forest Classification For Crop Recommendation Based On Environmental Parameters

Aryanti Aryanti (Politeknik Negeri Sriwijaya)
M. Dimas Putra Ramadhan (Politeknik Negeri Sriwijaya)
Muhammad Arcy Alfaathir (Politeknik Negeri Sriwijaya)
Ghefira Fariah (Politeknik Negeri Sriwijaya)
Putri Arum Sari (Politeknik Negeri Sriwijaya)



Article Info

Publish Date
23 Oct 2026

Abstract

The agricultural sector plays a strategic role in Indonesia’s economy, yet inappropriate crop selection under specific environmental conditions can reduce yields and cause economic losses. Existing studies commonly apply individual classifiers to environmental data, while clustering is often used only for descriptive analysis. This study proposes an integrated two-stage pipeline combining K-Means clustering and Random Forest classification for crop recommendation. First, K-Means groups 22 crop types based on four environmental parameters: temperature, humidity, soil pH, and rainfall. The resulting cluster membership is then encoded as an additional categorical feature and combined with normalized environmental features for Random Forest classification. Experiments using 2,200 samples from Kaggle identified four clusters, achieving a Davies–Bouldin Index of 0.84 and a Silhouette Score of 0.61. The integrated model achieved 97.7% test accuracy, with precision, recall, and F1-score of 0.99, outperforming the Random Forest baseline accuracy of 96.9%. These findings demonstrate the potential benefits of incorporating unsupervised cluster information into supervised classification. This approach offers a reusable feature-augmentation framework for agricultural intelligent decision support systems.

Copyrights © 2026






Journal Info

Abbrev

joti

Publisher

Subject

Computer Science & IT Control & Systems Engineering Electrical & Electronics Engineering Engineering Mechanical Engineering

Description

1. Teknologi Informasi : Rekayasaperangkat lunak, Pengetahuan data maining, Mobile Computing, Parallel/Distributed Computing, Kecerdasan Buatan, Tata Kelola dan Manajemen Sistem Informasi, User Interface/ User Experience, Process Management, IT Security, IS Adoption and Evaluation. 2. Sistem ...