Influence of sample size and machine learning algorithms on digital soil nutrient mapping accuracy.
Journal:
Environmental monitoring and assessment
Published Date:
Aug 8, 2025
Abstract
The objective of this study is to evaluate and compare the performance of different machine learning (ML) algorithms, viz., multi-layer perceptron (MLP), random forest (RF), extra trees regressor (ETR), CatBoost, and gradient boost (GB), considering the impact of variation in sample sizes for the prediction of soil nutrients. In this context, this study evaluates the impact of sample size on the prediction performance of five ML algorithms for mapping 14 soil properties, including key soil physico-chemical properties (soil organic carbon, pH, and electrical conductivity), and multiple macro (available nitrogen, phosphorus, potassium, calcium, magnesium, and sulfur) and micronutrients (available iron, manganese, copper, zinc, and boron) at a geographical extent of 8303 km located in eastern India. A total of 1024 surface soil samples were collected, of which 800 were used for model training, while the remaining 224 were reserved for independent validation (IV) of the resultant maps. The original training data set (800 samples) was reduced by random selection into six different sample sizes, i.e., 800, 400, 200, 100, 50, and 25. An exhaustive set of 574 environmental variables, derived from digital terrain derivatives and Sentinel-2 satellite imagery, was used as predictors. Popular statistical indicators, such as Lin's concordance correlation coefficient (CCC) and root mean squared error (RMSE) were employed to evaluate the predictive capability of the algorithms under different sample size scenarios. The results showed that prediction accuracy and reliability of prediction performance across multiple target variables improved with sample size. However, beyond a certain point, improvement in predictive performance became substantially negligible compared to the efforts in additional sampling. All the ML algorithms performed well (mean IV-CCC varied between 0.26 and 0.64 for different soil properties) to increase in sample size, except MLP, which exhibited a poorer prediction performance (mean IV-CCC varied between 0.14 and 0.29 for different soil properties). Micronutrients in general responded well to the increase in sample sizes. The uncertainty analysis revealed that increasing sample size generally reduced prediction uncertainty, though the extent varied by soil property and ML algorithm. Concisely, the results presented herein showed an effective manner of selecting an appropriate sample size and a suitable ML algorithm to predict multiple soil nutrients accurately, which would be recommended to achieve optimal accuracy for a project.