Machine Learning-Based Land Suitability Classification Using NPK and Environmental Factors
Abstract
An accurate estimation of soil fertility is needed for the purposes of nutrient management and the practice of precision agriculture. The objective of this research is to build and test a machine learning model for the classification of soil fertility status using seven parameters which are nitrogen (N), phosphorus (P), potassium (K), pH, EC, soil temperature and soil moisture content. Data were collected via measuring using an Internet of Things (IoT) based NPK Meter system. After the pre-processing of data, 91 observations were collected with 7 predictors, and they were grouped into three classes of soil fertility status, which are infertile, moderately fertile, and fertile. The three machine learning algorithms tested were the Artificial Neural Network (ANN), Gradient Boosting Machine (GBM) and CatBoost. The data was divided into 90% training data and 10% test data, whereas the performance of the model was evaluated using accuracy, precision, recall, F1 score, confusion matrix, and Area Under the ROC Curve (AUC). The test results showed that the ANN achieved an accuracy of 100 per cent, whilst the GBM and CatBoost each achieved 90 per cent using the data split employed. Feature contribution analysis indicates that the NPK parameters, moisture content and electrical conductivity provide predictive information for distinguishing soil fertility classes, although the magnitude of their contribution varies across the different algorithms. These results demonstrate the potential of combining IoT-based soil sensors and machine learning to support the classification of soil conditions.