{'fraction_non_alphanumeric': 0.03530469017459774, 'fraction_numerical': 0.016175967134542963, 'mean_word_length': 4.9132085020242915, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Predicting Monthly Streamflow Using a Hybrid Wavelet Neural Network: Case Study of the Çoruh River Basin

In this study, a hybrid model combining discrete wavelet transforms (WTs) and artificial neural networks (ANNs) is used to estimate the monthly streamflow. The WT-ANN hybrid model was developed using the Daubechies main wavelet to predict the streamflow for three gauging stations on the Çoruh river basin one month in advance, with different combinations of air temperature, precipitation, and streamflow variables, and their wavelet transformations. Four different hybrid WT-ANN models were generated and compared with four different conventional ANN models. The dataset was chronologically divided into training, validation, and testing data. The results indicated that the WT-ANN hybrid models performed better than the traditional ANN models for all three stations. Furthermore, the chronologically divided dataset was used to examine the effects of changes in hydrological data over time on model performance. In conclusion, model performances in the training period deteriorated during the validation and testing periods due to structural changes in the hydrological data.


Introduction
Climate change, population growth, industrialization, and environmental impacts cause spatiotemporal changes in the availability of regional water resources [1,2]. In particular, climate change will affect the streamflow, temperature, amount of precipitation, and variability, which are the main components of the hydrological cycle [3][4][5]. For example, Jiao and Wang [6] state in their study that the streamflow and rainfall are in a decreasing trend while the temperature is in an increasing trend in the last decades. Modeling and outlining streamflow is a crucial process in water management and planning, and accurate streamflow prediction is a vital tool for optimal water quantity and quality management [7]. Studies on accurate projections of temporal streamflow patterns can aid in understanding the properties of hydrological processes in basins and improving basin modeling [8].
Many studies have been conducted that examined the relationship of streamflow with precipitation and temperature, and evaluated its changes and forecasts [9,10]. Xu et al. [11] found that periodic changes in streamflow were closely correlated with temperature and precipitation, and they observed a significant, positive correlation between these variables at different time scales. Furthermore, Duan et al. [12] recently demonstrated that temperature has a greater influence on streamflow than precipitation. Various studies and projections indicate that temperature and precipitation will continue to significantly affect the streamflow throughout the 21 st century [13,14]. Traditional studies related to streamflow used conventional methods, such as trend analysis, regression modeling, and classical time series (such as ARMA) worldwide and in Turkey [15][16][17][18].
Recently, artificial neural networks (ANNs) have been widely used in flow predictions. ANNs and discrete wavelet transform (WT), which are artificial intelligence methods, are frequently used in hydrological studies and are an important tool for model development [19][20][21]. ANN has been used for prediction in various fields of hydrology and can achieve successful outcomes in streamflow projections [20,[22][23][24][25]. The feed-forward neural network (FFNN) method is the most widely used ANN technique, and its popularity and utility in flow prediction are increasing [26]. Kişi and Yaseen et al. [27,28] used the FFNN method in estimating the monthly flow at different river stations to compare the performance of ANN models. However, Zealand et al. [29] used the ANN method to predict the flow after one to four weeks. Furthermore, Kişi [27] used ANN models to estimate the monthly flow in Turkey.
Linear and nonlinear methods, such as ANN, have several limitations when using non-stationary data. If the data processing phase is not sufficiently accurate for input data, various problems can be caused such as redundant, incomplete, or incorrect data with suitable method [30,31]. Recently, wavelet analysis has been found to provide very efficient and practical results when using non-stationary data along with ANN in hydrological and water-related fields [19]. Chang et al. [32] use the wavelet transform to understand the periodicity of the streamflow. This is because WTs (continuous and discrete) conveniently parses the time series and reveals information to be used in varying levels of predictions. WT is very useful in hydrological time series as it provides information regarding the temporal frequency.
Santos et al. and Santos et al. [33,34] utilized continuous wavelet transformation (CWT) to predict precipitation and the current time series. Nalley et al. and Seo et al. [35][36][37] demonstrated that structuring the monthly flows of the world's largest river basins and estimates provides better results when coupling DWT with ANN. Various hybrid models have been added to time series estimates using the WT method [38,39].
Recently, many studies have combined WT and ANN (WT-ANN) methods for streamflow predictions. Anctil and Tape [40] developed a WT-ANN model that predicts the next-day flow for the US and France. Partal [41] presented a hybrid monthly flow forecasting model for Turkey, and Kişi [42] used the WT-ANN model for daily flow estimation. However, Wu et al. [43] established a model that could forecast flow one to three days in advance. In these flow prediction applications, the hybrid WT-ANN model performed better than conventional ANN methods.
Streamflow prediction studies conducted in the Çoruh river basin used ANN with other techniques to achieve better results. Mehr et al. [7] combined linear genetic programming with the neuro-wavelet method to predict monthly flow in the Çoruh basin. Similarly, Mehr et al. [44] used WT for estimating the monthly current at two different stations in the Çoruh basin. They analyzed models that used the different effects of the lagged values of the flow as input variables.
Our study provides a distinctive viewpoint, as it incorporates flow into the analysis, along with the air temperature and precipitation as input variables. Mehr et al. [45] developed a monthly prediction model for successive current stations using the ANN method, while Yucel et al. [46] developed prediction models regarding the effect of snowmelt run-off on the Çoruh basin and its neighbors. Can et al. [24] estimated the daily flow using an ANN and autoregressive moving averages. Buyukyildiz [47] used the ANN, support vector machine (SVM), and adaptive fuzzy inference systems (ANFIS) methods to examine the monthly flow of the Çoruh basin.
In this study, a hybrid model consisting of DWT and ANN was proposed for predicting the monthly flow in the Çoruh basin based on temperature and precipitation. The FFNN method is the most widely used technique among classical ANN methods and was selected for this study. Three main streamflow gauging stations (observations ranging between 41 and 49 years) were selected that represented the Çoruh basin with the best data quality. The performances of the WT-ANN hybrid models were compared with those of classical ANN models.

Study Area
Çoruh river basin, which is located in northeastern Turkey, surfaces from the Mescit Mountains in the north of Erzurum Plateau at 3000 m above sea level and arrives at the Black Sea through Batumi in Georgia (see Fig. 1), covering approximately 20 km of the Georgian border (431 km).
The total drainage area of the basin is 21 000 km 2 ; 91% of which is located along the border with Turkey, while 9% lies within Georgia [48]. The Çoruh basin is the most erosion-affected basin in Turkey; its annual streamflow is 6.3 billion km 3 [49]. High humidity and temperatures are predominant in the northern part of the basin, which is close to the Black Sea, along with frequent precipitation. However, the southern area of the region experiences various weather conditions (hot summer, cold winter, snow).

Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy
Mountains and hills in the plateau region block moist clouds from the Black Sea, causing significant differences in the annual precipitation and temperatures of the northern and southern regions of the basin [50]. Fig. 1 illustrates a general overview of the Çoruh river basin.

Data
In this study, data from three main streamflow gauging stations (İspir, Mescitli, and Laleli) on the Çoruh river were obtained from General Directorate of State Hydraulic Works (DSI) [51]. Temperature data were obtained from the Royal Netherlands Meteorological Institute (KNMI) [52] and precipitation data were obtained from the World Bank [53] for provinces representing the basin. The precipitation and temperature data used in the flow forecast cover an average of 46 years (Table 1). For each station, datasets were chronologically divided into training (0.70), validation (0.15), and test (0.15) data. Table 1 shows the training, validation, and testing times of the hydrology and meteorology stations. In hydrology, the hydrological year is considered from November to October. Table 2 represents the average and standard deviation values of the variables for the training, validation, and testing periods for all three stations. Normalization was conducted as the measurement units differ for each variable. All variables were normalized to have zero mean and unit variance following the Z-score method. Similarly, many previously published studies used data normalization [54][55][56].

Definition of Models for Input Combinations
In our study, we used eight different models to predict the flow for the next month at the three stations. Of these models, 1-4 are based on ANN, and 5-8 are based on WT-ANN. The variables for each model are explained in detail in Table 3, where  indicates that the variable is used in the model, and -indicates that the variable is not.
The input vector of Model 1 contains the current monthly flow data used in the flow forecast for the next month. Models 2 and 3 were created by adding the monthly air temperature and precipitation to the current monthly flow values, respectively. Finally, Model 4 combines these three variables (flow, air temperature, and precipitation).  The input vectors for Models 5-8 are the discrete wavelet-transformed subseries of the variables used in Models 1-4, respectively. WT was conducted for flow, air temperature, and precipitation by using Db10 (3) and three details, and a single approximation was created for each station. The details of the WTs created for the three stations are indicated by d1, d2, and d3 in Fig. 3. The approximation depicts as a3 and S indicates the normalized original series.

Feed-Forward Neural Network (FFNN)
FFNN is one of the most widely used types of ANN, and consists of input, hidden, and output layers. Neurons in different layers are connected with adjusted weight values. Each neuron in the layer is only linked to neurons in the next layers. Each neuron in a layer adds an input and produces an output using a nonlinear activation function [57]. The purpose of FFNN is to improve the relationship between the input and output layers, and ANNs are an efficient alternative for modeling nonlinear time series [57].
The Levenberg-Marquardt algorithm is used to train the FFNN model. The dataset is divided into three subsets for training, validation, and testing. For each FFNN model, each calibration is repeated 20 times, and the root mean square error (RMSE) and the mean absolute error are is used as the performance index. Furthermore, during the training process, the early stopping approach is applied to control over-fitting, which has been used in many studies [13,16,58,59]. In this study, the neurons in the input layer consist of different combinations of x1 (streamflow), x2 (air temperature), and x3 (precipitation). There is a single neuron in the output layer, i.e., y1 (streamflow one month ahead). Throughout this paper, the FFNN model is referred to as ANN. Table 3. Input combinations of the models.

Models
Inputs Output

Coupled Wavelet Transform and Artificial Neural Network (WT-ANN) Model
WT is applied to remove noise, compress and decompose data. It is also widely used for analyzing signals and images. Wavelet is a time-dependent spectral analysis approach that resolves time series in the time-frequency space to provide a temporal definition of processes and their relationships [60].
WT can be divided into two categories: continuous WT (CWT) and discrete WT (DWT). DWT is more suitable for time series analysis as it only uses a subset of scales and positions to perform calculations [61,62]. Therefore, we used in this study.
There are several main types of wavelets in WT, including Biorthogonal, Coiflets, Daubechies, Haar, Meyer, Mexican Hat, Morlet, and Symlets. Level-10 Daubechies (Db10), one of the major wavelet species, has been widely used for analyzing hydrological data in previous studies [37,62,63], as it can accurately analyze dynamic signals with discontinuity and sudden changes [64,65].
Upon the selection of an appropriate major wavelet type, it is also important to determine the appropriate decomposition level. Filtering techniques are used to obtain a time scale signal in DWT. The original time series is passed through high and low-pass filters. Then, detailed coefficients and approximate series are obtained using the WT [66]. Low-pass filters include the trend presented in the actual input time-series signal, and are referred to as approximate (A). Highpass filters are also divided into different levels of detail (D) depending on the required time scale [67]. Aussem et al. [38] presented the formula l = int [log(n)] , where l is the decomposition level, n is the number of timeseries data, is the integer part function, and log denotes base-10 logarithms. Many recent studies have calculated the decomposition level using this formula [68][69][70]. In our study, the values for Ispir, Mescitli, and Laleli stations are 588, 564, and 492, respectively. Therefore, l is approximately 3 for each station. Thus, three wavelet decomposition levels are selected for all stations and used to produce three details (D1, D2, and D3) and an approximate (A3) sub time series.
A general diagram of the coupled WT-ANN model to facilitate its expression is given in Fig. 2. T α represents the time series in the input layer, and is expressed in a general manner as there are eight different models in our study. S t+1 in the output layer refers to the streamflow one month in the future.

Model Comparison Criteria
Many statistical performance criteria are used to compare the goodness of models. In previous studies, the RMSE, mean absolute error (MAE), and coefficient of determination (R2) were used for comparing ANN models [42,71]. Therefore, in our study, the criteria given below are used to compare the models.    (4) ...where O i is the observed streamflow at time i, M i is the estimated streamflow at time i, and N indicates the number of samples. R 2 ranges from 0 to 1, and a value of 1 indicates a perfect fit between the observed and estimated value. As RMSE and MAE are error terms, they are expected to be close to 0. A value of 0 indicates a perfect fit.

Results and Discussion
We used Deep Learning ToolboxTM 12.1 and Wavelet ToolboxTM 5.2 in MATLAB (R2019a) to conduct the analyses. We found that the number of neurons in the hidden layer for both the ANN (Models from 1 to 4) and WT-ANN (Models from 5 to 8) models by trial and error. The number of neurons for the three stations ranged from 2 to 10. One of the main reasons for this difference is that there are different numbers of variables in the input vector from Models 1 to 8. The input vector for Model 1 is 1×N, while that for Model 8 is 12×N. For all models, the Levenberg-Marquardt algorithm is used in the training process, as mentioned in the methods section. Table 4 demonstrated the performance values of the Ispir, Mescitli, and Laleli stations in the Çoruh basin during the training, validation, and test periods. All variables were normalized before analysis.
The performance of the ANN models differed slightly for each station during training, validation, and testing. By carefully examining Table 4, one can see that Model 4 is more suitable for all three stations, as it contains the streamflow, air temperature, and precipitation variables. The performance values indicate that these three variables are important in predicting the streamflow one month in advance. Furthermore, the RMSE and MAE values were lowest for Model 4. Another noteworthy issue is that the first four models performed best during the training periods. Furthermore, the performance of the models decreased Fig. 3. DWTs of the streamflow, air temperature, and precipitation variables for Ispir, Mescitli, and Laleli Station.

Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy
slightly more during the validation periods according to training periods, and the model performance was lowest during the testing period. For example, the training, validation, and testing R 2 values for Model 4 at Ispir station were 0.878, 0.840, and 0.809, respectively. The data were selected chronologically, as mentioned in the data section (see Table 1). The time intervals for the training, validation, and testing models were 1965-1999, 1999-2006, and 2006-2013, respectively. There is differentiation due to the structural changes in the streamflow, air temperature, and precipitation variables used for the one-month-ahead streamflow estimation between years. Table 2 shows the average values of these variables in these periods. For instance, while the average amount of monthly precipitation during the validation period was higher than that during the training period, the amount in the testing period was lower than that in the validation period. Meanwhile, the air temperature is increasing gradually. Therefore, it is possible that the performance of the data trained for the one-month-ahead streamflow forecast decreases as time progresses due to changes in the structure.
The WT-ANN hybrid models performed better than the ANN models at all three stations. The WT versions of Model 1 to 4 are labeled as from Model 5 to 8, respectively (see Table 3). By comparing these models, we found that Model 8, which considers the original monthly streamflow, air temperature, and precipitation to estimate the streamflow one month in advance, performs better for all three stations. Therefore, it is possible that the one-month-ahead streamflow is currently affected by the air temperature, amount of precipitation, and streamflow. Regarding the test period performances, the R2 values for the Ispir, Mescitli, and Laleli stations were 0.847, 0.906, and 0.860, respectively (Table 4). However, those for the training period were 0.970, 0.980, and 0.950, respectively. Similar to the ANN results, the performance of the trained data was worse for all three stations during the text period due to the chronological partition rates. The changes in streamflow, air temperature, and precipitation during these periods may be the reason for such differences in performance. Fig. 4 presents the observed and predicted values of all three stations for Model 8 by month, and shows the model's success. Fig. 4 has three parts with vertical lines, including training, validation, and testing, to allow the model estimations to visualize more clearly.
The WT-ANN models performed better than the traditional ANN models for all three stations located in Çoruh river basin. This may be because the WT adds useful information to the ANN models at the Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy • Author Copy decomposition levels of the streamflow, air temperature, and precipitation time series. This study also reveals the importance of WT in streamflow estimation. Many previous studies conducted streamflow estimation using WT, such as the daily [72], monthly [73], and annual streamflow [74]. All of these studies aimed to achieve good results with WT.
Mehr et al. [7] used WT to conduct monthly streamflow estimation for two stations in the Çoruh river basin, using downstream and upstream variables to explain the streamflow. Similarly, Mehr et al. [44] used WT for the monthly streamflow estimation for Çoruh basin, analyzing models consisting of different combinations of lagged values of the current as input variables. In our study, the air temperature and precipitation, along with streamflow, are included in the analysis as input variables. Therefore, this study offers a different perspective.

Conclusions
In conclusion, the results of the WT-ANN models were better for all three stations. Model 8, which includes the WT of streamflow, air temperature, and precipitation, performed best. Using the datasets that were divided chronologically for all three stations, we demonstrated that the performance of the data set trained at a particular time may change during another time period. Therefore, changes in climate over time can also change the structure of variables, such as streamflow, air temperature, and rainfall. Changes in streamflow are a complicated feedback to climate change exists [75].
The results of this study indicate that combining wavelets and ANNs makes an essential contribution to estimating streamflow. Furthermore, the air temperature and amount of precipitation have important effects on the streamflow, and this time series performs better when WTs are made.
The results of this study will be significant in areas where hybrid WT and ANN methods are used as time series data in streamflow estimation studies for basin regions. While most previous studies using hybrid WT-ANN techniques did not consider the streamflow variable due to a lack of data, Graf et al. [54] stated that the streamflow variable is significantly affected by hydroelectric power plants and snow melt, especially at high altitudes. While hybrid model studies perform much better than traditional methods, examining models from more detailed and different perspectives will achieve new results. The Çoruh basin is an important region for electricity production through hydropower plants in Turkey [76,77], and the authors of this study believe that modeling the flow along with temperature and precipitation will make an important contribution to literature. Additionally, many other factors (such as groundwater, shading, water depth, and slope) affect the water basin streamflow. Although these effects were not included in the system of this study, our models achieved good results in all processes for long-term data. In our future studies, we will aim to evaluate other factors and improve the consistency of the model. The different meteorological and hydrological effect variables of the streamflow and other coupled wavelet time series methods, or using them in different basin regions, will further improve the prediction ability of the models examined in this study.