Abstract

Streamflow forecasting has an important role in water resource management and reservoir operation. Support vector machine (SVM) is an appropriate and suitable method for streamflow prediction due to its best versatility, robustness, and effectiveness. In this study, a wavelet transform particle swarm optimization support vector machine (WT-PSO-SVM) model is proposed and applied for streamflow time series prediction. Firstly, the streamflow time series were decomposed into various details () and an approximation () at three resolution levels (21-22-23) using Daubechies (db3) discrete wavelet. Correlation coefficients between each subtime series and original monthly streamflow time series are calculated. components with high correlation coefficients () are added to the approximation () as the input values of the SVM model. Secondly, the PSO is employed to select the optimal parameters, , , and , of the SVM model. Finally, the WT-PSO-SVM models are trained and tested by the monthly streamflow time series of Tangnaihai Station located in Yellow River upper stream from January 1956 to December 2008. The test results indicate that the WT-PSO-SVM approach provide a superior alternative to the single SVM model for forecasting monthly streamflow in situations without formulating models for internal structure of the watershed.

1. Introduction

The accuracy of streamflow forecasting is a key factor for reservoir operation and water resource management. However, streamflow is one of the most complex and difficult elements of the hydrological cycle due to the complexity of the atmospheric process. The elements affecting streamflow forecasting precision include catchment, geomorphologic and climate characteristics, and so forth [1]. The process of streamflow is extremely complex due to the influence of these variables and their combinations. Therefore, there are many forecasting techniques that have been proposed for streamflow forecasting [24].

Among them, the most popular and widely known statistical method used in time series forecasting is autoregressive integrated moving average (ARIMA) model due to its superiority of forecasting capabilities and richness of information on time-related changes [5]. Several studies have shown that ARIMA can be trusted as a reliable model in water resources time series analysis [6]. For example, Lee and Tong [7] proposed a hybrid model for nonlinear time series forecasting by combining ARIMA and genetic programming and demonstrated the effectiveness of the proposed forecasting model. But the ARIMA models are a class of linear model and thus only suitable for capturing linear features of data time series [8]. In recent years, gray model, artificial neural network (ANN), and support vector machine (SVM) have been frequently used to predict the nonlinear time series and achieved good results [911]. For instance, Kişi [12] used three different ANN techniques, namely, feed forward neural networks, generalized regression neural networks and, radial basis ANN in one-month-ahead streamflow forecasting. However, there are some disadvantages of ANN due to its network structure, which is hard to determine and usually established using a trial-and-error approach [13].

Support vector machines (SVM) were suggested by Vapnik [14] as one of the soft computational techniques and are widely used for classification and regression based on statistical learning theory (SLT). The basic idea of SVM for regression is to introduce a kernel function, map the input data into a high-dimensional feature space by a nonlinear mapping, and then perform linear regression in the feature space [5]. Currently, SVM were frequently applied in a number of different fields, such as fault diagnosis [16], pattern recognition [17], and classification [18]. In the hydrology context, SVM has been successfully applied to forecast the flood stage [1921], to predict future water levels in Lake Erie [22], and to forecast discharges [23, 24]. Previous studies have indicated that SVM is an effective method for streamflow forecasting [5, 2325].

More recently, the conjunction model of wavelet and SVM has drawn increasing interest and has displayed advantages over a single SVM model in terms of prediction accuracy. Wavelet analysis (WA) is an advanced method proposed by Morlet et al. [26] in signal processing and has attracted much attention due to its ability to reveal simultaneously both spectral and temporal information within one signal [27]. The application of WA in the areas of hydrology and water resource research mainly includes these aspects: identification of hydrologic series deterministic components such as trend, periods, and change points [2831]; wavelet denoising in hydrologic series [30, 31]; and hydrologic series simulation and prediction based on wavelet [27, 32, 33]. Wavelet analysis can be used to decompose an observed time series (such as streamflow time series) into various components so that the new time series can be used as inputs for SVM models [34].

SVM implements the principle of structure risk minimization in place of experiential risk minimization, which makes it have excellent generalization ability in the situation of small sample. However, the practicability of SVM is affected by the difficulty of selecting appropriate SVM parameters [35]. At present, the most common parameters selection method for SVM is the cross validation method but it is time-consuming [36]. Recently, some intelligent algorithms have been applied for parameters selecting. Compared with cross validation, genetic algorithm (GA) is less time-consuming and can obtain the optimal solution well, but the operation of genetic algorithm is difficult with the steps of choosing, crossover, and mutation for different optimal problems [37]. As a new global optimizing algorithm, particle swarm optimization (PSO), proposed by Kennedy and Eberhart in 1995, is based on swarm intelligent by generating a random decision variable set called “particles” [35]. PSO is a versatile algorithm and can be used to solve different optimizing problems. In recent years, because of the best global searching ability and the simple implementing procedure, PSO has been successfully applied for function optimization [38], data mining [39], and other engineering optimization problems [15, 40] and achieved good results. Therefore, the PSO can be applied to optimize the parameters of SVM model for streamflow forecasting in this paper.

This paper is organized as follows. Section 2 introduces the principle theory of wavelet analysis, parameter selection method of SVM models based on PSO, and SVM regression forecasting model. The study area and streamflow time series analysis are introduced in Section 3. The forecasting results of the conjunction model with the real streamflow time series data sets from Tangnaihai hydrology station in China are analyzed in Section 4. Finally, the conclusion is presented in Section 5.

2. Methodology

2.1. Support Vector Machine (SVM)

The basic idea of SVM for regression is to introduce a kernel function, map the input data into a high-dimensional feature space by a nonlinear mapping, and then perform linear regression in the feature space [5]. Supposing that there is a training dataset , is the input vector, is the excepted output, is the number of data, and is the total number of data patterns. By nonlinear mapping function , is mapped into a feature space in which a linear estimate function is defined as where represents the high-dimensional feature spaces, which is nonlinearly mapped from the input space ; and are coefficients that have to be estimated from the input data. By introducing the slack variables and and following the regularization theory, parameters and are estimated by minimizing the cost function subject to the constraints:

The first term is weight vector norm; is referred to as the regularized constraint determining the tradeoff between the empirical error and the regularized term; and is the insensitive loss function.

By using Lagrange multiplier techniques, the minimization of (2) leads to the following dual-optimization problem: where are coefficients determined by training and is the kernel function which can be expressed as inner product:

The decision function takes the form

The selection of an appropriate kernel function plays an important role in SVM regression since the kernel function defines the feature space. Gaussian radial basis function kernel has received significant attention from the machine learning community. Gaussian radial basis function (RBF) kernel is defined as

Here is the kernel parameter.

2.2. Wavelet Analysis

In wavelet analysis, the signals are analyzed in both the time and the frequency domain by decomposing the original signals in different frequency bands using wavelet functions. The wavelet transform (WT) uses the scalable windowing technique for analyzing local variation in the time series [41]. WT provides useful decompositions of original time series, so that wavelet-transformed data improve the ability of a forecasting model by capturing useful information on various resolution levels [42]. The time series data are preprocessed using wavelet transformation techniques to obtain decomposed wavelet coefficients that are used as inputs in the forecasting models.

The basic objective of WT is to achieve a complete timescale representation of localized and transient phenomena occurring at different timescales [4, 43]. The continuous wavelet transform is defined as the sum over all time of the signal multiplied by scale and shifted versions of wavelet function : where is a scale parameter; is a position parameter; and corresponds to the complex conjugate. The coefficient plots of the continuous wavelet transform are precisely the timescale view of the signal. However, calculating wavelet coefficients at every possible scale is time-consuming and generates large amount of information. Thus, the use of the continuous wavelet transform for forecasting is not practically possible.

In hydrology, observed hydrologic series are often expressed as discrete series, so the discrete wavelet transform is usually employed to decompose a hydrologic series into a set of coefficients and subsignals under different scales, and then guide other time series analyses [44]. The DWT is defined as the following form: where is the dilation or level index, is the translation or scaling index, and is a scaling function of coarse scale coefficients. , , is the scaling function of detailed (fine scale) coefficients and all functions of are orthonormal.

The original time series are decomposed into various details () and an approximation () at different resolution levels using DWT. The approximations are the high-scale, low frequency components of the signal and the details are the low-scale, high frequency components. Normally, the low frequency component of the signal is the most important part which demonstrates the signal identity [45]. The choice of wavelet type is an important issue. The Daubechies wavelets are one of the widely used in wavelet family, which are written db, where db is the “surname” and is the order of the wavelet [46]. Daubechies wavelets exhibit good tradeoff between parsimony and information richness [34], so in this study the Daubechies wavelets were employed as the mother wavelet to decompose the time series.

2.3. Parameters Selection of SVM Based on PSO
2.3.1. The Principle of PSO

PSO, deriving from the research for the movement of organisms in a bird flocking or fish schooling, performs searches using a population (called swarm) of individuals (called particles) that are updated from iteration to iteration [47, 48]. An equation (velocity update) controls the swarm in moving around the search space seeking the optimum state. In each iteration, the algorithm saves the local optimum and compares it with the global (best yet) optimum values. Definitely the criteria for being chosen as an optimum state depend on the fitness of the objective function. Candidate solutions (decision variables) of any particle calculate and remember its own fitness. The position of any particle accelerated towards the global best position by using (10) and (11) [49]. In any search step , the th particle is used to update its candidate solution’s current position by using local best and best position achieved yet. Consider the following: where is velocity measures for particles; is inertial weight controlling velocity direction; and are acceleration coefficients; and are random numbers uniformly distributed between . is the position of any particle.

2.3.2. Parameters Selection of SVM Based on PSO

In the SVM regression model, three parameters, namely, , , and , should be identified before forecasting. Therefore, PSO algorithm is used for optimizing the SVM parameters. The process of optimizing the SVM parameters with PSO is presented in Figure 1 and the steps are described as follows [47].

Step  1. Initialization: consider randomly initial particles and velocities of a population (every particle contains three variables, namely, , , and ).

Step  2. Fitness evaluation: the fitness function of PSO is shown as follows: where is the mean absolute percentage error; is the actual value and is the predicted value; and is the number of subsets. The solution with a smaller has a smaller fitness value.

Step  3. Update global and personal best according to fitness evaluation results.

Step  4. Calculation of velocity: particle flies toward a new position by calculating the velocity of position change. Velocity of each particle is calculated by (10).

Step  5. Update position value: each particle moves to its next position according to (11).

Step  6. Termination: repeat the same procedures from Step  2 to Step  5 until stopping conditions are satisfied.

2.4. Model Evaluation

It is essential to evaluate the performance of the models by employing appropriate methods. In this study, the performance of the models is evaluated by the indexes of the correlation coefficients , root mean squared error (RMSE), mean absolute error (MAE), and mean absolute relative error (MARE). These indexes are respectively defined as follows.

Correlation coefficients :

Root mean squared error (RMSE):

Mean absolute error (MAE):

Mean absolute relative error (MARE): where stands for the observed data and stands for the forecasting data. is number of the data.

3. Study Area and Data Analysis

In this study, we examined the data obtained from the monthly streamflow of the Tangnaihai Hydrological station located at the upper catchment of the Yellow River in Qinghai Province of China. Tangnaihai Hydrological station is the upstream hydrological station of Longyang Gorge Reservoir which is the largest regulating reservoir in the upper catchment of the Yellow River, so there are few human impacts disordering streamflow regular. Location of Tangnaihai Hydrological station is shown in Figure 2. The Yellow River catchment covers an area of 95,000 km2.

The monthly streamflow time series of Tangnaihai Hydrological station, consisting of 636 monthly records (January 1956 to December 2008), are used in this study. The dataset was split up into two parts: training and testing, where the first dataset consisting of 536 monthly records (January 1956 to August 2000) was used for training, while the final dataset contains 100 monthly records (September 2000 to December 2008). Training data were used exclusively for model development and testing data were used to measure the performance of the model on untrained data. The testing set was also used to evaluate the forecasting ability of the model and to compare the proposed model with others.

4. Results Analysis

4.1. Wavelet Decomposition of Streamflow Time Series

The WT-PSO-SVM model structure is shown in Figure 3. For the SVM model inputs, the original time series are decomposed into subseries with an approximation () with low frequency and details with high frequency by Daubechies DWT algorithm.

The optimal decomposition level of the streamflow time series in wavelet analysis plays an important role in preserving the information and reducing the distortion of the datasets [4]. The number of decomposition levels controls the streamflow approximation in the data. The general rule for the appropriate decomposition levels is that the largest levels should be shorter than the size of the testing data [50].

In this case, the largest scales were chosen as three for the Tangnaihai station streamflow time series. Therefore, the flow data sets are decomposed into various details () and an approximation at three resolution levels (21-22-23) using db3 DWT shown in Figure 4. The new decomposed subseries present variations of the original time series on different periods. MATLAB codes were developed using its library functions to perform wavelet decomposition of the time series data. The correlation coefficients between each subtime series and original monthly streamflow time series are given in Table 1 for the Tangnaihai station. In the table, the and denote the subtime series at time and measured streamflow at time , respectively. These correlation values provide information for the determination of effective wavelet components on streamflow. It can be seen from Table 1 that the has the highest correlation among . The average correlation between and is 0.363. According to the correlation analysis between and the original current streamflow data, the effective component () is selected. Then, the new series obtained by adding the effective and approximation component are used as an input combination to the SVM model.

4.2. Parameters Selection of SVM Based on PSO

In this study, RBF is employed as kernel function of SVM forecasting model, so three parameters, namely, balance parameter , insensitive parameter , and kernel function, parameter should be selected. Some researchers have shown that different kernel functions have little impact on performance, but kernel function parameter is a key factor affecting performance of SVM. Among three parameters, precisely defines structure of highly dimensional space, so it controls complexity of ultimate solution; determines complexity of model and punishment level of fitting deviation; indicates forecasting model’s expectation on estimating functions’ error of sample data, and the larger , the less support vector number and more sparse solution expression. But large can also reduce accuracy of SVM forecasting model.

For monthly streamflow time series , the flow data at time is predicted based on the previous flow data. The general expression is shown as follows: where is a nonlinear function indicating relationship of monthly streamflow time series; is streamflow data at time ,  ; and   is the forecasting step (month), which is set as 3 in this paper. monthly streamflow time series data sets are used for training and testing SVM forecasting model. The particle swarm optimization is employed to optimize the best parameters set of SVM model [51].

For the Tangnaihai station, three input combinations based on preceding monthly streamflows are evaluated to estimate current streamflow value. The input combinations evaluated in the study are as follows: (i) , , and ; (ii) , , and ; (iii) , , and . In all cases, the output is the discharge for the current month.

In the training stage, firstly the parameters , , and of SVM model are optimized by PSO, the validation error is measured by (12), and the adjusted parameters with minimum validation error are selected as the most appropriate parameters which are provided in Table 2. Then, the optimal parameters are utilized to train SVM and WSVM models.

Before the training process begins, data normalization is often performed. Runoff time series data was normalized in the range by the following equation: where represents the normalized data, while is the actual observation value and , , respectively, represent the maximum and minimum value among the actual observation values.

4.3. Streamflow Forecasting Based on WT-PSO-SVM

As shown in Table 2, the optimal parameters for SVM (input model (i)) and WSVM (input models (ii) and (iii)) models are , , and ; , , and ; and , , and . The optimal parameters are used to examine the accuracy of the SVM and WSVM forecasting models with the testing data sets. Table 3 shows the performance results obtained in the training and testing periods of the SVM and WSVM models for Tangnaihai station.

Results obtained from the three models for 3-month-advance flow forecasting at Tangnaihai station are presented in Table 3. Performance of the three models was compared by evaluating indexes of , RMSE, MAE, and MARE. It is observed that the forecasting accuracy of the WSVM2 model was much better than that of corresponding SVM and WSVM1 models. Comparing the forecasting results of SVM and WSVM1, the , RMSE, MAE, and MARE in the testing period were 0.768–0.613, 317.035–331.420 (m3/s), 247.480–256.368 (m3/s), and 17.81–23.49 (%), respectively. It is observed that SVM is more superior than WSVM1 because some useful details () of original streamflow series were eliminated in the model WSVM1. Comparing the forecasting results of SVM and WSVM2, the values of , RMSE, MAE, and MARE in the testing period were 0.768–0.806, 317.035–243.268, 247.480–173.20, and 17.81–11.52, respectively. It is obvious from Table 3 and Figure 5 that the WSVM2 performs better than the SVM model. These results indicated that was an effective component for the runoff series and the and were the noise that should be eliminated before streamflow forecasting. Wavelet transform is a necessary process of data preprocessing for improving predicting accuracy.

5. Conclusion

This study developed a WT-PSO-SVM hybrid model to forecast monthly streamflow. The WT-PSO-SVM model was obtained by combining three methods, discrete wavelet transform-particle swarm optimization, and support vector machine regression. The combined model integrated the advantages of best versatility, robustness and effectiveness of SVM, the best global searching ability and the simple implementing procedure of PSO for parameter selection, and the ability of WT to reveal simultaneously both spectral and temporal information within one signal. This hybrid approach was successfully applied to simulate streamflow time series of Tangnaihai Hydrology station in the Yellow River.

The streamflow time series were decomposed into various details () and an approximation at three resolution levels (21-22-23) by using db3 DWT of the wavelet function of Daubechies 3 (db3). The correlation coefficients between each subtime series and original monthly streamflow time series were calculated. components with high correlation coefficients were added to the approximation as the input values of SVM model. The input combinations evaluated in the study are as follows: (i) , , and ; (ii) , , and ; (iii) , , and . The PSO was employed to select the optimal parameters, , , and , of the three input models which were used to test the accuracy of the SVM model. Three different input combinations of SVM predicting results indicated that the discrete wavelet transform can significantly increase the accuracy of the SVM model in forecasting monthly streamflow. In addition, particle swarm optimization can determine suitable parameters to forecast streamflow as well. Predicting accuracy was evaluated by indexes of , RMSE, MAE, and MARE. At the Tangnahai station, the best predictions belong to WSVM2 model. WSVM2 model increased the prediction by 0.038 and 0.193 with respect to the SVM and WSVM1 models and reduced MARE by 6.29% and 11.97%, respectively, in the testing period. These results indicated that was an effective component for the runoff series and the and were the noise that should be eliminated before streamflow forecasting. Wavelet transform is a necessary process of data preprocessing for improving predicting accuracy. The test results indicated that PSO-WT-SVM approach provides a superior alternative to the single SVM model for forecasting monthly streamflow in situations, without formulating models for the internal structure of the watershed.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work was supported by the National Key Basic Research Program of China (973 Program) (2012CB417006), the National Science Fund for Distinguished Young Scholars (Grant no. 50925932), National Natural Science Foundation of China (Grant no. 50979050), and the College Graduate Research and Innovation Projects of Jiangsu Province of China (Grant no. 2013B20414). The authors wish to thank the Yellow River Conservancy Commission for providing the requisite meteorological data.