Agronomy (Oct 2022)

Predicting Soil Textural Classes Using Random Forest Models: Learning from Imbalanced Dataset

  • Sina Mallah,
  • Bahareh Delsouz Khaki,
  • Naser Davatgar,
  • Thomas Scholten,
  • Alireza Amirian-Chakan,
  • Mostafa Emadi,
  • Ruth Kerry,
  • Amir Hosein Mosavi,
  • Ruhollah Taghizadeh-Mehrjardi

DOI
https://doi.org/10.3390/agronomy12112613
Journal volume & issue
Vol. 12, no. 11
p. 2613

Abstract

Read online

Soil provides a key interface between the atmosphere and the lithosphere and plays an important role in food production, ecosystem services, and biodiversity. Recently, demands for applying machine learning (ML) methods to improve the knowledge and understanding of soil behavior have increased. While real-world datasets are inherently imbalanced, ML models overestimate the majority classes and underestimate the minority ones. The aim of this study was to investigate the effects of imbalance in training data on the performance of a random forest model (RF). The original dataset (imbalanced) included 6100 soil texture data from the surface layer of agricultural fields in northern Iran. A synthetic resampling approach using the synthetic minority oversampling technique (SMOTE) was employed to make a balanced dataset from the original data. Bioclimatic and remotely sensed data, distance, and terrain attributes were used as environmental covariates to model and map soil textural classes. Results showed that based on mean minimal depth (MMD), when imbalanced data was used, distance and annual mean precipitation were important, but when balanced data were employed, terrain attributes and remotely sensed data played a key role in predicting soil texture. Balanced data also improved the accuracies from 44% to 59% and 0.30 to 0.52 with regard to the overall accuracy and kappa values, respectively. Similar increasing trends were observed for the recall and F-scores. It is concluded that, in modeling soil texture classes using RF models through a digital soil mapping approach, data should be balanced before modeling.

Keywords