Groundwater Nitrate Modelling Using Optimized Machine Learning, Feature Selection and Explainable Artificial Intelligence (XAI)
Abdullahi Garba Usman
Key points
From the paper's conclusion- Based on these results, the integration of feature selection, optimization algorithms and explainable machine learning provides a useful approach for predicting groundwater nitrate concentrations from hydrochemical data.
Abstract
Groundwater nitrate contamination has become an important concern due to its adverse effects on groundwater quality and human health. Therefore, developing reliable prediction models is necessary for estimating nitrate concentrations and supporting groundwater quality monitoring. In this study, machine learning models integrated with optimization algorithms were developed for predicting groundwater nitrate concentrations in Telangana, India. A total of 368 observations obtained from a secondary dataset available on Kaggle, representing post-monsoon conditions in 2020, were used for the analysis. Four input-variable configurations (C1–C4) were considered to examine the effect of different combinations of hydrochemical parameters on model performance. Furthermore, Random Forest-based feature selection was applied to determine the relative importance of the input variables. The Bagged Trees (BT) model was subsequently optimized using the Educational Competition Optimizer (ECO) and Firefly Algorithm (FA). In addition, SHapley Additive exPlanations (SHAP) was employed to explain the contribution of the input variables to the model predictions. Model performance was evaluated using the coefficient of determination (R2), ratio of performance to interquartile distance (RPIQ) and relative absolute error (RAE) during the training and testing stages. Five-fold cross-validation was also considered for model evaluation. The results showed that configuration C4 provided the best performance among the conventional BT models and was therefore selected for further optimization. The optimized BT-FA-C4 model produced the best testing results, with R2, RPIQ and RAE values of 0.983, 10.256 and 0.086, respectively. Similarly, the BT-ECO-C4 model achieved R2, RPIQ and RAE values of 0.949, 8.060 and 0.097, respectively. Moreover, SHAP analysis provided further information on the relative contributions of the hydrochemical parameters to groundwater nitrate predictions. Based on these results, the integration of feature selection, optimization algorithms and explainable machine learning provides a useful approach for predicting groundwater nitrate concentrations from hydrochemical data.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Spatial prediction of coastal groundwater nitrate using combined feature selection and explainable machine learning.Journal of environmental management · 2026
- Optimized ensemble techniques for nitrate concentration modelling from groundwater integrated with mRMR extraction algorithmJournal of Radiation Research and Applied Sciences · 2026
- Data-driven prediction modeling of groundwater quality using integrated machine learning in Pinggu Basin, ChinaJournal of Hydrology Regional Studies · 2025
- Deep learning framework for mapping nitrate pollution in coastal aquifers under land use pressureScientific Reports · 2025
- From low-cost measurements to rapid water quality monitoring: a hybrid machine learning-optimization framework for predicting laboratory-intensive parameters.Water research · 2026
- Forecasting groundwater irrigation risk under salinity-sodicity stress using hydrochemical-climate data fusion: A tabular, spatial, and ordinal learning framework for environmental management.Journal of environmental management · 2026