# Integrated GIS-machine learning approach to irrigation water quality assessment in coastal aquifers

**Authors:** Loubna Nefla, Amira Bergal, Warda Boumaraf, Samira Gheid, Chahrazed Bouksiba, Hichem Khammar, Fulvio Celico, Hichem Nasri, Aissam Gaagai, Salah Elsayed, Mohamed S. Abd El-baki, Abdullah M. Attiah, András Székács, Omar Saeed, Mohamed Gad

PMC · DOI: 10.1038/s41598-025-25461-y · 2026-01-28

## TL;DR

This study uses machine learning and GIS to assess irrigation water quality in a coastal aquifer in Algeria, showing how seasonal changes and geochemical processes affect water suitability.

## Contribution

The paper introduces a novel integration of machine learning algorithms with GIS-based hydrogeochemical analysis for irrigation water quality assessment in semi-arid regions.

## Key findings

- Random Forest (RF) outperformed other machine learning models in predicting water quality indices with high accuracy (R² > 0.95).
- Summer groundwater samples showed slightly poorer quality than winter samples due to evaporative concentration of solutes.
- The study identified Mg-Ca-SO₄ and Na-Cl as dominant hydrochemical facies, influenced by rock-water interactions and mineral dissolution.

## Abstract

Groundwater has become a vital and increasingly relied-upon resource, especially in semi-arid and arid regions. Thus, to ensure groundwater complies with standards before use, continuous monitoring and comprehensive quality assessment are essential. This study was conducted to assess the quality of groundwater (GW) in the Skikda aquifer, northeastern Algeria, for irrigation using irrigation water quality indices (IWQIs), multivariate statistical analysis, and machine learning algorithms (MLAs): Random Forest regression (RF), Extreme Gradient Boosting regression (XGBR), and Adaptive Boosting Regression (ABR), integrated with SHAP analysis. Forty-four groundwater samples were collected from the study area during summer and winter seasons and analysed for temperature, pH (6.25–9.29; mean 7.24), electrical conductivity (EC: 532–5830 µS/cm; mean 1798.22 µS/cm), turbidity, total dissolved solids (TDS: 258–3020 mg/L; mean 962.33 mg/L), and concentrations of calcium (Ca2+: 40–366 mg/L), magnesium (Mg2+: 10–167 mg/L), sodium (Na+: 62–510 mg/L), potassium (K+: 0.40–45.6 mg/L), chloride (Cl–: 30.9–1800 mg/L), bicarbonate (HCO3–: 198–695 mg/L), sulfate (SO42–: 1–429 mg/L), and nitrate (NO3–: 0.12–2.99 mg/L).The dominating hydrochemical facies in the study area were Mg-Ca-SO4, accompanied by the Sodium-Chloride (Na-Cl).Principle Component Analysis (PCA) for summer and winter datasets identified four key components suggesting a strong correlation between variables and factors, with PCA indicating that geochemical processes, such as rock0water interaction and dissolution of evaporate minerals, control the groundwater’s chemical composition. Groundwater quality for irrigation varied across the samples, with most exhibiting moderate to high constraints based on IWQI (26.88–74.00; mean 54.56 in summer and 56.70 in winter). Sodium Adsorption Ratio (SAR: 1.13–7.10) and Permeability Index (PI: 33.06–83.39) suggested excellent to good water quality, while Sodium Percent (Na%: 19–69%),) and Soluble Sodium Percentage (SSP: 19–70%) indicate a small but significant fraction (9–16%) of in appropriate samples. Magnesium Hazard (MH: 22–62) and SSP indicated that most samples were safe. Compared to winter, summer samples showed slightly poorer quality (higher Na%, SSP, and lower IWQI), likely due to evaporative solute concentration. Random Forest (RF) model integrated with SHAP analysis showed superior predictive accuracy for all Water Quality Indices (WQIs), with strong validation results (R2 > 0.95; RMSE < 0.5) for both seasons. A comparative evaluation of RF, XGBR, and ABR further highlighted differences in predictive performance, with RF consistently providing the most reliable predictions of WQIs across both seasons (R2 = 0.73–0.94). These results highlight RF’s effectiveness in predicting WQIs and highlight the influence of seasonal geochemical processes on groundwater quality, requiring the development of management strategies for sustainable irrigation. This study presents a novel approach by combining machine learning algorithms with GIS-supported hydrogeochemical assessment to evaluate irrigation water quality in a semi-arid coastal aquifer of Algeria. By integrating advanced ML techniques (RF, XGBR, ABR) with water quality indices and SHAP analysis, it captures the complex interactions between natural geochemical processes and human activities. The approach offers a replicable framework for sustainable groundwater management in underexplored regions.

The online version contains supplementary material available at 10.1038/s41598-025-25461-y.

## Linked entities

- **Chemicals:** Ca2+ (PubChem CID 271), Mg2+ (PubChem CID 888), Na+ (PubChem CID 923), K+ (PubChem CID 813), Cl– (PubChem CID 312), HCO3– (PubChem CID 769), SO42– (PubChem CID 1117), NO3– (PubChem CID 943)

## Full-text entities

- **Genes:** SHROOM4 (shroom family member 4) [NCBI Gene 57477] {aka MRXSSDS, SHAP, shrm4}
- **Diseases:** soil sodicity (MESH:D005242), leaf burn (MESH:D002056), fractures (MESH:D050723), MH (MESH:D008275)
- **Chemicals:** alkali metals (MESH:D008672), alkali (MESH:D000468), sulfides (MESH:D013440), K (MESH:D011188), EDTA (MESH:D004492), heavy metals (MESH:D019216), Chloride (MESH:D002712), anhydrite (MESH:D002133), lead (MESH:D007854), Na-Cl (MESH:D012965), Water (MESH:D014867), oil (MESH:D009821), carbonate (MESH:D002254), nitrogen (MESH:D009584), Ca (MESH:D002118), feldspars (MESH:C016447), salt (MESH:D012492), Magnesium (MESH:D008274), arsenic (MESH:D001151), Nitrate (MESH:D009566), polypropylene (MESH:D011126), NO3 (MESH:C038619), Mg-SO4 (MESH:D008278), Na (MESH:D012964), Cl (MESH:D002713), NO2- (MESH:D009585), Ca-Mg-SO4 (-), silicate (MESH:D017640), chromium (MESH:D002857), Sulfate (MESH:D013431), Bicarbonate (MESH:D001639)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Figures

18 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12855904/full.md

---
Source: https://tomesphere.com/paper/PMC12855904