Skip to content
Conference

Machine Learning-Based Crop Recommendation System Using Soil Analysis Parameters

Sep 2026 · 2026 7th International Conference on Artificial Intelligence and Data Sciences (AiDAS) · pp. 552-557 · 0 citations · 24 references

Abstract

In Agricultural Census 2024, crop subsector was the largest contributor to Malaysia's agriculture total income. It contributed at RM132.06 billion which comprises 70.8% of the total income. With the huge portion of crops subsector, the transition to precision agriculture is eminent. Part of precision agriculture practice requires specific analysis on the soil and crop suitability to maximize the yield. This study aims to construct machine learning models for crop recommendation using soil analysis. We propose the use of nitrogen (N), phosphorus (P), potassium (K), temperature, humidity, pH, and rainfall as the parameters for the recommendation model. The project development uses the Harvard Dataverse dataset containing 1,500 instances across 15 crop categories. The dataset is used in experimentation using Random Forest (RF), Naïve Bayes (NB), K-Nearest Neighbour (KNN), Support Vector Machine (SVM), and Logistic Regression (LR) model. We use the multiple train-test split ratios and hyperparameter configurations. Subsequently, we found that the optimised NB model achieves the highest testing accuracy of 99.78% using a 70:30 train-test split. The model is then deployed in a Streamlit prototype to provide crop recommendations. Functional testing with known dataset records verified the model-prototype integration. However, formal user acceptance testing and external Malaysian field validation were not conducted. Therefore, the system’s practical usability and generalisability require further evaluation under diverse real-world agricultural conditions.

View source

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.