An Evaluation of the Capability of the NARX Neural Network in Predicting Ground Water Level Changes

: The efﬁcient monitoring and tracking of groundwater level changes are critical for the sustainable management of water resources, especially in light of population growth and climate change. This study evaluates the ability of the Non-linear Autoregressive with exogenous input (NARX) model to simulate groundwater level trends in Ajabshir, Iran, using groundwater level data from 2006 to 2019 as the baseline period. The model was trained using time, groundwater levels, and delay times between 1 and 2 as the input training samples. The results indicate that the NARX model performed exceptionally well in simulating historical trends of groundwater levels, achieving a Coefﬁcient of Determination (DC) value of 0.87 and a Root Mean Squared Error (RMSE) of 0.215.


Introduction
Groundwater is a valuable natural resource, and its accurate prediction plays a significant role in various fields such as agriculture, urban planning, and water supply management.Groundwater level (GWL) prediction is a crucial aspect of water resource management, environmental monitoring, and sustainable development.With the advent of Artificial Intelligence (AI) technologies, in recent years, Artificial Neural Networks (ANNs) have emerged as powerful tools for forecasting GWL due to their ability to simulate complex non-linear relationships.In response, researchers have turned to ANN, a data-driven modeling technique capable of capturing complex relationships within data, to improve GWL prediction accuracy [1].The investigation conducted by Zhao et al. (2016) [2] is centered on the prediction of GWL in regions that are prone to landslides.This methodology combines classification and regression techniques to comprehensively analyze the relationships between GWLs and the potential for landslide occurrences.The primary objective of this approach is to advance the understanding of the intricate dynamics governing landslide events in these specific geographical areas.This study highlights the application of this novel hybrid approach to enhance the accuracy of predictions in coastal reclamation areas.Ref. [3] conducted a study on the prediction of monthly GWL in the Kerman plain, Iran, employing ANN and neuro-fuzzy models.This research focuses on developing accurate forecasting models to assist in managing groundwater resources in the region.Ref. [4] conducted a study on GWL prediction utilizing ANN and M5 Tree models.This research focuses on comparing the effectiveness of these models for accurate GWL forecasting.The study contributes to the advancement of predictive modeling techniques in Eng.Proc.2023, 56, 95 2 of 6 groundwater management and resource planning.A wavelet neural network conjunction model for GWL forecasting was created by Adamowski and Chan (2011).In this paper, a new method based on coupling discrete wavelet transforms and ANN for GWL forecasting applications is proposed, and the results of the study demonstrated that the wavelet neural network has potential in GWL forecasting.Daliakopoulos et al. (2005) proposed a GWL forecasting method using ANNs.Their study aims to leverage the capabilities of neural networks to predict groundwater levels accurately.The research explores the potential of this approach in enhancing water resource management and environmental monitoring efforts.Ref. [5] explores GWL variations through the simulation of a combined model utilizing wavelet, neural network, linear regression, and support vector machine techniques.The research aims to assess the effectiveness of this integrated approach in accurately predicting GWL, thereby contributing to improved water resource management and environmental monitoring.Emamgholizadeh et al. ( 2011) conducted a study on predicting the GWL of the Bastam Plain, Iran, employing ANN and an adaptive neuro-fuzzy inference system.This research explores the application of these advanced modeling techniques to enhance the accuracy of GWL forecasts.Ref. [6] investigated the impact of input feature selection on GWL prediction using a multi-layer perceptron neural network.This research delves into the significance of selecting appropriate input features to improve the accuracy of groundwater level forecasts.Ref. [7] explored machine learning algorithms for modeling groundwater level changes in agricultural regions of the U.S.This research aims to assess the effectiveness of various machine learning techniques in predicting groundwater level fluctuations.
In this study, an assessment has been conducted to evaluate the effectiveness of the NARX model in simulating Groundwater Level (GWL) trends in Abshir, Iran.GWL data for the baseline period was collected from 2006 to 2019.

Study Area and Data Set
Ajabshir is a county located in the northwest of Iran, within the East Azerbaijan province, with an approximate area of 700 square kilometers (1.6% of the province's total area).It is bordered by Azarshahr and Osku to the north, Lake Urmia to the west, Maragheh to the east, and Bonab to the south.Due to its location in a mountainous region, the area experiences moderate summers and snowy cold winters, as shown in Figure 1.
utilizing ANN and M5 Tree models.This research focuses on comparing the effectiveness of these models for accurate GWL forecasting.The study contributes to the advancement of predictive modeling techniques in groundwater management and resource planning.A wavelet neural network conjunction model for GWL forecasting was created by Adamowski and Chan (2011).In this paper, a new method based on coupling discrete wavelet transforms and ANN for GWL forecasting applications is proposed, and the results of the study demonstrated that the wavelet neural network has potential in GWL forecasting.Daliakopoulos et al. (2005) proposed a GWL forecasting method using ANNs.Their study aims to leverage the capabilities of neural networks to predict groundwater levels accurately.The research explores the potential of this approach in enhancing water resource management and environmental monitoring efforts.Ref. [5] explores GWL variations through the simulation of a combined model utilizing wavelet, neural network, linear regression, and support vector machine techniques.The research aims to assess the effectiveness of this integrated approach in accurately predicting GWL, thereby contributing to improved water resource management and environmental monitoring.Emamgholizadeh et al. ( 2011) conducted a study on predicting the GWL of the Bastam Plain, Iran, employing ANN and an adaptive neuro-fuzzy inference system.This research explores the application of these advanced modeling techniques to enhance the accuracy of GWL forecasts.Ref. [6] investigated the impact of input feature selection on GWL prediction using a multi-layer perceptron neural network.This research delves into the significance of selecting appropriate input features to improve the accuracy of groundwater level forecasts.Ref. [7] explored machine learning algorithms for modeling groundwater level changes in agricultural regions of the U.S.This research aims to assess the effectiveness of various machine learning techniques in predicting groundwater level fluctuations.
In this study, an assessment has been conducted to evaluate the effectiveness of the NARX model in simulating Groundwater Level (GWL) trends in Abshir, Iran.GWL data for the baseline period was collected from 2006 to 2019 .

Study Area and Data Set
Ajabshir is a county located in the northwest of Iran, within the East Azerbaijan province, with an approximate area of 700 square kilometers (1.6% of the province's total area).It is bordered by Azarshahr and Osku to the north, Lake Urmia to the west, Maragheh to the east, and Bonab to the south.Due to its location in a mountainous region, the area experiences moderate summers and snowy cold winters, as shown in Figure 1.GWL data spanning the baseline period from 2006 to 2019 were collected for the study area.Figure 2 illustrates the monthly changes in GWL for the baseline period.GWL data spanning the baseline period from 2006 to 2019 were collected for the study area.Figure 2 illustrates the monthly changes in GWL for the baseline period.

Non-Linear Autoregressive with Exogenous Inputs (NARX)
ANN (Artificial Neural Networks) and NARX models have gained significant popularity in time-series prediction due to their ability to model complex non-linear relationships.NARX networks are a particularly recurrent dynamic type of ANN [8].NARX neural networks can be used for effective nonlinear time series forecasting.The time series of NARX neural networks can be defined as follows [9]: where the future values of a time series, denoted as y(t), are forecasted based on its past values with a delay time of , as well as an external series ().The model operates by capturing the non-linear dependencies between () and its historical values while incorporating the influence of the external series () to enhance prediction accuracy.By considering both the autoregressive nature of the target series with a delay of  and the impact of external factors, the NARX model offers a robust framework for time-series forecasting in various domains.This study investigates the capability of the NARX model for GWL data prediction, utilizing time (() ) as the input variable and GWL (()) as the target variable.This research employs a neural network architecture with one hidden layer and utilizes 1000 iterations for model training.The scaled conjugate gradient was used in the case of the training network.The scaled conjugate gradient method is an optimization algorithm commonly used in training ANNs, including models like the NARX.The SCG method efficiently minimizes the error function by updating the network's weight parameters during the learning process.The data were divided into training (70%) and test (30%) data.The delay time was set to 1:2.

Evaluation Criteria
To assess the precision of the predicting models, Root Mean Squared Error (RMSE) and Correlation Coefficient (R) metrics were utilized [10].

Non-Linear Autoregressive with Exogenous Inputs (NARX)
ANN (Artificial Neural Networks) and NARX models have gained significant popularity in time-series prediction due to their ability to model complex non-linear relationships.NARX networks are a particularly recurrent dynamic type of ANN [8].NARX neural networks can be used for effective nonlinear time series forecasting.The time series of NARX neural networks can be defined as follows [9]: where the future values of a time series, denoted as y(t), are forecasted based on its past values with a delay time of d, as well as an external series x(t).The model operates by capturing the non-linear dependencies between y(t) and its historical values while incorporating the influence of the external series x(t) to enhance prediction accuracy.By considering both the autoregressive nature of the target series with a delay of d and the impact of external factors, the NARX model offers a robust framework for time-series forecasting in various domains.This study investigates the capability of the NARX model for GWL data prediction, utilizing time (x(t)) as the input variable and GWL (y(t)) as the target variable.This research employs a neural network architecture with one hidden layer and utilizes 1000 iterations for model training.The scaled conjugate gradient was used in the case of the training network.The scaled conjugate gradient method is an optimization algorithm commonly used in training ANNs, including models like the NARX.The SCG method efficiently minimizes the error function by updating the network's weight parameters during the learning process.The data were divided into training (70%) and test (30%) data.The delay time was set to 1:2.

Evaluation Criteria
To assess the precision of the predicting models, Root Mean Squared Error (RMSE) and Correlation Coefficient (R) metrics were utilized [10].
Eng. Proc.2023, 56, 95 where x i , x, y i , and y represent the values of the x-variable within a sample, the average of x-variable values, the values of the y-variable within a sample, and the average of y-variable values, respectively.

Results and Discussion
Based on the information mentioned in the previous section, in this study, the NARX neural network model was used to simulate the GWL changes.Figure 3 illustrates the comparison between the actual monthly GWL time series and the predicted values using the NARX model.According to the results of the analysis, the RMSE resulted in a value of 0.215, while the DC yielded a value of 0.85.Additionally, the R-values for the training data and test data were determined to be 0.92 and 0.87, respectively (Figures 4 and 5).
where  , ̅ ,  , and  represent the values of the x-variable within a sample, the average of x-variable values, the values of the y-variable within a sample, and the average of yvariable values, respectively.

Results and Discussion
Based on the information mentioned in the previous section, in this study, the NARX neural network model was used to simulate the GWL changes.Figure 3 illustrates the comparison between the actual monthly GWL time series and the predicted values using the NARX model.According to the results of the analysis, the RMSE resulted in a value of 0.215, while the DC yielded a value of 0.85.Additionally, the R-values for the training data and test data were determined to be 0.92 and 0.87, respectively (Figures 4 and 5).The results obtained from the NARX model demonstrate its promising capability in predicting GWL variations.The DC of 0.86 indicates a reasonably good fit between the predicted and observed GWL values.Additionally, the relatively low RMSE of 0.215 suggests that the NARX model is capable of providing accurate predictions, with the deviations between predicted and observed values being relatively small.Moreover, the high R-values of 0.92 and 0.87 for the training and test data, respectively, indicate that the NARX model exhibits good performance in capturing the underlying non-linear dependencies in the data and has the potential for generalizing well to unseen data.However, despite these positive outcomes, the NARX model has some limitations that need to be addressed in future studies.The results obtained from the NARX model demonstrate its promising capability in predicting GWL variations.The DC of 0.86 indicates a reasonably good fit between the predicted and observed GWL values.Additionally, the relatively low RMSE of 0.215 suggests that the NARX model is capable of providing accurate predictions, with the deviations between predicted and observed values being relatively small.Moreover, the high R-values of 0.92 and 0.87 for the training and test data, respectively, indicate that the NARX model exhibits good performance in capturing the underlying non-linear dependencies in the data and has the potential for generalizing well to unseen data.However, despite these positive outcomes, the NARX model has some limitations that need to be addressed in future studies.

Conclusions
The accuracy of the model heavily relies on the availability and quality of the input data, including both the time series GWL data and relevant exogenous variables.Furthermore, the NARX model's success may vary with different delay times (d) and the number of hidden layer nodes.Fine-tuning these hyperparameters could potentially enhance the model's predictive capabilities and should be explored in future research.
For future studies, incorporating more domain-specific features and environmental factors could improve the NARX model's performance.A consideration of factors like  The results obtained from the NARX model demonstrate its promising capability in predicting GWL variations.The DC of 0.86 indicates a reasonably good fit between the predicted and observed GWL values.Additionally, the relatively low RMSE of 0.215 suggests that the NARX model is capable of providing accurate predictions, with the deviations between predicted and observed values being relatively small.Moreover, the high R-values of 0.92 and 0.87 for the training and test data, respectively, indicate that the NARX model exhibits good performance in capturing the underlying non-linear dependencies in the data and has the potential for generalizing well to unseen data.However, despite these positive outcomes, the NARX model has some limitations that need to be addressed in future studies.

Conclusions
The accuracy of the model heavily relies on the availability and quality of the input data, including both the time series GWL data and relevant exogenous variables.Furthermore, the NARX model's success may vary with different delay times (d) and the number of hidden layer nodes.Fine-tuning these hyperparameters could potentially enhance the model's predictive capabilities and should be explored in future research.
For future studies, incorporating more domain-specific features and environmental factors could improve the NARX model's performance.A consideration of factors like

Conclusions
The accuracy of the model heavily relies on the availability and quality of the input data, including both the time series GWL data and relevant exogenous variables.Furthermore, the NARX model's success may vary with different delay times (d) and the number of hidden layer nodes.Fine-tuning these hyperparameters could potentially enhance the model's predictive capabilities and should be explored in future research.
For future studies, incorporating more domain-specific features and environmental factors could improve the NARX model's performance.A consideration of factors like groundwater recharge rates, geological characteristics, and land use can enhance the model's ability to capture complex hydrological interactions.

Figure 1 .
Figure 1.Location of study region.

Figure 1 .
Figure 1.Location of study region.

Figure 2 .
Figure 2. Observed GWL monthly time series data.

Figure 2 .
Figure 2. Observed GWL monthly time series data.

Figure 3 .
Figure 3.The observed (actual) and predicted groundwater levels.Figure 3. The observed (actual) and predicted groundwater levels.

Figure 3 .
Figure 3.The observed (actual) and predicted groundwater levels.Figure 3. The observed (actual) and predicted groundwater levels.

Figure 4 .
Figure 4. Scatter plot of training set.