Runoff Forecasting Using Machine-Learning Methods: Case Study in the Middle Reaches of Xijiang River

Runoff forecasting is useful for flood early warning and water resource management. In this study, backpropagation (BP) neural network, generalized regression neural network (GRNN), extreme learning machine (ELM), and wavelet neural network (WNN) models were employed, and a high-accuracy runoff forecasting model was developed at Wuzhou station in the middle reaches of Xijiang River. The GRNN model was selected as the optimal runoff forecasting model and was also used to predict the streamflow and water level by considering the flood propagation time. Results show that (1) the GRNN presents the best performance in the 7-day lead time of streamflow; (2) the WNN model shows the highest accuracy in the 7-day lead time of water level; (3) the GRNN model performs well in runoff forecasting by considering flood propagation time, increasing the Qualification Rate (QR) of mean streamflow and water level forecast to 98.36 and 82.74%, respectively, and illustrates scientifically of the peak underestimation in streamflow and water level. This research proposes a high-accuracy runoff forecasting model using machine learning, which would improve the early warning capabilities of floods and droughts, the results also lay an important foundation for the mid-long-term runoff forecasting.


INTRODUCTION
Runoff forecasting is the foundation of water resource management, deployment, and efficient utilization. It is of great significance to reservoir operation, water resource emergency scheduling, hydro-power generation, and irrigation management decisions (Niu et al., 2018). The river runoff is sensitive to various factors, such as catchment response times and the accuracy of meteorological forecasts with time variability and uncertainty (Lima et al., 2016). Furthermore, it is more difficult to forecast accurately when extreme climatic events occur. The establishment of hydrological models provides important support for runoff forecasting. The runoff process is simulated and forecasted from the perspective of the physical mechanism. However, hydrological model driving relies on the input of a large amount of meteorological data and watershed characteristics parameters. The forecasting process is relatively complicated, and its accuracy is limited to the accuracy and completeness of the data (Nourani, 2017).
With the evolution of big data, runoff forecasting methods become more and more diversified. The research craze for artificial intelligence based on big data has risen. Compared with the traditional hydrological models, the machine-learning models show the advantages of high accuracy, high efficiency, and convenient application so that it has been widely used in runoff forecasting and achieved better forecasting results. The major machine-learning models are applied to runoff forecasting, including artificial neural networks (ANNs), support vector machine (SVM), support vector regression (SVR), and neuro-fuzzy (Mosavi et al., 2018). Badrzadeh et al. (2015) applied four different types of ANNs to forecast real-time floods at Casino station on Richmond River, Australia. Tongal and Booij (2018) developed a simulation framework by coupling a baseflow separation method to three machinelearning methods and discussed performances of models in simulation and forecasting of streamflow regarding model types, input structures, and catchment dynamics in detail. Shortridge et al. (2016) utilized multiple regression and machine-learning approaches to simulate monthly streamflow in five highly seasonal rivers in the highlands of Ethiopia and compare their performance in terms of predictive accuracy, error structure and bias, model interpretability, and uncertainty when faced with extreme climate conditions. Guo et al. (2011) proposed an improved SVM model with adaptive insensitive factors to predict monthly streamflow. Yaseen et al. (2016) explored the potential of the extreme learning machine (ELM) method for forecasting monthly streamflow discharge rates in the Tigris River, Iraq and ELM showed better forecasting performance compared with SVR and the generalized regression neural network (GRNN) models.
The Xijiang River is the longest mainstream of the Pearl River. To investigate the runoff mechanism in the context of climate change, lots of studies have been conducted on projecting hydrological processes and responses in the Xijiang River basin. Wu et al. (2015) investigated the changes in hydrological drought frequency over the Xijiang River basin through an analysis of daily streamflow data observed at major hydrological stations along the river. Yuan et al. (2017) established a modeling chain framework to project the future hydrological changes in the Xijiang River basin and found that extreme low flow would undergo a considerable reduction in the future, indicating that drought risk in the Xijiang River basin was expected to increase significantly. Zhu et al. (2019) analyzed the correlation between the monthly streamflow and the monthly rainfall in Xijiang River through several correlation test methods and clarified that the changes of the monthly discharge are still controlled by natural precipitation variations in Xijiang's fluvial system. With the frequent occurrence of extreme hydrological events caused by climate change and the increasing impact of human activities on natural river runoff, the hydrological process in the Xijiang River basin becomes more random and complicated. Therefore, it is of great significance to carry out high precision runoff forecasting for grasping the future flood and drought conditions of the whole Pearl River basin and ensuring the coordination of water resources.
In this study, a combination of hydrological data and meteorological factors was used as input parameters, and the four different machine-learning models, including backpropagation (BP) neural network, GRNN, ELM, and wavelet neural network (WNN) models, were applied for the forecast of mean streamflow and water level in the 7-day lead time. Moreover, to improve forecast accuracy, the flood propagation mechanism was considered. The objectives of this study are as follows: (1) to propose a more reliable runoff forecasting model; (2) to improve the accuracy and efficiency of runoff forecasting; and (3) to explore the relationship between flood propagation mechanism and runoff in the basin. These findings are expected to provide a more accurate guidance for the early warning of floods and droughts.

Study Area
The Xijiang River is the largest river in Guangxi, China. The total area of the river basin in Guangxi is 20.21 × 10 4 km 2 , accounting for 85.39% of the total land area of Guangxi. The river basin area above Wuzhou station is 32.70 × 10 4 km 2 , accounting for 92.88% of the total area of the whole Xijiang River basin. The runoff in the basin is unevenly distributed throughout the year. The annual wet season is from April to September, the streamflow accounts for about 78% of the whole year; the dry season is from October to March of the next year, the streamflow accounts for about 22% of the whole year correspondingly. The mean streamflow of the driest month usually occurs from December to February of the following year, mostly in January.
The study area was chosen in this research is the Wuxuan-Wuzhou reaches of the Xijiang River in Guangxi with a total length of about 247 km that includes Qianjiang, Xunjiang, and Xijiang River sections. The hydrographic stations from upstream to downstream are Wuxuan station, Dahuangjiangkou station, and Wuzhou station, respectively (Figure 1).

Data Collection
In this study, daily time series mean streamflow and water level data from 2009 to 2019 measured at Wuxuan station, Dahuangjiangkou station, and Wuzhou station were utilized. The Wuzhou meteorological data were collected from China Meteorological Data Service Center (http://data.cma.cn) that includes daily precipitation (P), average air pressure (PRS), average temperature, mean water vapor pressure (WVP), mean relative humidity (RH), and maximum wind speed (U max ). After preprocessing operations, such as interpolation, filling, and deletion, the data during 2009-2017 were selected for training and the remainder during 2018-2019 for testing.

METHODOLOGY
The ANN is a technology based on intelligence imitating signal processing in the human brain. It is used as a black-box model with the ability to learn and find out non-linear relationships between the system inputs and outputs. ANNs can efficiently deal with correlation problems when physical processes are not understood or are very complex (Pliego Marugan et al., 2018). The generalization capability of ANN allows it to process unseen data more quickly and simply after learning using a few measured data sets. BP neural network, GRNN, ELM, and WNN models belong to four different types of ANNs (Elsheikh et al., 2019; Lee et al., 2019). These models have been fully used in runoff forecasting, which proves their applicability in accurate prediction (Modaresi et al., 2018;Mosavi et al., 2018;Yaseen et al., 2018;Zhang et al., 2018;Pradhan et al., 2020).

Backpropagation Neural Network
Backpropagation neural network is a kind of multi-layer forward neural network based on BP. As a typical machine-learning algorithm of ANN, BP neural network architecture includes an input layer, hidden layers, and output layer. Each layer i+s is composed of several neurons (nodes), the output value of each node is determined by the input value, function, and threshold value. The learning process of the BP neural network includes two processes (Bisoyi et al., 2019): information forward propagation and error back propagation. In the forward propagation process, the input information is transmitted from the input layer to the output layer through the hidden layers, and the output value is compared with the expected value after the transfer function operation. If there is an error, the error propagates back and returns along the original connection path. Reduce the error by modifying the weight of each layer of neurons layer by layer, and loop until the output result meets the accuracy requirements (Hameed et al., 2017).
The node number of the hidden layer can be determined by Zhang et al. (2018): Where l is the node number of implicit layer; m is the node number of output layer; n is the node number of input layer; a is a constant with any value of 1-10. The optimal value of l is determined by trial calculation. The training parameters were assigned as follows: the learning rate is 0.01, the allowable biggest step of the training is 5,000, and the minimum error was set to 10 −5 .

Generalized Regression Neural Network
Generalized regression neural network is a kind of radial basis neural network, which has strong non-linear mapping ability, flexible network structure, high fault tolerance, and robustness. It is suitable for solving non-linear problems. GRNN has better performance than traditional radial basis function (RBF) networks in terms of approximation ability and learning speed. The network converges to the optimized regression surface with more samples accumulated, and also has better simulation results when processing fewer samples (Li et al., 2013). Generalized regression neural network model structure consists of the input layer, pattern layer, summation layer, and output layer. The procedure of the GRNN can be represented as (Cigizoglu and Alp, 2006): If f (x, y) represents the known joint continuous probability density function of a vector random variable x and a scalar random variable y, the conditional mean of y given X (also called the regression of y on X) is given bŷ Parzen non-parametric estimation was used to estimate the density functionf X, y : Substitutingf X, y for Equation (2): Y (X) is the weighted average of the observed value Y i of all samples, and the weight factor of each observation is Euclidean distance squared exponent between the corresponding sample X i and X. When the smoothing parameter σ is made large,Ŷ (X) is approximately the mean of all the sample dependent variables. On the contrary, the smaller value of σ is, the closerŶ (X) is to the training sample. When the point to be predicted is included in the training sample set, the predicted value of the dependent variable will be very close to the corresponding dependent variable in the sample. However, once it encounters a point that is not included in the training sample, the prediction effect may be very poor.

Extreme Learning Machine
Extreme learning machine is an innovative machine-learning algorithm proposed for the deficiency of single-hidden layer feedforward neural network (SLFN). The algorithm randomly generates the continuous weights between the input layer and the hidden layer and the threshold of the hidden layer neurons, and there is no need to adjust during the training process. The unique optimal solution can be obtained only by setting the number of neurons in the hidden layer. Compared with the traditional training method, it has the advantages of fast learning speed and excellent generalization performance (Yaseen et al., 2019;Parisouj et al., 2020;Niu and Fen, 2021).
Mathematically, the ELM model can best be summarized by assuming that there are N arbitrarily different training data set samples {(x 1 , y 1 y 1 ), . . . , (x t , y t )}, t = 1, 2, . . . , N. In this assumption, x t is the explanatory variable and y t is the response variable. x i ǫ R d and y i ǫ R. The output of SLFN can be expressed as (Huang et al., 2006): where the L is hidden nodes number, g i (a i · x i + b i ) is a hidden layer output function, "Sigmoid" was chosen in this article, a i is the weight factor connecting input node and the ith hidden node, b i is the bias of the ith hidden node, B i is the weight factor connecting the ith hidden node and output node, and z t is the output of tth input. If the feedforward neural network with L hidden nodes can approximate the N samples with zero error, there exist a i , b i , and B i such that: Equation (5) can be simplified as: H is called the hidden layer output matrix of the neural network, the ith column of H is the ith hidden node output with respect to inputs x 1 , x 2 , . . . , x N . In the ELM model, the output weights and deviations can be given randomly, and the hidden layer output matrix H becomes a certain matrix so that the training of the feedforward neural network can be transformed into a problem of solving the least square solution of the output weight matrix. The minimum norm square solution of Equation. (7) is:B The H + is the Moore-Penrose inverse of hidden layer output matrix H.

Wavelet Neural Network
Wavelet neural network is a multi-layer feedforward network proposed on the basis of wavelet analysis, which integrates the merits of ANN and wavelet analysis (Zhang and Benveniste, 1992). It can not only avoid local optimal fundamentally but also accelerate the learning speed and reduce the training times. In this study, the Morlet wavelet function is used as the mother wavelet, the BP neural network topology is taken as the basis, and the transfer function of the neural network hidden nodes is replaced by the wavelet function. The corresponding weights from the input layer to the hidden layer and the threshold value of the hidden layer are replaced by the scaling factor and translation factor of the wavelet function, respectively (Abghari et al., 2012;Wei et al., 2013).
Assuming that there is a set of input samples x i (i =1, 2, . . . , k), the output of the hidden layer can be constructed using the equation: Where h(j) is the output of the jth hidden layer node, ω ij is the weight from the input layer to the hidden layer, h j is the wavelet function, a j is the scaling factor of the wavelet function, and b j is the translation factor of the wavelet function. The calculation formula of the output layer of WNN is: Parameter Where ω ik is the weight from hidden layer to the output layer, h(i) is the output of the ith hidden layer node, l is the number of hidden layer nodes, and m is the number of output layer nodes. The gradient learning algorithm is applied to modify the weights, scaling factor, and translation factor. The optimized factors are trained by WNN to obtain the optimal output.

Verification Model
To evaluate the performance of the four modeling approaches, the following statistical criteria were used: (1) Mean absolute error (MAE): (2) Deterministic coefficient (DC): (3) Correlation coefficient (R 2 ): (4) Mean relative error (MRE): (5) Root mean square error (RMSE): (5) Qualification rate (QR): Where O i is the ith observation, P i is the forecasted value of the ith model, N is the number of samples, O is the average of observed values O i , P is the average of model forecasted values P i , n is the number of qualified forecasts, and m is the total number of forecasts. The closer the value of MAE is to 0, the better is the prediction result. When DC is between 0 and 1, the closer DC is to 1, which implies higher consistency between the forecasted value and the observed value and ultimately reflects in a better model prediction. When DC is less than 0, it implies that the forecasted result is undesirable. The closer R 2 is to 1, the higher the degree of correlation between the forecasted values and the observed values. The closer MRE is to 0, the better the prediction. The closer RMSE is to 0, the smaller the prediction deviation is, and the model is more reliable. The higher the QR, the better prediction of the model.

Correlation Analysis of Input Parameters
The factors that include mean streamflow before 7 days (Q t−7 ), 10 days (Q t−10 ), and 15 days (Q t−15 ), mean water level before 7 days (H t−7 ), 10 days (H t −10 ), and 15 days (H t −15 ), P, PRS, T, WVP, RH, and U max of Wuzhou station were used as input parameters of the model to predict the mean streamflow and mean water level. Pearson correlation coefficient between input parameters and mean streamflow and mean water level of Wuzhou station were calculated respectively, and the results are displayed in Table 1. The results show that the mean streamflow, water level, and meteorological factors of Wuzhou station before 7, 10, and 15 days are significantly correlated with the mean streamflow and water level of the day. The runoff forecasting can be reasonably carried out by input of these 8 factors into the machinelearning models.

Determination of the Lead Time
To select a mid-long-term runoff forecasting lead time with satisfactory forecast accuracy, the effects of machine-learning models (i.e., BP, GRNN, ELM, and WNN models) on daily mean streamflow and water level in 7-, 10-, and 15-day lead time were compared. Performance indices in Tables 2, 3 show that the forecast results of mean streamflow and water level in the 7-day lead time are better than those in the 10-and 15-day lead time.

Streamflow Forecast Results of Wuzhou Station by Machine-Learning Model
By comparing all studies of the daily mean streamflow of Wuzhou station forecasting methods (i.e., BP, GRNN, ELM, and WNN models), the forecasting accuracy indices in the 7-day lead time are presented in Table 2. It shows that the four models have a certain forecasting ability for the mean streamflow of Wuzhou station, with MAE ranging between 1,772 and 1,941 m 3 ·s −1 , DC ranging between 0.20 and 0.50, R 2 ranging between 0.50 and 0.53, MRE ranging between 0.26 and 0.32, RMSE ranging between 3,036 and 3,165 m 3 ·s −1 and QR ranging between 56 and 72%. In general, comparing the R 2 values of each model, the evaluation accuracy has reached more than 0.50 and the difference is unobvious. But GRNN has the highest DC and QR values (DC = 0.5138, QR > 70%) and smaller errors in terms of MAE, MRE, and RMSE suggesting that the forecasting performance is better.
To understand the forecast performance of each model in more detail and intuitively, the scatter plots of the linear regression between forecasted and observed streamflow (Figure 2) and hydrographs (Figure 3) are displayed. Based on the graphical presentations in Figures 2, 3, the four models perform better in the case of low flow values, but regarding the medium flow values, they are overestimated; for the high-flows values, these are underestimated. Obviously, it is difficult for these models to predict the extreme peak flow validly. The reason may be the probability of extreme flood events is low in the period of study, the models are unable to learn such events well.

Water Level Forecast Results of Wuzhou Station by Machine-Learning Model
Backpropagation, GRNN, ELM, and WNN models were used to forecast the daily mean water level of the Wuzhou station. The forecasting accuracy indices in the 7-day lead time are presented in Table 3. In general, the forecast accuracy of the four models on the mean water level is better than that on the streamflow, with MAE ranging between 1.27 and 1.36 m, DC ranging between 0.52 and 0.65, R 2 ranging between 0.61 and 0.65, MRE ranging between 0.20 and 0.22, RMSE ranging between 1.82 and 1.94 m, and QR ranging between 65 and 70%. The WNN model shows the smallest error with the highest DC, R 2 , and QR values, which are 0.6401, 0.6412, and 69.68%, respectively. Figures 4, 5 illustrate the scatter plots of the linear regression between forecasted and observed water level and hydrographs. Similar to the streamflow forecast results, the four models show better performance in the case of medium and low water levels, but significantly underestimate in the case of high water level.

Forecast Results of Considering the Flood Propagation Time
According to the analysis of Sections Determination of Lead Time, Streamflow Forecast Results of Wuzhou Station by Machine Learning Model, and Water Level Forecast Results of Wuzhou Station by Machine Learning Model, deviations still exist in the forecast of the streamflow and water level of Wuzhou station by meteorological and corresponding hydrological data in the 7-day lead time. There are problems, such as underestimation of the flood peak flow and water level in extreme flood events and lagging of the flood peak forecast. To improve the accuracy of forecasting, the streamflow and water level of Wuzhou station on the day were predicted considering the relationship between upstream and downstream flood propagation.
Wuxuan, Dahuangjiangkou, and Wuzhou stations are important hydrological control stations in the mainstream of Xijiang River. Based on the observed flood data of each station for a series of years, the distance between Wuxuan station and Dahuangjiangkou station is about 104 km, the flood propagation time is about 12 h; the distance between Dahuangjiangkou station and Wuzhou station is about 143 km, the flood propagation time is about 30 h. Therefore, the streamflow and water level data before 2 days at Wuxuan station and the data before 1 day at Dahuangjiangkou station were selected as input parameters to forecast the data of Wuzhou station.
The analysis indicates that the prediction performance of GRNN is more precise compared to other models, thus GRNN was used for further research. The forecast results are shown in Table 4. GRNN has a satisfying forecast in streamflow and water level with DC of 0.8884 and 0.9099, respectively; R 2 of 0.9228 and 0.9169, respectively; and QR of 98.36 and 82.74%, respectively. Observed and forecasted streamflows and water level values using the GRNN models are shown in Figures 6, 7. It is evident that there is a significant linear correlation between the forecasted and observed results, which improves the accuracy of high flow and high water level by only inputting hydrological data. Considering the relationship in flood propagation time between upstream and downstream, this method has high accuracy and convenient application, but the shortage is that the lead time is too short to satisfy mid-long term forecasting at present.

CONCLUSION
In this study, four different machine-learning methods were utilized to forecast the mean streamflow and water level, including BP, GRNN, ELM, and WNN. Taking Wuzhou station of Xijiang River as a case study, the performances of different models were compared. Furthermore, considering the flood propagation time, the upstream Wuxuan station and the Dahuangjiangkou station streamflow and water level data were used as input parameters to runoff forecasting. The major findings are as follows: (1) GRNN model performs the best on the streamflow forecasting of Wuzhou station in the 7-day lead time, with DC = 0.5082, R 2 = 0.5138, and QR = 71.06%.
(2) WNN model shows the best prediction effect on the water level of Wuzhou station in the 7-day lead time, with DC = 0.6401, R 2 = 0.6412, and QR = 69.68%. Overall prediction results can meet the accuracy requirements (>60.0%), but it is difficult to make an accurate prediction for extreme events. There are still several aspects that can be improved in this study. As revealed in this article, optimizing the structure of machine-learning models to improve the efficiency and accuracy of forecasting and extending the lead time for runoff forecasting utilizing the relationship between upstream and downstream flood propagation is waiting for further research.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author/s.