Abstract
Introduction
In literature, integrating artificial neural network (ANN) with wavelet transform in order to reinforce its modelling performance is not a very recent approach. However, there are many ways in combining these two methods. In fact, one of the early studies by the author is on fatigue failure assessment of rotating machinery, 1 where vibration data of a critical component were analysed for early fault detection and diagnostics. Another early study using wavelet neural networks (WNNs) is on hydrology carried out by Coulibaly et al. 2 In their study, a recursive neural network was used in order to forecast annual discharge. The authors analysed sea-level pressure and various meteorological data in Iceland in time–frequency resolution with continuous wavelet transform to correlate those with discharge data and obtained better results compared to Fourier transform–based classical time–frequency methods. Partal and Cigizoglu decomposed meteorological data using wavelet transform and established a wavelet-ANN (WANN) model. 3 They compared prediction results of precipitation obtained from the WANN with that of conventional ANN and then that of a multi-linear regression model. The conclusion is in favour of the WNN: the WANN model showed a better accuracy. In another study, the intermittent streamflow is forecasted using wavelet transform and ANN. 4 The streamflow data are decomposed to its components using wavelet transform; subsequently, these components are used in an ANN model as inputs. The results indicated that WANN estimations were considerably superior to the conventional ANN. In another notable study, Kim and Valdes proposed a similar approach to forecast drought in Mexico using meteorological data. 5 The data were decomposed by means of discrete wavelet transform. The components obtained from decomposing were fed to an ANN model as inputs, and prediction results with high success rates are achieved. In another similar work, WNN model was employed to forecast river discharge. 6 The river discharge data were decomposed into eight levels using wavelet transform. The results obtained showed a high success rate (decreased the mean squared error (MSE) by 33 which corresponds to a 55% decrease in the prediction error). In this current study, a hybrid structure composed of wavelet transforms and ANNs has been employed to predict the daily discharge using meteorological data along the Ergene Watershed in Turkey. The study presented in this paper constitutes some outcomes of data analysis work package of a project on developing a web-based watershed information system. The measured and recorded meteorological data are provided by the Turkish State Meteorological Services and General Directorate of State Hydraulic Works under the Ministry of Forest and Water Management for the years 1970 to 2014. However, there is no data available from some measurement stations within some periods of time, particularly for the years 1975 to 1980, which last as long as one month in a year. Therefore, a great deal of effort is spent on predicting the missing data by means of ANNs in various configurations. In the earlier paper by the authors, 7 current and missing discharge data were estimated by means of only measured discharge data. Whereas in this study, the discharge predictions are carried out by the discharge and also meteorological data. Following this Introduction section, the paper first outlines the methodology, which mainly comprises two data analysis methods, such as neural networks and wavelet transforms, developed within the frame of this work. Then, the case study is presented in detail followed by the ‘Results’ section for the data analysis experiments. This paper concludes with the overall evaluation of results and some comments on the current and follow-up work.
Methodology
ANNs
Although they first appeared in 1940s for data analysis based on their learning and generalization abilities, ANNs still find areas of application with their new architecture and learning methods and also as combined approaches such as fuzzy-ANNs, adaptive neuro-fuzzy inference system (ANFIS) and WANNs as this study involves. They are an information-processing technique inspired by the information processing and learning mechanisms of the human brain and are used to solve problems such as clustering, classification and simulation and making predictions in complex recognition problems. ANNs are inspired by the biological nervous system. They are a kind of algorithm that functions similar to that of the human brain with neurons as in nerve cells, and these neurons are connected to each other by specific link weights. As in the human learning process, the neurons output an activation level to the inputs with respect to the link weights and activation functions.
As well known, an ANN consists of input and output layers and a hidden layer between input and output. The structure consisting of neurons between input and output is called intermediate or hidden layer. 8 The hidden layer can be more than one. 9 ANNs are introduced training sets representing previous examples as human brain learns from examples and experiences establishing input–output relationships. During this training, the connection weights between the neurons are re-determined; as they were in the nerve cells, appropriate connection weights are produced. Hence, some kind of learning process takes place in ANNs.
There are many training functions used to train an ANN. 10 The Levenberg–Marquardt (LM) training function is used in this study. The LM was designed to approximate a second-order training without having to compute Hessian matrix. 11 When performance function is stated as sum of squares, the Hessian matrix can be stated approximately as follows
Gradient matrix can be computed by the following formula
where
where
Wavelet transform
Wavelet transformation is a powerful mathematical transformation that successfully provides a time–frequency representation of the signal being analysed. 12 The wavelet transform developed relatively much more recently (by J. Morlet, S. Mallat and I. Daubechies from early 1980s to late 1990s) compared to its counterpart the Fourier transform (by J. B. J. Fourier in early 1800s), and short-time Fourier transform (by D. Gabor in mid 1940s) has been found to be more effective in the analyses of aperiodic time series undergoing sudden local changes.1,13
The mother wavelet is denoted with
where
There are two types of wavelet transformation, which are continuous wavelet transformation (CWT) and discrete wavelet transformation (DWT). Discrete wavelet transform separates the original signal into sub-sets at a smaller size, capturing signals with more information. Hence, discrete wavelet transform is used in this study.
Discrete wavelet transform
If the wavelet function
where
Let
where
The scale parameter is directly proportional to the translation parameter. Since a large-scale window is used to analyse signals with low-frequency components (the scale obtained with the large values of
The discrete wavelet transform of the discrete time series of
where
As shown in Figure 1, the original time series (

Decomposition of a signal.
The signal can be broken down into many lower resolution components. This is called the wavelet decomposition tree and shown in Figure 2.

Wavelet decomposition tree (as outlined in MATLAB website). 16
In Figure 2,
Wavelet functions
There are many wavelet functions presented in literature. The mother wavelets used widely in the wavelet analysis are Morlet, Haar, Mexican hat and Daubechies wavelets. All wavelet functions are defined over the real axis
1. The integral of wavelet function is zero
2. The integral of the square of the wavelet function is unity
3. Admissibility condition must be satisfied. Admissibility condition is as follows
where
Equation (9) denotes that the wavelet function
To reconstruct the signal to be analysed, the admissibility condition must be satisfied. In this study, Daubechies wavelets are used to analyse the signals; here, they are flowrate or discharge data.
Structure of WNNs
The aim of the WNN here in this study is to use approximation and detailed components of original time series as inputs to ANN to forecast daily discharge. The structure of WNNs is shown in Figure 3.

The structure of wavelet neural networks (Wei et al., 2015). 23
Discrete wavelet transform is applied to the discharge data at several levels using several mother wavelets. Each wavelet transformation represents the original time series at a different representation level. As the level of transformation increases, the smoother approximate values of the signal are obtained because the lower frequency components are filtered out. In the same way, the detailed series of signal is smoother at lower frequencies as the level increases. This is expected because the wavelet transform passes the signal through the high- and low-pass filters. Then, the signal obtained by the low-pass filter is processed again. Thus, signals with lower frequency components are decomposed continuously. This algorithm is called the Mallat algorithm. 14
Case study
The case study presented here involves the prediction of future discharge by means of the discharge data collected over the years in the Lüleburgaz, Inanli and Uzunköprü measurement stations, which are located in Ergene Watershed of Thrace Region, the European part, that is, the north-western part of Turkey. For this purpose, the discharge data of previous days are used to predict the discharge of the current day. Two models, namely, the conventional ANN and WANN (WNN-1), are used, and the results obtained by these two models are compared. The observed data were collected for a duration of 25 years (9131 daily discharge data samples) with an observation period between the years 1970 and 1994 for Uzunköprü Station. For Inanli Station, the duration was 9 years (3287 daily discharge data samples) between 1970 and 1978, and for Lüleburgaz Station, the duration was 6 years (2191 daily discharge data samples) between 1970 and 1975. The observed data were for the hydrologic years meaning that the first month of the year is October and the last month of the year is September.
A two-third, that is, 67% of whole data sets, was used for training the ANN designed and the remaining one-third, 33% of whole data sets, was used for testing purposes. For Uzunköprü Station, the first 6087 data samples were used for training and the remaining 3044 data samples were used for testing. For Inanli Station, the first 2191 data samples were used for training and the remaining 1096 data samples were used for testing. For the Lüleburgaz Station, the first 1461 data samples were used for training and the remaining 730 data samples were used testing.
The WNN model (WNN-2) was used for predicting the discharge using the meteorological data such as precipitation and evaporation together with the past discharge data as inputs. For Uzunköprü Station, 3561 daily discharge data samples between 1 January 1986 and 30 September 1994 were used. For Inanli Station, 3287 daily discharge data samples were available. Finally, for Lüleburgaz Station, 2099 daily discharge data samples were used. As in the previous models, two-third of whole data sets was used for training the ANN and the remaining one-third was used for testing the ANN. MATLAB® as a programming environment was used for all wavelet transform and ANN-based prediction experiments.
Results
Five wavelet decomposition levels are selected as 2, 4, 8, 16 and 32 days. It is found that the component DW5, which corresponds to 32 days, is the sub-series that represents the daily flow data best on an annual basis. Therefore, A5 and D1–D5 coefficients are employed as inputs to WNN-1 model. A5 represents the approximate series obtained by decomposing the signal at the fifth level using DWT. D1–D5 coefficients represent the detailed series of 1 to 5 levels obtained by decomposing the signal using DWT. The db4 mother wavelet, which is a member of the Daubechies wavelet family, is used to decompose the signal. Decomposing the signals at five levels is shown in Figure 4, where a set of typical flowrate data is employed.

Decomposing the signal at eight levels.
In this study, the MSE and correlation coefficient
Correlation coefficient (
and MSE
where
The structure of ANN used consists of three layers which are the input layer, output layer and two hidden layers. For Inanli station, ANN(6,3,7,1) is used, which denotes that the ANN has 1 input layer having 6 inputs, 1 output layer with one neuron and 2 hidden layers having 3 and 7 neurons, respectively. Similar ANN models used for the rest of the stations are presented in Table 1.
MSE and
MSE: mean squared error; WNN: wavelet neural network.
As mentioned before, 67% of whole data were used to train the ANN. After the training, the remaining 33% of data set were used to test the ANN. In this study, the sigmoid function is used as an activation function. The discharge values of previous days (
Here, A5 is the component that is an approximation of the signal at the eighth level. D1–D5 are the detailed components of signal at levels 1 to 5, respectively. The prediction results obtained from WNN-1 are shown in Figure 5. The predictions can be considered quite successful. Especially, the success rates in predicting peak values and sudden changes of discharge are found very satisfactory.

Daily discharge estimation by WNN-1 model for (a) Lüleburgaz station, (b) Inanli station and (c) Uzunköprü station.
The discharge data are also used as inputs to the conventional ANN model.
MSE and
MSE: mean squared error; ANN: artificial neural network.

Daily discharge estimation by conventional ANN model for (a) Lüleburgaz station, (b) Inanli station and (c) Uzunköprü station.
As a further step, the WNN-2 model is also used to predict the discharge. As mentioned before, the meteorological data such as precipitation and evaporation along with the past discharge data were used as inputs to ANN. Precipitation and evaporation data were obtained from various meteorological stations. Components A5, D3, D4 and D5 were used for the evaporation (E) data. Since the precipitation (P) data contain higher frequency components, components A3, D1, D2 and D3 were used. For the discharge (D) data, however, A5 and D1–D5 components were used as inputs. The delay parameters are selected as five as in the previous models. WNN-2 produced satisfactory results both for the coefficient of correlation (R) and the MSE performance criteria (Table 3). The results of predictions using WNN-2 are presented in Figure 7.
MSE and
MSE: mean squared error; WNN: wavelet neural network.

Daily discharge predictions by WNN-2 model for (a) Lüleburgaz station, (b) Inanli station and (c) Uzunköprü station.
Conclusion
In this study, the accuracy of the WNN model for discharge estimation is examined. WNN model is developed by combining the wavelet transform and ANN model. ANN and WNN models are tested using discharge data, and a second WNN model is tested with discharge, evaporation and precipitation data. Estimation accuracy of ANN model and WNN models was compared with the experiments for estimating high and low discharges. It has been observed that the WNN model presents better results than the conventional ANN model in estimating the high discharge. The tests show that DWT significantly increases the accuracy of ANN. The WNN model significantly reduced the square root of mean errors compared to the ANN model. Also, the WNN model, which used meteorological data, increased the accuracy. In this study, the Mallat algorithm was used for DWT. The most effective detailed series and approximate series were used as inputs to ANN models separately. It is concluded that wavelets can be successfully used incorporated with an ANN model by adding detailed and approximate series. Comprehensive experiments based on this approach using real data will be carried out in the next study.
