Ensemble machine learning method for δ18O prediction in groundwater

F Faten. A. Mohamed M Mostafa Sadek N Nema Mohamed Kandil

Abstract

Abstract Groundwater δ 18 O interpretation in arid regions is challenging due to complex recharge, salinization, and limited datasets. We applied ensemble machine learning, Random Forest, Lasso, and Gradient Boosting, to predict δ 18 O using hydrochemical and spatial variables in the mid-Nile Valley. Under random splitting, RFR performed best (R 2 = 0.83), followed by Lasso (0.81) and GBR (0.80). Longitude, chloride, potassium, and magnesium emerged as the main predictors, consistent with hydrochemical evidence. But performance dropped under spatial cross-validation, a more realistic test: RFR R 2 = 0.50, Lasso = 0.45, GBR = 0.41. So, part of the predictive skill comes from spatial structure, not transferable relationships. A sensitivity test without longitude showed that hydrochemical variables alone explain about 40% of the δ 18 O variance (R 2 = 0.405). Within the data-rich range (-3‰ to -1‰, n  = 54), the model achieved a mean absolute residual of 0.70‰ and a 95% prediction interval of ± 2.26‰. Outside this range, for Eocene end-members ( n  = 7) and Quaternary enriched samples ( n  ≈ 6), uncertainty increased substantially. Machine learning is useful for isotope prediction in data-scarce regions, but results must be interpreted with caution. Spatial effects matter. The model is best suited for site-specific analysis within its reliable range. Future work should focus on collecting more end-member samples to bridge the isotopic gap.

Article Details

Volume / Issue Vol. 16, Issue 1
Published June 21, 2026
ISSN 2045-2322
Publisher Nature Portfolio

Journal Info

Scientific Reports

Nature Portfolio

ISSN: 2045-2322 Open Access Life Sciences

Authors (3)

F

Faten. A. Mohamed

M

Mostafa Sadek

N

Nema Mohamed Kandil