Introduction

High-accuracy modeling of streamflow data is of great importance for water resources management, reservoir inflow, dam sizing, and hydrograph analysis. In addition, the more precisely river flows are modeled, the more effective will be the management of floods and droughts, which are the most important natural disasters of meteorological origin and cause great loss of life and property However, determination of streamflow values is very complex and effortful because many parameters, such as precipitation, groundwater, initial moisture content of the soil, temperature, evapotranspiration, and sunshine duration, affect the streamflow. For this reason, streamflow estimation, a non-linear and costly task, can be easily performed using artificial intelligence (AI) and signal decomposition processes, among the developing technological methods (Kişi 2008a; Shiri and Kisi 2010; Wang et al. 2022). In addition, much higher prediction accuracy can be obtained with signal separation techniques. For this reason, the aim in the present study was to estimate streamflow values with the highest precision using the feedforward backpropagation neural network (FFBPNN) method, widely used for estimating streamflow data, and various mother wavelets.

Studies involving the use of signal decomposition techniques such as wavelet transform (WT) and AI methods and determining the effective wavelet type have attracted the attention of many researchers in recent years. Daubechies (1992) evaluated the effect of various mother wavelets on artificial neural networks (ANNs), from db2-10 and Coif 1–5. Nourani et al. (2011) employed ANN-wavelet rainfall-runoff models and assessed the performance of Haar, db2, db3, db4, Sym2, Sym3, and Coif1 mother wavelets. The results indicate that the Haar and db2 main wavelets are superior. Maheswaran and Khosa (2012) stated that the db2 function is more successful than the db1, db3, db4, and Sym4 mother wavelets in hydrological predictions. found that the db2 mother wavelet performed more effectively than Haar (db1) did. Deka et al. (2012) evaluated the performance of a wavelet–ANN hybrid model to predict daily flow data. For this, Daubechies, Haar, and Coiflets were applied to mother wavelets. The results showed that the db2 wavelet was superior to the value mother wavelets. Wei et al. (2013) compared ANN and wavelet-neural network (WNN) models for the estimation of river flows in the Weihe River in China. It was determined that the WNN hybrid model improved the prediction performance of the stand-alone ANN model. Shoaib et al. (2014) used in rainfall–runoff modeling a hybrid multilayer perceptron neural network (MLPNN) and radial basis function neural network (RBFNN) alone and in combination with a wavelet transform. Fung et al. (2020) used a support vector machine (SVM), fuzzy logic, and a WT for drought prediction. Tayyab et al. (2018) used an FFBPNN, RBFNN, discrete wavelet transform (DWT) and ensemble empirical mode decomposition (EEMD) to predict streamflow in the Upper Indus Basin, Pakistan. EEMD-RBF showed the best prediction performance. Freire et al. (2019) for daily streamflows prediction in the Sobradinho Reservoir in northeastern Brazil combined the Daubechies, Symlet, Coiflet, and discrete Meyer mother wavelet types with the ANN model. The wavelet-based ANN model significantly improved the performance of the ANN model and the discrete Meyer mother wavelet showed the highest prediction success. Li et al. (2019) employed EMD, EEMD, a DWT, and an ANN in predicting long-term streamflow. Tayyab et al. (2019) used FFBPNN and RBFNN models with a DWT for modeling the rainfall–runoff relationship in the Jinsha River basin in the Yangtze River in China. It was found that DWT transformation improved the performance of ANN models. Dalkiliç and Hashimi (2020) found that the wavelet-neural network (WNN) model was more successful in estimating monthly flow than ANNs and an adaptive neuro-fuzzy inference system (ANFIS). Kambalimath and Deka (2021) used an SVM with Haar, Daubechies, Coiflets, and Symlets wavelets to evaluate the improvement of the performance of the SVM model in daily flow prediction in the Indian state of Karnataka. Güneş et al. (2021) compared the performance of ANN and Daubechies wavelet-based W-ANN models to predict the streamflow in the Çoruh River Basin. It was determined that the W-ANN models were superior. Katipoğlu (2022) estimated monthly flows in the Karasu river in the Euphrates basin using the ANN model. It was suggested that potential evapotranspiration values play an important role in streamflow estimation. Yilmaz et al. (2022) integrated ANNs with a WT for streamflow data at four stations in the Coruh Basin. An additive wavelet transform (AWT) and DWT were used for decomposition of streamflows. The results of the study showed that WT techniques increased the performance of the ANN model. In addition, in the prediction of monthly streamflow an AWT–ANN model is proposed. Momeneh and Nourani (2022) employed an ANN, DWT, and multi-DWT to forecast daily and monthly streamflow data in the catchment area of Gamasiab River, in western Iran. The results of the study showed higher flow prediction accuracy of the M-DWT-ANN model. The studies in which the optimum mother wavelet types are extensively compared for current estimation in the literature are limited. Therefore, in the present study, it was aimed to eliminate this deficiency.

In the current study, FFBPNN and DWT models were used to estimate monthly average streamflow data in Amasya. While precipitation, temperature, and historical streamflow data were used as inputs for the model's setup, streamflow data were used as output. The primary purpose of the study was to reveal the most suitable wavelet family for streamflow estimation. Since the WT improves machine learning models' performance, it was aimed to obtain more precise results in streamflow estimation. To determine the best mother wavelet in the study, a hybrid wavelet–FFBPNN model was established by separating the input variables into sub signals with the widely used Haar, Daubechies 2, Daubechies 4, Discrete Meyer, Coiflets 3, Coiflets 5, Symlet 3, and Symlet 5 wavelets. Then the hybrid and stand-alone FFBPNN models were compared using various statistical indicators and the most suitable mother wavelet was determined.

Material and method

Study area and data

The River Yeşilırmak, originating at the foot of Kösedağ and merging with various streams, empties into the Black Sea at Çarşamba. The Yeşilırmak Basin has a surface area of 39,626 km2. The annual precipitation of the basin is 528 mm/m2. The average yearly flow is 6.10 km3 and the average annual temperature is 12 °C (Boustani and Ulke 2020).

The monthly average streamflow data of the 1412 stations used were obtained from the annual flow observations of the General Directorate of Electrical Power Resources Survey and Development Administration. The monthly average precipitation and temperature used were obtained from the Türkiye General Directorate of Meteorology. For the establishment of the hybrid wavelet AI model, 623 × 5 = 3115 items of data covering the years 1960–2011 were used.

Feed-forward backpropagation neural network

The ANN, inspired by the working principle of the human brain, is based on loading features such as generalization, inference, and analysis into machines. It consists of neurons, layers, and many non-linear and interconnected processing elements. As a result, the ANN can model non-linear relationships between complex input/output variables such as the precipitation flow relationship, sediment transport, and river flow estimation in the field of hydrology (Tayyab et al. 2019).

The FFBPNN is the artificial neural network algorithm used most in hydrological studies. This algorithm consists of the input layer, where the data are introduced; an intermediate layer consisting of n neurons; and an output layer that displays the results produced by the inputs. The FFBPNN model consists of forward and backward calculation stages. In the forward computation, each layer uses the weights transferred from the previous layer. Backward calculation is done to organize the weights. The weight adjustment process performed so that the error between the actual and predicted values reaches the minimum value is called the training of the network. If the errors are above the desired value, the errors are adjusted backwards over the weights of the network. This stage represents the backpropagation process (Umut 2012). The mathematical expression of the network is given in Eq. 1.

$$y = f\left( {\sum\limits_{{i = 1}}^{n} {w_{i} x_{i} + b} } \right)$$
(1)

where y denotes the output, f is the transfer function, wi shows the weight vector, xi is the input vector, and b is the bias (Tayyab et al. 2019).

Wavelet transform

WT is a signal processing method proposed as an alternative to the Fourier transform. It decomposes time series, reduces and softens noise, and improves estimations. The basic approach in wavelet analysis is based on the decomposition of a signal’s mother wavelet in shifted and scaled shapes (Grossmann and Morlet 1984; Nayak et al. 2013). Wavelet analysis is a powerful mathematical transformation that helps us to examine in more detail aspects of trends, breakpoints, and discontinuities that traditional data analysis techniques cannot detect (Adamowski and Sun 2010). This method uses long intervals to reveal low-frequency information in the time series and short intervals to show high-frequency details. A wavelet family/base uses two orthogonal functions known as the father/scaling function \(\phi (t)\) and the mother/wavelet function (Shoaib et al. 2014). A wavelet function \(\psi \left(t\right)\) is represented by Eq. 2.

$${\int }_{-\infty }^{\infty } \psi \left(t\right)dt=0$$
(2)

\(\psi_{s,\tau }\) can be calculated with compressing and expanding \(\psi (t)\).

$$\psi_{s,\tau } (t) = |s|^{ - 1/2} \psi \left( {\frac{t - \tau }{s}} \right)\quad \tau \in R,s \in R,s \ne 0$$
(3)

where s denotes scale or frequency factor, τ is the time factor, and R is the domain of real numbers (Umut 2012).

According to the Mallat algorithm, the DWT of the xi series is obtained by Eq. 4 is

$$W_{j,\,k} = 2^{ - j/2} \sum\limits_{i = 0}^{N - 1} {x_{i} \psi \,(2^{ - j} \,i - k)}$$
(4)

where i shows integer time steps, j and k indicate integers that control, respectively, the scale and time; Wj,k is the wavelet coefficient (Umut 2012).

Equation 5 determines the optimum separation level (Nourani et al. 2009a; Nourani et al. 2009b).

$$L = {\text{int}} [\log (N)]$$
(5)

where L is the level and N is the total data. For the study at hand, N = 623, so L = 3.

Determination of the optimum mother wavelet

Various mother wavelets have different properties, such as support regions and vanishing moments. The wavelet support region is used to express the propagation length and the vanishing moment to express the polynomial behavior of the wavelet or data information. For example, the db3, coif3, and sym3 functions represent polynomials with three coefficients that encode an operation with constant, linear, and quadratic signal components. This study investigated the effect of the most widely used Haar, Daubechies, Coiflets, Symlets and Meyer wavelets on the prediction performance of the ANN (Addison 2002; Shoaib et al. 2014; Umut 2012).

Performance metrics

The performances of the designed models were evaluated according to mean square error (MSE), and correlation coefficient (R). Error values show the deviation of the predicted and actual values. R values determine the linear relationship between actual and predicted values. The MSE values are closer to 0 and the R values closer to 1. The calculation of MSE and R values are given in Eq. (6) and Eq. (7), respectively.

$$\mathrm{MSE}=\frac{1}{n}\sum_{i=1}^{n}({Q}_{a,i}-{Q}_{p,i}{)}^{2}$$
(6)
$$\mathrm{R}=\sqrt{\frac{{\sum }_{i=1}^{n} ( {Q}_{a,i}-{Q}_{a,{\rm avg}})^{2}-{\sum }_{i=1}^{n}({Q}_{a,i}-{Q}_{p,i})^{2}}{{\sum }_{i=1}^{n}({Q}_{a,i}-{Q}_{a,{\rm avg}})^{2}}}$$
(7)

where \({Q}_{a,i}\): actual values, \({Q}_{p,i}\): the predicted values of models, \({Q}_{a,i}-{Q}_{p,i}\): the value of the error terms, \({Q}_{a,{\rm avg}}\): average of Q values, and n: the number of data. The model with a higher R-value and lower MSE value was evaluated as a relatively better model for streamflow prediction.

Rank analysis

The rank analysis is based on determining which one has the highest total rank value by ranking many statistical criteria. The statistical criteria used in this study were listed separately and the most optimal model was determined according to the total rank value obtained. Rankings were arranged from the maximum value equal to the number of models, which was three in our study, to the minimum value equal to one. Here, the best performing model is assigned the third rank, and the lowest performing model is set the first rank. The model with the highest total rank shows the best, while the model with the lowest shows the worst (Zhang et al. 2020) (Fig. 1) (EIE 2020).

Fig. 1
figure 1

Yesilirmak basin location map

Results and discussion

This study combines the FFBPNN model and various wavelets to estimate monthly average flow data. In the model setup, the data is divided into 70% training, 15% testing and 15% validition. The correlation matrix was used to select the model input combination (Fig. 2). In creating the model, the precipitation, temperature, and relative humidity data at the meteorological station 17,085 and the flow data at station 1412 were subjected to correlation analysis.

Fig. 2
figure 2

Correlation matrix of the variables

For the estimation of the streamflow values according to the correlation coefficients, the average precipitation 1 month ago (P(t − 1)), the average precipitation in t months (P(t)), the monthly average temperature 1 month ago (T(t − 1)), the 1 month ago. It is aimed to estimate the Q(t) values by presenting the monthly average streamflow Q(t − 1) values as input to the model.

Established model structure:

$$f\left( {{\text{P}}\left( {{\text{t}} - {1}} \right),{\text{ P}}\left( {\text{t}} \right),{\text{ T}}\left( {{\text{t}} - {1}} \right),{\text{ Q}}\left( {{\text{t}} - {1}} \right)} \right) = {\text{ Q}}\left( {\text{t}} \right)$$
(8)

In this study, the Levenberg–Marquardt training algorithm, which requires more memory but less time, was used in the training phase. Figure 3 shows the structure of the established FFBPNN model and W-FFBPNN model. 1 hidden layer and ten neurons are used in artificial intelligence models.

Fig. 3
figure 3

Structure of the established models a FFBPNN, b W-FFBPNN

Various wavelet types decomposing meteorological data into sub signals are shown in Fig. 4. For example, the signals obtained by splitting the precipitation data into three levels of subcomponents are shown. Using various mother wavelets, the precipitation series is divided into 3 detail and one approximate component. To produce the hybrid Wavelet-FFBPNN model, the input variables were divided into 3 detail and 1 approximate components and these components were entered into the hybrid model separately. Generally, Wavelet-FFBPNN model training was completed with 6–8 iterations. The training, testing and validation performance graphs of the established models are shown in Fig. 5. When the change in MSE values was examined, the training was stopped when the MSE values in the validation phase started to increase. Thus, the overfitting problem can be prevented.

Fig. 4
figure 4figure 4

Decomposition of precipitation into sub signals with various mother wavelets: a Haar, b db2, c db4, d dmey, e coif 3, f coif5, g sym3, h sym5

Fig. 5
figure 5

Performance spread of the models used a stand-alone FFBPNN b Haar, c db 2, d db 4, e dmey, f coif 3, g coif 5, h sym 3, i sym 5

The training, validation and test errors of the single FFBPNN and W-FFBPNN models established in Fig. 6 are shown. When the propagation of the errors is examined, it can be selected as the most effective wavelets since the errors of the hybrid W-FFBPNN models created with db4, coif 3, and coif5 wavelets are around the zero error line and show small bars in the maximum error region.

Fig. 6
figure 6

Error propagation of the models used a stand-alone FFBPNN b Haar, c db 2, d db 4, e dmey, f coif 3, g coif 5, h sym 3, i sym 5

Figure 7 shows the training, testing, and validation of the FFBPNN model and the scatter plot of the actual and estimated values of the whole model. The actual and predicted values are usually gathered around the 45-degree line, which indicates that the model is quite successful. In addition, the high correlation coefficient (R) values, which show the relationship of the points with each other, indicate that the model gives satisfactory results. However, it is seen that the single model is weak in estimating peak streamflow values.

Fig. 7
figure 7

Single model regression results

Figure 8 shows the training, testing, validation and scatter plot of the real and predicted values of the whole model of the hybrid W-FFBPNN model constructed by combining Haar, db2, db4, and dmey wavelets with the FFBPNN model are shown. The fact that the actual and predicted values are generally stacked above the 45-degree regression line and the high correlation coefficient (R) values prove that the model shows high-precision prediction performance. Especially the scattering of the outputs of db4, dmey wavelets around the linear line proves that it delivers high accuracy in current estimation.

Fig. 8
figure 8

Regression analysis results of W-FFBPNN models a Haar, b db 2, c db 4, d dmey

Figure 9 shows the scatter plot of the actual and predicted values of the hybrid W-FFBPNN model constructed by combining the coif 3, coif 5, sym 3, and sym 5 wavelets with the FFBPNN model is presented. The fact that the actual and predicted values are usually above the 45-degree regression line and the correlation coefficient (R) values are high proves that the model shows high-accuracy prediction performance. Notably, the estimation results of the coif 3 and coif 5 models are distributed around the linear line. For these reasons, it can be said that the coif wavelet is effective in the streamflow estimation. In addition, the Wavelet based FFBPNN model produced slightly more realistic estimations in estimating peak streamflow values compared to single models.

Fig. 9
figure 9

Regression analysis results of W-FFBPNN models a coif 3, b coif5, c sym 3, d sym 5

Various statistical indicators of the Stand-alone FFBPNN and W-FFBPNN models presented in Table 1. Accordingly, rank analysis was performed according to the lowest MSE and highest correlation coefficient values. As a result, the most successful mother wavelet was Coif 5, while the Sym 3 wavelet showed unsuccessful results. Also, generally hybrid W-FFBPNN models showed superior prediction results than Stand-alone FFBPNN models.

Table 1 Model performance evaluation

Due to the changing climatic conditions, there has been an increase in the number and frequency of natural disasters such as floods and droughts. For this reason, it is necessary to take measures against disasters that may occur by predicting the current values in advance. In the present study, it was aimed to determine which mother wavelet is the most effective in flow estimation. The Coif 5 wavelet was found to be the most effective. It is also noteworthy that the estimation accuracy of the Db4 wavelet is very high. To increase the prediction performance of ANNs, it was determined that the hybrid models established by separating the input and output data into sub signals with the wavelet decomposition technique are superior to the single ANN model (Kişi 2008b; Labat 2005; Nourani et al. 2009a; Shoaib et al. 2014; Umut 2012; Wang et al. 2022; Wei et al. 2013). Many researchers have stated that db4 shows optimum prediction results for the pre-processing of hydrological data (Kişi 2008b; Nourani et al. 2009a, 2013, 2011). The available literature results broadly support the present study. Partal (2009) employed a WT and ANNs to predict the streamflows of the Sakarya and Fırat basins. The most successful estimation results (R: 0.95 MSE: 0.45) were obtained with the wavelet-based FFBPNN method at the Kiyik station (station no. 2131) on the River Beyderesi in the Fırat basin. The results of our study are largely in line with those reported by Partal (2009) study. The study of Khazaee Poul et al. (2019), the performances of various machine learning models were evaluated to predict river flows in the St. Clair River between the US and Canada. According to the results, it was revealed that the performance of the streamflow estimation increased by adding the past flow, temperature and precipitation values to the model. The outputs of the study largely overlap with the study of Khazaee Poul et al. (2019). Wang et al. (2022) used DWT and machine learning models to predict monthly stream flows at two hydrological stations in the USA. The main wavelet used to create the db4 hybrid Wavelet ML is the increased stand-alone ML model. The outputs of Wang et al. (2022) support the present study. Freire et al. (2019) estimated daily stream flows by combining various mother wavelets and ANN approach. As a result of the study, the best performance was obtained with the Discrete Meyer wavelet in prediction of daily stream flows. The results of the current study contradict with Freire et al. (2019). This can be explained by the difference in the time period used.

Conclusion

In the present study, the effect of a wavelet-based data pre-processing method on the prediction success of the FFBPNN method and which mother wavelet shows the best performance in river flow estimation were investigated. To examine the performance of the WT on the machine learning model, various meteorological and hydrological variables were divided into sub signals with the DWT and streamflow values were estimated with the FFBPNN. The results of the study will be useful for decision makers and planners in water-related institutions in terms of management of water resources, flood control, and drought risk analysis. Model success was evaluated according to MSE, t, and rank analysis. The main results of the study are listed as follows:

  • Hybrid W-FFBPNN models often increase the accuracy of the stand-alone FFBPNN model.

  • The performances of the mother wavelets in monthly streamflow estimation were as follows: Coif 5 > Db4 > Coif 3 > Db2 > Sym 5 > dmey > Haar > Sym 3.

  • Streamflows can be estimated realistically (MSE: 7.143, R: 0.921) using past precipitation, temperature, and streamflow values as inputs.

  • Successful predictions can be made when the Coif 5 mother wavelet and three levels of decomposition are used.

  • The established hybrid models showed slightly more accurate estimations of peak streamflow values than the single FFBPNN algorithm.

For future studies, it would be appropriate to compare the WTs of different signal decomposition processes, such as variational mode decomposition and empirical mode decomposition, and to investigate which pre-processing method is more effective for estimations in river flow estimation in different time periods. In addition, using these three signals processing techniques and evaluating the flock estimation performance will be an important contribution to the literature.