Combining machine learning models by stacking ensemble algorithms for robust nitrate concentration modeling
Open Access
- 18 April 2026
- journal article
- research article
- Published by Springer Nature in Applied Water Science
- Vol. 16 (5)
Abstract
Nitrate is a key element that causes groundwater contamination through various processes. Agricultural practices are the primary cause of the increasing nitrate inflow into groundwater. This study aims to evaluate the effectiveness of various machine learning algorithms in modeling nitrate concentration and generating spatial distribution maps of nitrate concentration in groundwater. For this objective, we use four models: gene expression programming (GEP), multiple linear regression (MLR), group method of data handling (GMDH), and extreme learning machine (ELM). The outcomes of these models were then used to develop a stacking ensemble model. The first learners in this model were ELM, GMDH, GEP, and MLR, whereas the second learner was Bi-LSTM. To do this, information from 485 samples of water taken every month for five years (2018–2023) and whose physical and chemical properties were checked using standard methods was used. Additionally, the principal component analysis (PCA) method was used to reduce the dimensionality of the original feature space and select the best input variables. To evaluate different models, the root mean square error(RMSE), mean absolute error(MAE), Nash–Sutcliffe efficiency (NSE), Willmott’s index of agreement (WI), Legate and McCabe’s index (LMI), coefficient of determination ( $${\text{R}}^{2}$$ ) indices and box plots were used. Initially, first learner models were developed and their performances were compared with each other. According to the box plot results, the ELM and GMDH models more accurately follow the observational data’s lowest, middle, and higher quartiles than other models. Specifically, the ELM is more accurate than GMDH. On the other hand, the GEP and MLR models follow these quartiles with less accuracy than other models; specifically, the GEP is more accurate than the MLR. According to the Water Health Organization (WHO), the nitrate concentration levels in the groundwater resources in the studied area are higher than what is allowed for drinking, as shown by the spatial distribution maps made during the validation period. As a result, according to this research, the ELM and GMDH models outperform the GEP and MLR models in modeling and generating nitrate concentration distribution maps, respectively. More precisely, the ELM performs better than the GMDH model, and the GEP performs better than the MLR. The Bi-LSTM stacking ensemble model was developed in the next step. For this, the trial-and-error method was used to modify the Bi-LSTM parameter values. Based on the results, this model outperforms all of the other single models, making it an effective tool for modeling nitrate concentration.
Keywords
This publication has 60 references indexed in Scilit:
- Modelling and prediction of groundwater level using wavelet transform and machine learning methods: A case study for the Sahneh Plain, IranIrrigation and Drainage, 2023
- A review on extreme learning machineMultimedia Tools and Applications, 2021
- Origin and distribution of nitrate in water well of settlement areas in Yogyakarta, IndonesiaEnvironmental Monitoring and Assessment, 2018
- Tolerance and Variance Inflation Factor2014
- Extreme learning machine: algorithm, theory and applicationsArtificial Intelligence Review, 2013
- A refined index of model performanceInternational Journal of Climatology, 2011
- Principal component analysisWIREs Computational Statistics, 2010
- Chemical characteristics of groundwater in parts of mountainous region, Alvand, Hamadan, IranEnvironmental Geology, 2006
- Applied Linear Regression2005
- Gene Expression Programming in Problem Solving2002