Guan'gai paishui xuebao (Sep 2023)

Predicting Soil K+ and Na+ Contents in Cotton Field Using Machine Learning Algorithm

  • TANG Maosong,
  • ZHANG Nan,
  • LI Guohui,
  • ZHAO Zeyi,
  • LI Mingfa,
  • WANG Xingpeng

DOI
https://doi.org/10.13522/j.cnki.ggps.2022405
Journal volume & issue
Vol. 42, no. 9
pp. 32 – 39

Abstract

Read online

【Objective】 The contents of K+ and Na+ in soil affect soil fertility and quality, and understanding their spatiotemporal changes and the factors influencing their changes is critical to improving soil management and alleviating soil alkalization. We propose a machine learning method to predict changes in K+ and Na+ content in soils. 【Method】 Taking data measured from a cotton field in Southern Xinjiang as an example, we compared four machine learning algorithms: support vector regression (SVR), random forest regression (RFR), K-nearest neighbor regression (KNNR), and gradient lifting regression tree (GBRT). All algorithms were first trained based on K+ and Na+ measured in 2020, and the trained models were then tested against the data measured in 2021. The accuracy and robustness of the models were evaluated using the mean absolute errors (MAE), root mean square error (RMSE), and the determination coefficient (R2). 【Result】 The MAE of SVR, RFR, KNNR and GBRT for predicting K+ content was 0.100, 0.169, 0.169 and 0.167 g/kg, respectively; their associated RMSE was 0.119, 0.218, 0.218 g/kg and 0.223 g/kg, respectively, and their R2 was 0.687, 0.437, 0.430, and 0.395, respectively. For predicting Na+ content, the MAE of SVR, RFR, KNNR and GBRT was 0.841, 2.841, 2.826 g/kg, and 2.856 g/kg, respectively; and their RMSE was 1.154, 3.658, 3.630 g/kg, and 3.650 g/kg, respectively, and R2 was 0.838, 0.299, 0.219, and 0.200, respectively. SVR model is most accurate for predicting soil K+ and Na+ in the depths of 0~10, 10~20, 20~30 and 30~40 cm, with its MAE for K+ at the four depths being 0.122, 0.114, 0.056 g/kg and 0.106 g/kg, respectively, and RMSE being 0.135, 0.135, 0.069 g/kg and 0.126 g/kg, respectively. The MAE of SVR for predicting Na+ at the four depths was 0.540, 0.619, 0.835 g/kg and 1.371 g/kg, respectively, and its RMSE was 0.636, 0.748, 1.198 g/kg and 1.710 g/kg, respectively. 【Conclusion】 Among the four algorithms we compared, SVR is most accurate for predicting soil K+ and Na+ at depth from 0 to 40 cm, and it can be used to predict variation in K+ and Na+ in response to environmental change in the cotton fields in Southern Xinjiang.

Keywords