基于机器学习和SHAP算法的农业用水量预测模型构建

昝子懿, 岳卫峰, 赵航正, 曹倡铭, 胡竞丹, 胡立堂, 徐洋, 陈爱萍

PDF(3292 KB)
节水灌溉 ›› 2024 ›› (12) : 102-110. DOI: 10.12396/jsgg.2024263
水肥高效利用

基于机器学习和SHAP算法的农业用水量预测模型构建

作者信息 +

Development of Agricultural Water-Consumption Prediction Model Based on Machine Learning and SHAP

Author information +
稿件信息 +

摘要

农业用水预测是区域水资源规划中的关键环节,对于实现水资源合理开发,保障粮食安全具有重要的指导意义。然而,现有农业用水预测模型普遍存在输入参数冗余、模型精度不够等问题,不利于有效地进行水资源管理和优化决策。因此,选择内蒙河套灌区作为研究对象,首先对灌区农业用水量相关驱动因子进行主成分分析(Principal Components Analysis,简称PCA),筛选出影响灌区农业用水量的关键因子;其次构建多种基于机器学习的农业用水预测模型;最后,利用Shapley加法解释方法(SHapley Additive exPlanations,SHAP)验证最优模型应用的合理性,并深入挖掘各特征值对农业用水量的贡献影响。结果表明:多层感知器神经网络(MLP)机器学习模型可以有效的预测农业用水量,其R 2评价指标为0.84,相较于其他五种不同机器学习模型(最小绝对收缩和选择算子回归Lasso、岭回归Ridge、决策树DT、随机森林RF、极限梯度提升XGboost),该模型预测结果较好。采用SHAP值法对MLP机器学习模型中的输入参数进行量化分析,发现第一产业总产值与粮食产量有较高的绝对平均SHAP值,而在不同灌域中SHAP值贡献大小略有差异。构建农业用水量预测筛选模型可以准确预测农业用水量,从而实现灌区农业精准灌溉并提高水资源利用效率,对于缓解未来河套灌区水资源供需矛盾具有重要的实际意义。

Abstract

Predicting agricultural water usage is a key element in regional water resource planning, essential for ensuring the rational development of water resources and ensuring food security. However, existing models for predicting agricultural water usage often suffer from issues such as redundant input parameters and insufficient accuracy, hindering effective water resource management and optimal decision-making. Therefore, this study selects the Hetao irrigation district in Inner Mongolia as the research area. Firstly, principal component analysis (PCA) is conducted on the driving factors related to agricultural water usage to identify the key factors influencing water usage in the irrigation district. Secondly, various machine learning-based models were constructed for predicting agricultural water usage. Finally, the SHapley Additive exPlanations (SHAP) method is used to validate the applicability of the optimal model and to deeply explore the contribution of each feature to agricultural water usage. The results show that the Multilayer Perceptron (MLP) neural network model effectively predicts agricultural water usage, with an R² evaluation index of 0.84, performing better than five other machine learning models: Least Absolute Shrinkage and Selection Operator Regression (Lasso), Ridge Regression (Ridge), Decision Tree (DT), Random Forest (RF), and eXtreme Gradient Boosting (XGBoost). Using the SHAP method to quantitatively analyze the input parameters of the MLP model reveals that the total output value of the primary industry and grain yield have higher absolute mean SHAP values, with slight differences in SHAP value contributions among different irrigation regions. Constructing an agricultural water usage prediction and screening model can accurately predict water usage, thereby achieving precise irrigation in the irrigation district and improving water resource utilization efficiency. This has significant practical implications for alleviating future water resource supply and demand conflicts in the Hetao irrigation district.

关键词

农业用水量 / 机器学习 / 用水量预测 / SHAP / 河套灌区

Key words

agricultural water usage / machine learning / water usage prediction / SHAP / Hetao irrigation district

基金

国家重点研发计划项目(2021YFC3201204)
清华大学-宁夏银川水联网数字治水联合研究院专项统筹重点项目(SKL-IOW-2023TC2307)

引用本文

导出引用
昝子懿 , 岳卫峰 , 赵航正 , 曹倡铭 , 胡竞丹 , 胡立堂 , 徐洋 , 陈爱萍. 基于机器学习和SHAP算法的农业用水量预测模型构建[J].节水灌溉, 2024(12): 102-110 https://doi.org/10.12396/jsgg.2024263
ZAN Zi-yi , YUE Wei-feng , ZHAO Hang-zheng , CAO Chang-ming , HU Jing-dan , HU Li-tang , XU Yang , CHEN Ai-ping. Development of Agricultural Water-Consumption Prediction Model Based on Machine Learning and SHAP[J].Water Saving Irrigation, 2024(12): 102-110 https://doi.org/10.12396/jsgg.2024263

参考文献

1
DAMERAU K, WAHA K, HERRERO M. The impact of nutrient-rich food choices on agricultural water-use efficiency[J]. Nature Sus-tainability, 2019, 2: 233-241.
2
黄修桥, 康绍忠, 王景雷. 灌溉用水需求预测方法初步研究[J]. 灌溉排水学报, 2004, 23(4): 11-15.
HUANG X Q, KANG S Z, WANG J L. A preliminary study on predicting method for the demand of irrigation water resource[J]. Journal of Irrigation and Drainage, 2004, 23(4): 11-15.
3
朱连勇, 雷晓云, 文 静. 基于定额定量法的阿克苏市需水量预测分析[J]. 水资源与水工程学报, 2012, 23(2): 13-15, 19.
ZHU L Y, LEI X Y, WEN J. Forecast analysis of Aksu city’s water demand based on quantitative quota method[J]. Journal of Water Resources and Water Engineering, 2012, 23(2): 13-15, 19.
4
刘 迪, 胡彩虹, 吴泽宁. 基于定额定量分析的农业用水需求预测研究[J]. 灌溉排水学报, 2008, 27(6): 88-91.
LIU D, HU C H, WU Z N. Predicting method for demand of agriculture water based on quantitative analysis[J]. Journal of Irrigation and Drainage, 2008, 27(6): 88-91.
5
XU Y H, WANG H D, HUI N L. Prediction of agricultural water consumption in 2 regions of China based on fractional-order cumulative discrete grey model[J]. Journal of Mathematics, 2021, 2021: 3 023 385.
6
WANG Y Z, LIU L, GUO P, et al. An inexact irrigation water allocation optimization model under future climate change[J]. Stochastic Environmental Research and Risk Assessment, 2019, 33(1): 271-285.
7
ZHANG Q, SUN P, SINGH V P, et al. Spatial-temporal precipitation changes (1956–2000) and their implications for agriculture in China[J]. Global and Planetary Change, 2012, 82: 86-95.
8
孙才志, 赵良仕. 环境规制下的中国水资源利用环境技术效率测度及空间关联特征分析[J]. 经济地理, 2013, 33(2): 26-32.
SUN C Z, ZHAO L S. Water resources utilization environmental efficiency measurement and its spatial correlation characteristics analysis under the environmental regulation background[J]. Economic Geography, 2013, 33(2): 26-32.
9
LI C, JIANG T T, LUAN X B, et al. Determinants of agricultural water demand in China[J]. Journal of Cleaner Production, 2021, 288: 125 508.
10
杨登元, 鞠茂森, 唐德善. 基于改进PCA-BP神经网络模型的海宁市需水预测[J]. 水电能源科学, 2024, 42(5): 68-71, 79.
YANG D Y, JU M S, TANG D S. Water demand prediction in Haining City based on improved PCA-BP neural network model[J]. Water Resources and Power, 2024, 42(5): 68-71, 79.
11
单义明, 杨 侃. 基于灰色关联度分析的山西省PSO-SVR需水量预测模型[J]. 水电能源科学, 2021, 39(2): 18-21.
SHAN Y M, YANG K. Forecasting model of PSO-SVR water requirement in Shanxi Province based on grey correlation analysis[J]. Water Resources and Power, 2021, 39(2): 18-21.
12
FIRAT M, TURAN M E, YURDUSEV M ALI. Comparative analysis of fuzzy inference systems for water consumption time series prediction[J]. Journal of Hydrology, 2009, 374(3/4): 235-241.
13
郭亚男, 吴泽宁, 高建菊. 基于主成分分析的支持向量机需水预测模型及其应用[J]. 中国农村水利水电, 2012(7): 76-78, 82.
GUO Y N, WU Z N, GAO J J. Application of support vector machines based on principal component analysis in water demand prediction[J]. China Rural Water and Hydropower, 2012(7): 76-78, 82.
14
杨 蕊, 胡贤群, 王 龙, 等. 基于主成分分析和模糊聚类的云南省农业节水分区[J]. 节水灌溉, 2021(4): 92-97.
YANG R, HU X Q, WANG L, et al. Zoning of agricultural water-saving in Yunnan Province based on principal component analysis and fuzzy cluster[J]. Water Saving Irrigation, 2021(4): 92-97.
15
赵伟佳, 罗德才, 陈 方, 等. 基于PCA-BP神经网络的既有建筑改造成本预测[J]. 土木工程与管理学报, 2024, 41(2): 89-97.
ZHAO W J, LUO D C, CHEN F, et al. Cost prediction of existing building renovation based on PCA-BP neural network[J]. Journal of Civil Engineering and Management, 2024, 41(2): 89-97.
16
NOURANI V. Application of entropy concept for input selection of wavelet-ANN based rainfall-runoff modeling[J]. Journal of Environmental Informatics, 2015,26(1).
17
LUNDBERG S, LEE S I. A unified approach to interpreting model predictions[EB/OL]. 2017: 1705.07874.
18
ZHANG F T, XIAO Y D, GAO L, et al. How agricultural water use efficiency varies in China: A spatial-temporal analysis considering unexpected outputs[J]. Agricultural Water Management, 2022, 260: 107 297.
19
江 燕, 王修贵, 刘昌明, 等. 引水减少对河套永联试验区田间水均衡影响分析[J]. 水科学进展, 2009, 20(3): 356-360.
JIANG Y, WANG X G, LIU C M, et al. Modeling influence of reduced irrigation water on water balance using SWAP[J]. Advances in Water Science, 2009, 20(3): 356-360.
20
金 巍, 刘双双, 张 可, 等. 农业生产效率对农业用水量的影响[J]. 自然资源学报, 2018, 33(8): 1 326-1 339.
JIN W, LIU S S, ZHANG K, et al. Influence of agricultural production efficiency on agricultural water consumption[J]. Journal of Natural Resources, 2018, 33(8): 1 326-1 339.
21
WANG Z, DENG X Z, CHEN J C. Impacts of sparing use of water on farmer income of China[J]. Physics and Chemistry of the Earth, Parts A/B/C, 2015, 89: 18-24.
22
王志强, 任金哥, 韩 硕, 等. 基于可解释性机器学习的建筑物物化阶段碳排放量预测研究[J]. 安全与环境学报, 2024, 24(6): 2 454-2 466.
WANG Z Q, REN J G, HAN S, et al. Interpretable machine learning-based carbon emission prediction in the mater-ialization stage of buildings[J]. Journal of Safety and Environment, 2024, 24(6): 2 454-2 466.
23
ASCHER S, WATSON I, YOU S M. Machine learning methods for modelling the gasification and pyrolysis of biomass and waste[J]. Renewable and Sustainable Energy Reviews, 2022, 155: 111 902.
24
窦 淼, 李金燕, 崔岚博, 等. 相关性分析-神经网络模型在宁夏用水量预测中的应用[J]. 人民珠江, 2022, 43(8): 71-77.
DOU M, LI J Y, CUI L B, et al. Application of correlation analysis-neural network model in water consumption prediction in Ningxia[J]. Pearl River, 2022, 43(8): 71-77.
25
徐达梁, 徐杭镔, 靳心瑶, 等. 基于机器学习的纳滤膜预测筛选模型构建与评估[J]. 哈尔滨工业大学学报, 2024, 56(6): 8-15.
XU D L, XU H B, JIN X Y, et al. Construction and evaluation of prediction model for nanofiltration membranes based on machine learning[J]. Journal of Harbin Institute of Technology, 2024, 56(6): 8-15.
26
SHI H X, ZHANG Y H, BIAN M Y, et al. Influence of energy poverty on agricultural water efficiency using a panel data study in China[J]. Scientific Reports, 2024, 14: 2 064.
27
HE G H, GENG C F, ZHAI J Q, et al. Impact of food consumption patterns change on agricultural water requirements: An urban-rural comparison in China[J]. Agricultural Water Management, 2021, 243: 106 504.
28
YUE W F, LIU X Z, WANG T J, et al. Impacts of water saving on groundwater balance in a large-scale arid irrigation district, Northwest China[J]. Irrigation Science, 2016, 34(4): 297-312.
PDF(3292 KB)

377

访问

0

引用

详细情况

段落导航
相关文章

/