Machine Learning-Based Prediction of Irrigation Water Quality Index with SHAP Interpretability: Application to Groundwater Resources in the Semi-Arid Region, Algeria

In semi-arid regions, sustainable groundwater management for irrigation is critical for agricultural productivity and food security. This study presents an integrated methodological framework combining hydrochemical characterization, machine learning (ML) modeling, and explainable artificial intelligence (XAI) to predict the Irrigation Water Quality Index (IWQI) in the Ain Oussera plain, Djelfa Province, Algeria. A total of 191 groundwater samples were collected from November 2023 to September 2024 and analyzed for major ions and physicochemical parameters. Multiple irrigation suitability indices were calculated, including Sodium Adsorption Ratio (SAR), Sodium Percentage (Na%), Magnesium Hazard (MH), Permeability Index (PI), Residual Sodium Carbonate (RSC), Soluble Sodium Percentage (SSP), and Kelly’s Ratio (KR). Five ML models were developed and evaluated for IWQI prediction: Random Forest, Gradient Boosting, XGBoost, K-Nearest Neighbors, and Support Vector Regression. Results showed that 55% of groundwater samples exhibited low to no restrictions for irrigation use, while 19% required high to severe restrictions. The XGBoost model demonstrated superior performance, with the highest R2 (0.95) and the lowest RMSE (3.22) among all tested algorithms. SHAP (SHapley Additive exPlanations) analysis provided a transparent interpretation of model predictions, identifying electrical conductivity and Sodium Adsorption Ratio as the most influential parameters affecting IWQI, while chloride, sodium, total hardness, and magnesium had minimal impact. Spatial mapping using Inverse Distance Weighting (IDW) interpolation in ArcGIS 10.8 revealed considerable spatial variability in water quality throughout s the plain. This research addresses a critical gap in North African groundwater management by integrating ML predictive capabilities with XAI transparency, providing water resource managers and agricultural stakeholders with interpretable, data-driven tools for sustainable irrigation planning in water-stressed semi-arid environments.

Authors

Institutions

Publication Details

Journal
Water
Published
2026-04-17
DOI
https://doi.org/10.3390/w18080959
Primary Topic
Groundwater and Isotope Geochemistry
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Machine Learning-Based Prediction of Irrigation Water Quality Index with SHAP Interpretability: Application to Groundwater Resources in the Semi-Arid Region, Algeria

Mohamed Azlaoui, Aziez Zeddouri, Salah Karef, Atif Foufou et al.
Water
Groundwater and Isotope Geochemistry
article

Machine Learning-Based Prediction of Irrigation Water Quality Index with SHAP Interpretability: Application to Groundwater Resources in the Semi-Arid Region, Algeria

Mohamed Azlaoui, Aziez Zeddouri, Salah Karef, Atif Foufou, Nadjib Haied, Abdelaziz Rabehi, Mustapha Habib, Nesrine Azlaoui
article en

Abstract

In semi-arid regions, sustainable groundwater management for irrigation is critical for agricultural productivity and food security. This study presents an integrated methodological framework combining hydrochemical characterization, machine learning (ML) modeling, and explainable artificial intelligence (XAI) to predict the Irrigation Water Quality Index (IWQI) in the Ain Oussera plain, Djelfa Province, Algeria. A total of 191 groundwater samples were collected from November 2023 to September 2024 and analyzed for major ions and physicochemical parameters. Multiple irrigation suitability indices were calculated, including Sodium Adsorption Ratio (SAR), Sodium Percentage (Na%), Magnesium Hazard (MH), Permeability Index (PI), Residual Sodium Carbonate (RSC), Soluble Sodium Percentage (SSP), and Kelly’s Ratio (KR). Five ML models were developed and evaluated for IWQI prediction: Random Forest, Gradient Boosting, XGBoost, K-Nearest Neighbors, and Support Vector Regression. Results showed that 55% of groundwater samples exhibited low to no restrictions for irrigation use, while 19% required high to severe restrictions. The XGBoost model demonstrated superior performance, with the highest R2 (0.95) and the lowest RMSE (3.22) among all tested algorithms. SHAP (SHapley Additive exPlanations) analysis provided a transparent interpretation of model predictions, identifying electrical conductivity and Sodium Adsorption Ratio as the most influential parameters affecting IWQI, while chloride, sodium, total hardness, and magnesium had minimal impact. Spatial mapping using Inverse Distance Weighting (IDW) interpolation in ArcGIS 10.8 revealed considerable spatial variability in water quality throughout s the plain. This research addresses a critical gap in North African groundwater management by integrating ML predictive capabilities with XAI transparency, providing water resource managers and agricultural stakeholders with interpretable, data-driven tools for sustainable irrigation planning in water-stressed semi-arid environments.

WaterVol. 18(8)
University of Ouargla (DZ), Ziane Achour University of Djelfa (DZ), University Mohamed El Bachir El Ibrahimi of Bordj Bou Arreridj (DZ), KTH Royal Institute of Technology (SE)
Zero hunger
Openalex Percentile: Top 13%
Groundwater and Isotope Geochemistry
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.