SHAP-Interpreted Machine Learning for Irrigation Groundwater Quality Prediction in the Saïss Basin, Morocco
摘要
The Saïss Basin’s fertile soils support intensive agriculture, but agricultural expansion, urbanization, and groundwater overexploitation threaten soil health, crop productivity, and water resources. However, accurately assessing groundwater suitability for irrigation remains challenging due to the complexity and interaction of multiple hydrocheFiguremical parameters, which are not fully captured by conventional evaluation approaches. This study evaluates groundwater quality for irrigation using the overall irrigation water quality index (O_IWQI) and machine learning models (KNN, SVR, Ridge, Lasso, ElasticNet, DT, RF, and XGBoost). Samples were analyzed for physicochemical parameters (pH, EC, TDS, major ions), heavy metals (Cu, Pb, Fe), and irrigation indices (SAR, SSP, PI, RSC, MAR). The O_IWQI showed 80% of samples were excellent to good quality, while 20% were average, indicating areas at risk of reduced irrigation efficiency and soil degradation. Model performance was assessed using MAE, RMSE, R2, MSLE, and MAPE. XGBoost achieved the highest accuracy (R2 = 0.95, RMSE = 4.28, MAE = 0.97, MSLE = 0.002, MAPE = 3.63), effectively managing complex interactions. SHAP analysis identified Na%, Na, SAR, EC, and Cl⁻ as the most critical quality factors. These findings demonstrate that combining predictive modeling with parameter importance analysis supports sustainable irrigation water management, safeguarding water quality and enhancing agricultural productivity in the Saïss Basin.
Graphical AbstractThis study evaluates groundwater quality for irrigation in the Saïss Basin, Morocco, using 125 samples analyzed for physicochemical parameters (pH, EC, TDS, major ions) and heavy metals (Cu, Pb, Fe). Irrigation indices (SAR, SSP, PI, RSC, MAR) and the overall irrigation water quality index (O_IWQI) showed 80% of samples were excellent to good quality, while 20% were moderate. Machine learning models (KNN, SVR, Ridge, Lasso, ElasticNet, DT, RF, XGBoost) were applied to predict water quality, with XGBoost achieving the highest accuracy (R2 = 0.95, RMSE = 4.28, MAE = 0.97). SHAP analysis identified Na%, Na, SAR, EC, and Cl⁻ as the most influential parameters. The study integrates spatial mapping, laboratory analyses, suitability assessment, predictive modeling, and parameter interpretation to support groundwater management for sustainable irrigation in the Saïss Basin.