Prediction of nitrogen leaching from winter-wheat production in North China based on random forest and XGBoost
LI Tao-yu, XU Xiu-chun, YANG Xuan, CUI Bin, CHEN Heng-ai, ZHAO Xiao-ying, YUAN Ning, MENG Fan-qiao
College of Resources and Environmental Sciences, Beijing Key Laboratory of Prevention, Control and Restoration of Farmland Soil Pollution, China Agricultural University, Beijing 100193, China
Abstract:Winter wheat is the main cereal crop in Northern China, and excessive nitrogen (N) fertilization and irrigation are employed in recent years to ensure a high grain yield. A high amount of N was lost via leaching, which exacerbated the risk of non-point source pollution and further increased the resource waste. It is highly necessary to clarify the characteristics and influencing factors of N leaching loss during the winter wheat season in the region. The literature on N leaching loss from the winter wheat production in Northern China, published from 2000 to 2023 was screened, and linear, multiple-factor regression models, as well as random forest and XGBoost models were established in the study. The research showed that the N leaching during the winter wheat season was mainly affected by the fertilizer rate and irrigation water, as well as soil properties (pH, clay and sand content), and was effectively inhibited by crop straw incorporation. Multiple variable combinations were constructed based on the results of importance analysis and stepwise regression. Grid search method, Bayesian and the combination of Bayesian and Early stopping were used to optimize the model parameters. The models constructed through Random Forest, based on all influential variables and based on the influential variables screened by stepwise, had the R2 of 0.628 and 0.708, respectively, and the R2 for the corresponding models constructed through XGBoost were 0.745 and 0.722, respectively. This indicates that the prediction effects of N leaching based on Random Forest and XGBoost were much better than the linear and multiple-factor regression models. The influence of multiple factors on N leaching was comprehensively considered in the machine learning models, and the effects of prediction were better when choosing the influential variables screened by empirical statistical methods as independent variables. The results of this study can provide technical support for reducing the N leaching in the winter wheat production in Northern China.
李涛宇, 许秀春, 杨轩, 崔斌, 陈恒爱, 赵晓莹, 袁宁, 孟凡乔. 利用机器学习预测华北地区冬小麦农田氮淋失[J]. 中国环境科学, 2025, 45(1): 343-354.
LI Tao-yu, XU Xiu-chun, YANG Xuan, CUI Bin, CHEN Heng-ai, ZHAO Xiao-ying, YUAN Ning, MENG Fan-qiao. Prediction of nitrogen leaching from winter-wheat production in North China based on random forest and XGBoost. CHINA ENVIRONMENTAL SCIENCECE, 2025, 45(1): 343-354.
[1] 中华人民共和国国家统计局.中国统计年鉴 [EB/OL]. 2023-9-27 [2023-9-27]. http://www.stats.gov.cn/sj/ndsj/2023/indexch.htm. [2] Lu Y, Wang E L, Zhao Z G, et al. Optimizing irrigation to reduce N leaching and maintain high crop productivity through the manipulation of soil water storage under summer monsoon climate [J]. Field Crops Research, 2021,265:1-11. [3] 金 梁.基于SPWS模型的华北平原农田水氮利用效率及环境效应分析 [D]. 北京:中国农业大学, 2007. Jin L. Analysis of water and nitrogen use efficiency and environmental effect based on the SPWS model in North China Plain [D]. Beijing: China Agricultural University, 2007. [4] Huang M X, Liang T, Wang L Q, et al. No-tillage and fertilization management on crop yields and nitrate leaching in North China Plain [J]. Ecology and Evolution, 2015,5(6):1143-1155. [5] 刘宏元,张爱平,杨世琦,等.山东省冬小麦-夏玉米轮作体系土壤氮素盈余指标体系的构建与评价——以德州市为例 [J]. 农业环境科学学报, 2019,38(6):1321-1329. Liu H Y, Zhang A P, Yang S Q, et al. Construction and evaluation of a soil nitrogen surplus index system for the wheat maize rotation system in Shandong Province, China: A case study of Dezhou City [J]. Journal of Agro-Environment Science, 2019,38(6):1321-1329. [6] 骆晓声,寇长林,王小非,等.施氮量对潮土区冬小麦-夏玉米轮作农田氮磷淋溶的影响 [J]. 中国生态农业学报(中英文), 2021,29(1): 29-37. Luo X S, Kou C L, Wang X F, et al. Effects of nitrogen application on nitrogen and phosphorus leaching in fluvo-aquic soil on a winter wheat-summer maize rotation farmland [J]. Chinese Journal of Eco- Agriculture, 2021,29(1):29-37. [7] Hou X K, Zhou F, Leip A, et al. Spatial patterns of nitrogen runoff from Chinese paddy fields [J]. Agriculture, Ecosystems & Environment, 2016,231:246-254. [8] 李晓欣,张菲菲,马洪斌,等.华北平原地区农田硝态盐淋失研究进展 [J]. 华北农学报, 2011,26(S2):131-139. Li X X, Zhang F F, Ma H B, et al. Nitrate leaching in North China Plain: A review [J]. Acta Agriculturae Boreali-Sinica, 2011,26(S2): 131-139. [9] 刘宏斌,李志宏,张云贵,等.北京平原农区地下水硝态氮污染状况及其影响因素研究 [J]. 土壤学报, 2006,43(3):405-413. Liu H B, Li Z H, Zhang Y G, et al. Nitrate contamination of groundwater and its affecting factors in rural areas of Beijing Plain [J]. Acta Pedologica Sinica, 2006,43(3):405-413. [10] Zheng W K, Wan Y S, Li Y C, et al. Developing water and nitrogen budgets of a wheat-maize rotation system using auto-weighing lysimeters: Effects of blended application of controlled-release and un-coated urea [J]. Environmental Pollution, 2020,263:114383. [11] Fan J L, Xiao J, Liu D Y, et al. Effect of application of dairy manure, effluent and inorganic fertilizer on nitrogen leaching in clayey fluvo-aquic soil: A lysimeter study [J]. Science of the Total Environment, 2017,592:206-214. [12] 陈淑峰.华北平原高产粮区地下水硝态氮时空变异与综合调控途径研究——以山东桓台县为例 [D]. 北京:中国农业大学, 2007. Chen S F. A Study on Spatio-temporal Variability of Groundwater Nitrate Concentration and Comprehensive Improve-control Measures in High-yielding Region in North China Plain——A Case study on Huantai County of Shandong Province [D]. Beijing: China Agricultural University, 2007. [13] 刘明鹏,徐开未,肖 华,等.氮肥施用对四川紫色土矿质态氮淋失特征及春玉米产量的影响 [J]. 农业资源与环境学报, 2022,39(1): 88-98. Liu M P, Xu K W, Xiao H, et al. Effects of nitrogen application on the characteristics of mineral nitrogen leaching in purplish soil and spring maize yield in Sichuan [J]. Journal of Agricultural Resources and Environment, 2022,39(1):88-98. [14] 乔毅博,吴鹏年,王艳丽,等.黄淮海平原微喷灌下冬小麦农田水分渗漏及氮素淋失模拟分析 [J]. 农业环境科学学报, 2023,42(7):1540- 1553. Qiao Y B, Wu P N, Wang Y L, et al. Simulation analysis on water leakage and nitrogen leaching of winter wheat farmland under micro sprinkler irrigation in Huang-Huai-Hai Plain [J]. Journal of Agro-Environment Science, 2023,42(7):1540-1553. [15] 王洪媛,李俊改,樊秉乾,等.中国北方主要农区农田氮磷淋溶特征与时空规律 [J]. 中国生态农业学报(中英文), 2021,29(1):11-18. Wang H Y, Li J G, Fan B Q, et al. Nitrogen and phosphorus leaching characteristics and temporal and spatial distribution patterns in northern China farmlands [J]. Chinese Journal of Eco-Agriculture, 2021,29(1):11-18. [16] 吴三鼎,董 强,党廷辉.减量施氮及秸秆深埋对春玉米地土壤电导率和硝态氮淋溶的影响 [J]. 水土保持学报, 2018,32(6):46-51. Wu S D, Dong Q, Dang T H. Effects of reduced nitrogen application and deep burial of straw on soil electrical conductivity and nitrate nitrogen leaching in spring maize field [J]. Journal of Soil and Water Conservation, 2018,32(6):46-51. [17] 孟凡乔,王 坤,肖广敏,等.华北平原潮土区粮田氮淋失阻控措施及效果分析 [J]. 中国生态农业学报(中英文), 2021,29(1):141-153. Meng F Q, Wang K, Xiao G M, et al. Nitrogen leaching mitigation in fluvo-aquic soil in the North China Plain [J]. Chinese Journal of Eco-Agriculture, 2021,29(1):141-153. [18] Cui Z L, Zhang X Y, Chen X P, et al. Pursuing sustainable productivity with millions of smallholder farmers [J]. Nature, 2018,555(7696):363- 366. [19] 杨旺鑫.我国农田氮磷损失影响因素及损失量初步估算 [D]. 南京:南京农业大学, 2015. Yang W X. Influencing factors and estimation of nitrogen and phosphorus losses from farmlands in China [D]. Nanjing: Nanjing Agricultural University, 2015. [20] 黄明祥,张健钦,杨 毅,等.1989~2022年生态环境中人工智能应用的研究综述——基于Citespace的知识图谱分析 [J]. 环境保护科学, 2024,50(2):8-16. Huang M X, Zhang J Q, Yang Y, et al. Artificial intelligence applications in ecological environments from 1989 to 2022 ——Knowledge graph analysis based on Citespace [J]. Environmental Protection Science, 2024,50(2):8-16. [21] 李 焕,苏 慧,张 婷,等.基于机器学习的汾渭平原PM2.5和O3变化特征及影响因素 [J]. 环境化学, 2024,43(5):1-14. Li H, Su H, Zhang T, et al. Variation characteristics and influencing factors of PM2.5 and O3 based on machine learning in Fenwei Plain [J]. Environmental Chemistry, 2024,43(5):1-14. [22] Liu M Y, Zheng H W, Cai M G, et al. Ocean stratification impacts on dissolved polycyclic aromatic hydrocarbons (PAHs): From global observation to deep learning [J]. Environmental Science & Technology, 2023,57(46):18339-18349. [23] Palansooriya K N, Li J, Dissanayake P D, et al. Prediction of Soil Heavy Metal Immobilization by Biochar Using Machine Learning [J]. Environmental Science & Technology, 2022,56(7):4187-4198. [24] Genuer R, Poggi J M, Tuleau-Malot C. Variable selection using random forests [J]. Pattern Recognition Letters, 2010,31(14):2225- 2236. [25] Ying H, Xue Y F, Yan K, et al. Safeguarding food supply and groundwater safety for maize production in China [J]. Environmental Science & Technology, 2020,54(16):9939-9948. [26] Liu Q, Liu B, Zhang Y, et al. Biochar application as a tool to decrease soil nitrogen losses (NH3volatilization, N2O emissions, and N leaching) from croplands: Options and mitigation strength in a global perspective [J]. Global Change Biology, 2019,25(6):2077-2093. [27] 程婉清,袁定波,熊 鹏,等.基于多种机器学习算法的水质指数预测模型构建与评估 [J]. 环境科学学报, 2023,43(11):144-152. Cheng W Q, Yuan D B, Xiong P, et al. Construction and evaluation of city water quality index prediction model based on multiple machine learning algorithms [J]. Acta Scientiae Circumstantiae, 2023,43(11): 144-152. [28] 张国梁,章 申.农田氮素淋失研究进展 [J]. 土壤, 1998,(6):291- 297. Zhang G L, Zhang S. Research progress on nitrogen leaching from farmland [J]. Soil, 1998,(6):291-297. [29] 黄满湘,章 申,张国梁.应用大型原状土柱渗漏计测定冬小麦-夏玉米轮作期硝态氮淋失 [J]. 环境科学学报, 2003,(1):11-16. Huang M X, Zhang S, Zhang G L. Soil core lysimeter study of nitrate leaching from a winter wheat-summer maize rotation [J]. Acta Scientiae Circumstantiae, 2003,(1):11-16. [30] 刘 健.三种质地土壤氮素淋溶规律研究 [D]. 北京:北京林业大学, 2010. Liu J. Study on nitrogen leaching regulations on three textures of soil [D]. Beijing: Beijing Forestry University, 2010. [31] Shalabi L A, Shaaban Z, Kasasbeh B. Data mining: A preprocessing engine [J]. Journal of Computer Science, 2006,2(9):735-739. [32] Zounemat-kermani M, Batelaan O, Fadaee M, et al. Ensemble machine learning paradigms in hydrology: A review [J]. Journal of Hydrology, 2021,598:126266. [33] 李海霞,宋丹蕾,孔佳宁,等.传统机器学习模型的超参数优化技术评估 [J]. 计算机科学, 2024,51(8):242-255. Li H X, Song D L, Kong J N, et al. Evaluation of hyperparameter optimization techniques for traditional machine learning models [J]. Computer Science, 2024,51(8):242-255. [34] 丁 燕,杨宪龙,同延安,等.小麦-玉米轮作体系农田氮素淋失特征及氮素表观平衡 [J]. 环境科学学报, 2015,35(6):1914-1921. Ding Y, Yang X L, Tong Y A, et al. Characteristics of N leaching and apparent N budget in cultivated lands under a Winter wheat-summer maize rotation system [J]. Acta Scientiae Circumstantiae, 2015,35(6): 1914-1921. [35] 张玉铭,张佳宝,胡春胜,等.水肥耦合对华北高产农区小麦-玉米产量和土壤硝态氮淋失风险的影响 [J]. 中国生态农业学报, 2011, 19(3):532-539. Zhang Y M, Zhang J B, Hu C S, et al. Effect of fertilization and irrigation on wheat-maize yield and soil nitrate nitrogen leaching in high agricultural yield region in North China Plain [J]. Chinese Journal of Eco-Agriculture, 2011,19(3):532-539. [36] Huang T, Ju X T, Yang H. Nitrate leaching in a winter wheat-summer maize rotation on a calcareous soil as affected by nitrogen and straw management [J]. Scientific Reports, 2017,7:42247. [37] Kramer S B, Reganold J P, Glover J D, et al. Reduced nitrate leaching and enhanced denitrifier activity and efficiency in organically fertilized soils [J]. Proceedings of the National Academy of Sciences of the United States of America, 2006,103(12):4522-4527. [38] Blanco-lanco-canqui H, Lal R. Soil structure and organic carbon relationships following 10years of wheat straw management in no-till [J]. Soil & Tillage Research, 2007,95(1/2):240-254. [39] Meng F Q, Dungait J A J, Xu X L, et al. Coupled incorporation of maize (Zea mays L.) straw with nitrogen fertilizer increased soil organic carbon in Fluvic Cambisol [J]. Geoderma, 2017,304:19-27. [40] Qiu S J, Ju X T, Ingwersen J, et al. Role of carbon substrates added in the transformation of surplus nitrate to organic nitrogen in a calcareous soil [J]. Pedosphere, 2013,23(2):205-212. [41] Ryu L, Han K. Machine Learning vs. Statistical Model for Prediction Modelling: Application in Medical Imaging Research [J]. Journal of the Korean Society of Radiology, 2022,83(6):1219-1228. [42] Ley C, Martin R K, Pareek A, et al. Machine learning and conventional statistics: making sense of the differences [J]. Knee Surgery Sports Traumatology Arthroscopy, 2022,30(3):753-757. [43] 王桂良.中国三大粮食作物农田活性氮损失与氮肥利用率的定量分析 [D]. 北京:中国农业大学, 2014. Wang G L. Quantitative analysis of reactive nitrogen losses and nitrogen use efficiency of three major grain crops in China [D]. Beijing: China Agricultural University, 2014. [44] 侯佟泽.基于多元回归的过程监测研究及其工业应用 [D]. 北京:北京化工大学, 2024. Hou T Z. Research on process monitoring based on multivariate regression and its industrial application [D]. Beijing: Beijing University of Chemical Technology, 2024. [45] Xu T, Valocchi A J, Choi J, et al. Use of machine learning methods to reduce predictive error of groundwater models [J]. Groundwater, 2014, 52(3):448-460. [46] Hu Y, Chapman A, Wen G, et al. What Can Knowledge Bring to Machine Learning?-A Survey of Low-shot Learning for Structured Data [J]. Acm Transactions on Intelligent Systems and Technology, 2022,13(3):41-45. [47] Khan T, Tian W, Zhou G, et al. Machine learning (ML)-centric resource management in cloud computing: A review and future directions [J]. Journal of Network and Computer Applications, 2022, 204:103405. [48] Friedman J H. Greedy function approximation: A gradient boosting machine [J]. Annals of Statistics, 2001,29(5):1189-1232. [49] Zhou J B, Xi J G, Chen Z J, et al. Leaching and transformation of nitrogen fertilizers in soil after application of N with irrigation: A soil column method [J]. Pedosphere, 2006,16(2):245-252. [50] Salvo C D. Improving results of existing groundwater numerical models using machine learning techniques: A review [J]. Water, 2022, 14(15):2307.