Short-term rainfall forecast model based on the improved BP–NN algorithm

The existing methods have been used the Zenith Total Delay (ZTD) or Precipitable Water Vapor (PWV) derived from Global Navigation Satellite System (GNSS) for rainfall forecasting. However, the occurrence of rainfall is highly related to a myriad of atmospheric parameters, and a good forecast result cannot be obtained if it only depends on a single predictor. This study focused on rainfall forecasting by using a number of atmospheric parameters (such as: temperature, relative humidity, dew temperature, pressure, and PWV) based on the improved Back Propagation Neural Network (BP–NN) algorithm. Results of correlation analysis showed that each meteorological parameter contributed to rainfall. Therefore, a short-term rainfall forecast model was proposed based on an improved BP–NN algorithm by using multiple meteorological parameters. Two GNSS stations and collocated weather stations in Singapore were used to validate the proposed rainfall forecast model by using three years of data (2010–2012). True forecast (TFR), false forecast (FFR), and missed forecast (MFR) rate were introduced as evaluation indices. The experimental result revealed that the proposed model exhibited good performance with TFR larger than 96% and FFR of approximately 40%. The proposed method improved TFR by approximately 10%, whereas FFR was comparable to existing literature. This forecasted result further verified the reliability and practicability of the proposed rainfall forecasting method by using the improved BP–NN algorithm.

Recent studies have used GNSS-derived zenith total delay (ZTD) or PWV to forecast rainfall 17 . found that the PWV value is sharply increased before the abrupt rainfall events 18 . proved that PWV is a good indicators and can help to improve the physics of a weather model. Benevides et al. 3 proposed a simple rainfall prediction model by fitting PWV time series data via the least squares method. The true forecast rate of the model was 75%, and the false forecast rates were between 60% and 70% in Lisbon, Portugal. Yao et al. 4 also built a rainfall prediction model by using the PWV data of five GNSS stations in Zhejiang Province, and the true and the false forecast rate of the rainfall forecast model were approximately 80% and 66%, respectively. Zhao et al. 6 proposed a rainfall forecast algorithm by using PWV in its ascending period and applied this method to the prediction of typhoon events. The true forecast rate was approximately 70%, but the false forecast rate was only 18%. Manandhar et al. 5 built a rainfall forecast model by using 30 min of PWV time series data to predict the rainfall in the next 5 minutes, and the true forecast rate was approximately 87.7%, whereas the false forecast rate was 38.6% in Singapore. During the retrieval of GNSS-derived PWV, errors have been introduced due to the observed error in the meteorological data and the conversion error from ZWD to PWV. To overcome these issues, Zhao et al. 19 proved the feasibility of using ZTD directly to forecast rainfall and proposed a rainfall forecast algorithm using ZTD variation and its first derivative. The true and false forecast rates of this algorithm were 85% and 66%, respectively.
Artificial neural network (ANN) has attracted considerable attention from researchers in the field of artificial intelligence. ANN abstracts the brain as a neural network and establishes a simple model connecting different networks during information processing 20,21 . Back propagation (BP)-NN is a kind of multilayer feed forward artificial neural network with mono directional transmissions 22,23 , which has the advantages of memory association, solving complex internal mechanism problems, independent learning and adaptive ability, and parallel processing of data 24 . In addition, neural networks can extract the input-output relationship without explicit physical conditions 25 and make use of error gradient descent algorithm to minimize the mean square error between the output value of network and the actual output value 26 . Therefore, neural networks are suitable for meteorological prediction research. Guan et al. 20 proved that the BP algorithm can be applied to high-precision rainfall prediction by using the precipitation data of 26 base stations in the Chaohe River basin from 1958 to 2012. Hashim et al. 27 also found that the BP neural network is suitable for the study of rainfall prediction with meteorological parameters, such as temperature, air pressure, and humidity. Srivastava et al. 28 predicted the daily rainfall in northern India by using the ANN algorithm and achieved good forecasted results. Manandhar et al. 29 successfully used the machine learning algorithm called support vector machine (SVM) to classify precipitation and nonprecipitation events. The advantage of neural network is that they are best suited to solving the problems that are the most difficult to solve by traditional computational methods 30 , Neural networks can learn from examples (past data) recognize a hidden pattern in historical observations and use them to forecast future values 31 . In addition 32 , proposed a multilayer feedforward neural network (the NN) model for weighted mean temperature of atmospheric water vapor predicting, and the result shows the good performance of NN model on global scale 33 . proposed a new ZTD model based on a back propagation neural network, and the ZTD prediction accuracy has been improved by more than 12.4%.
At present, some algorithms have been used to forecast rainfall by using the GNSS-derived ZTD or PWV to obtain good forecasting results. However, the incidence of false alarm in these studies is high (60%-70%), and the true forecasted rate is unstable in different experiments (70-90%) because the occurrence of rainfall is highly correlated with considerable atmospheric parameters. Moreover, this type of prediction process cannot be described accurately by only a single predictor (PWV or ZTD). These studies mentioned above provided a new idea on how to forecast rainfall from the following aspects: (1) using an increased number of meteorological parameters to describe the occurrence of rainfall as much as possible and (2) introducing the neural network algorithm to forecast rainfall that becomes the focus of this study. A rainfall forecast model was proposed by using the improved BP-NN algorithm with multiple meteorological parameters (PWV; temperature, T; relative humidity, RH; dew point, DPT; day of year, DoY; hour of day, HoD; and pressure, P). The numerical experiment revealed that this method can forecast the possibility of rainfall in a short amount of time (10-60 minutes), and good performance was obtained by the proposed rainfall forecast method.

GnSS-Derived pWV and theory of Bp-nn Algorithm
Retrieval of GnSS-derived pWV. ZTD occurs as the GNSS signal is affected by the atmospheric refraction when it passes through the troposphere, ZTD includes zenith hydrostatic delay (ZHD) and ZWD 34 .
ZHD accounts for approximately 90% of ZTD and is mainly affected by latitude and surface pressure 35 . ZWD is related to the moisture content in the signal propagation path, and GNSS signals are affected by the polar motion of water vapor molecules 10 . ZHD can be calculated accurately by using the following empirical formula 35 : where P W is the surface pressure of the station with a unit of °C, ϕ refers to the latitude of the station with a unit of radian, and H is the geodetic height of the station with a unit of km. Therefore, ZWD can be obtained by extracting ZHD from ZTD, and PWV can be calculated by multiplying the conversion factor as follows 19 : where ρ W is the water vapor density, and Π represents the conversion factor, which can be expressed as follows: where H f = 1.48 or H f = 1.25 when the station is located in the northern or southern hemisphere, respectively; and DoY represents the day of the year. Equation (4) is an empirical formula that is fitted by using 174 radiosonde stations over a period of four years in tropical, subtropical, and temperate regions. The accuracy of the retrieved PWV by using this equation is ±1 mm 14 .
theory of Bp-nn algorithm. BP-NN consists of input, hidden, and output layers. Each layer is fully interconnected, and no interconnection exists in the same layer. One or more hidden layers can exist. Robert Hecht-Nielsen 36 proved that any complex nonlinear problem can be simulated with a three-layer BP-NN algorithm, and any mapping from N-to M-dimensions can be completed. Therefore, this study adopts a three-layer BP-NN structure. Figure 1 shows that the BP-NN structure has input, implicit, and output layers. The mathematical principle of the forward propagation of BP-NN is as follows 37 : where X i is the input vector, M is the number of input layer nodes and ∈ i M (0, ), W ij 1 is the weighted value between the i th neurons in the input layer and the j th neurons in the hidden layer, f 1 is the threshold parameter of the hidden layer, Y j is the node input value of the hidden layer and ∈ j N (0, ), and N is the number of hidden layer nodes. The input value of each hidden layer node is converted to the output value L j of the corresponding hidden layer node through the nonlinear transfer function. The following sigmoid function is a widely used transfer function of the hidden layer 38 : The output layer is calculated similar to that of the hidden layer and expressed as follows: where W jK 2 is the weighted value between the j th unit in the hidden layer and the output layer unit Z k , ∈ j N (0, ); f 2 is the threshold parameter of the output layer; Z k is the input value of the output layer node; and the following linear function ReLU is a widely used transfer function of the output layer 27 : where H is the output value of the output layer node. The above equation is the forward propagation mode of the BP-NN algorithm. The input information is transmitted from the input layer to the output layer through the hidden layer. If the output results do not match the expectations, then they enter the following reverse propagation process: the error starts from the output layer, passes through the hidden layer, and finally reaches the input layer, thereby completing a reverse propagation. In www.nature.com/scientificreports www.nature.com/scientificreports/ the BP process, the weights of each layer are corrected by decreasing the error gradient. The weights between the i th neuron in the input layer and the j th neuron in the hidden layer are corrected as follows 27 : where W and f are the weight value and threshold, respectively; α a and α b are the momentum constants used to determine the effect of the last step parameter change on the current propagation direction; η a and η b refer to the learning rates; ρ t ( ) j is the j th neuron error signal of the hidden layer in the process of BP-NN algorithm. The output layer neuron error signal ρ t ( ) can be expressed as follows 39 : where G is the number of data in the training data set, H is the desired output, and Ĥ is the actual output. The process of forward and backward propagations is repeated until the error between the output and the expectation is reduced to an acceptable level or the number of learning times reaches a predetermined value.

Data and experiment Description
Data description. Two GNSS stations and the collocated meteorological stations in Singapore were selected over the period of 2010 to 2012 to perform the experiment. Figure 2 presents the geographic distribution of the selected GNSS stations. One of the GNSS stations, NTUS, belongs to the International GNSS Service (IGS). Another station SNUS belongs to the Singapore Satellite Positioning Reference Network (SiReNT) and located in the National Technological University. GNSS observations of NTUS station was downloaded from ftp://cddis. gsfc.nasa.gov/pub/gps/data/. GIPSY OASIS II was used to process the GNSS observations to obtain the ZTD parameters 40 . The Global Mapping Function (GMF) is used and the elevation cut-off angle of 10° is selected for GNSS observations. ZWD data were calculated based on Eqs. (1) and (2). Finally, the PWV data with the intervals of 5 minutes were obtained based on Eqs. (3) and (4). Here, the PWV data of SNUS station is replaced by that of NTUS station. This because that (1) the distance between two stations is very close (about 11 km) and (2) the GNSS observations from SiReNT cannot be obtained currently. The collocated meteorological data were also obtained from meteorological stations NUS and NTU, and Table 1 lists the corresponding information of the meteorological stations. In station NUS, seven meteorological parameters were collected, including surface pressure (P), surface temperature (T), DoY, hour of day (HoD), minute of hour (MoH), RH, and rainfall with the time resolution of 5 minutes. In station NTU, T, RH, DPT, DoY, HoD, MoH, and rainfall are collected with the time resolution of 1 minute. To unify the time resolution of meteorological parameters and GNSS-derived PWV data, the meteorological parameters in NTU were resampled every 5 minutes.
improved Bp-nn algorithm and the selection of key parameters. An improved weight correction method of BP-NN algorithm was proposed by using the Levenberg-Marquardt (L-M) learning rules to www.nature.com/scientificreports www.nature.com/scientificreports/ overcome the disadvantages of slow convergence speed, local minimum, and training paralysis of the traditional BP neural network. The L-M formula is presented as follows: where ΔW is the corrected weight by using the L-M method, J is the Jacobian matrix of the network error to the weight derivative, e is the error vector, and μ is a scalar. When μ = 0, the Newton method is used in the L-M equation, whereas the gradient method is used when μ is a large value. Compared with the traditional BP neural network learning method, the improved correction method has the following advantages: (1) rapid convergence rate, (2) ability to combine the advantages of gradient descent and Newton methods, and (3) performance stability 27 .
Two important parameters must be set for the BP-NN algorithm, namely, the number of hidden layer nodes and learning rate. Therefore, selecting an appropriate method in determining these parameters is crucial to establishing the rainfall forecast model by using the BP-NN algorithm. If the number of hidden layer nodes is extremely small, the convergence speed of the whole neural network will slow down and it is difficult to conduct, and the trained result of the BP-NN algorithm cannot be obtained or the algorithm cannot recognize the samples that were previously unavailable and the fault tolerance is poor; if the number of hidden layer nodes is extremely large, then the learning time is increased and the generalization ability of the BP-NN algorithm is reduced 41,42 . The number of hidden layer nodes is selected according to Kolmogrov's theorem. An equal relationship exists between the number of input layer neurons and the number of hidden layer neurons 23,43 , and the calculation of which is presented as follows: where N hid and N in are the number of hidden and input layer nodes, respectively. According to Kolmogrov's theorem, the number of selected hidden layer nodes can express any mapping accurately and coordinate the capacity and training time of the hidden layer 23,43 . The selection of learning rate has attracted the interest of many scholars in the research of BP-NN. If the learning rate is extremely small, then the convergence of the neural network can be guaranteed. However, the number of iterations required is large, and the convergence speed is slow. If the learning rate is extremely large, then it may be overcorrected, making it difficult to perform convergence of the neural network 26 . The learning rate is selected based on the following the empirical formula proposed by Kung and Hwang 44 :  Table 2 presents the experiment information and schemes designed in two stations. Figure 3 shows the flowchart of the BP-NN experiment that includes the technical route of simulated and forecasted experiments. Equalization and normalization processes of the input data are initially performed, and the relevant parameters of the rainfall forecast model with the BP-NN algorithm are then set up. Then, the rainfall

Rainfall forecasts Based on the improved Bp-nn Algorithm
Data and the correlation analysis. Some data are unavailable in some time periods due to the instability of equipment or weather factors. Therefore, the collected meteorological data should be analyzed initially. Table 3 presents the statistical result of the collected meteorological data in SNUS and NTUS stations for three years The correlation between different meteorological parameters and rainfall should be analyzed prior to the BP-NN experiment because if a strong correlation exists between the two variables, then the second variable will not contribute additional classification information to the classification process. Therefore, the second variable does not function as a classification factor 45 . Figure 4 shows the correlation between rainfall and each meteorological parameter for two stations from 2010 to 2012.
This figure shows that no strong correlation exists between meteorological parameters and rainfall, thereby indicating that the occurrence of rainfall is related not only to the meteorological parameters in the experiment www.nature.com/scientificreports www.nature.com/scientificreports/ but also to other meteorological parameters or meteorological processes. The correlation coefficients between T and RH were the largest with values of −0.83 and −0.90 in SNUS and NTUS stations, respectively, thereby indicating that a strong negative correlation exists between the two variables. A positive correlation exists between HoD and T with the correlation coefficients of 0.28 and 0.32 in the two stations, respectively. These results indicated that the temperature changed with the alternation of day and night. A relatively low correlation appeared between rainfall and PWV with a value of approximately 0.1 in the two stations, thereby explaining the high false alarm rate when only PWV/ZTD was used for rainfall forecasting. In addition, a positive correlation between rainfall and other meteorological parameters (DoY, HoD, MoH, RH, and PWV) indicated that rainfall was affected by these parameters to some degree. Therefore, selecting these meteorological parameters as predictors from the perspective of correlation analysis is reasonable. Data preprocessing. Balanced data sets are important for training classifier data 46 . The classifier only predicts most class data in the sample and completely ignores a few class data when the proportion of the majority of class data to total sample data is much larger than that of the minority class data 47 . In our experiment, Table 4 shows the proportion of rainfall and nonrainfall data for the two stations in different years, indicating that this proportion is relatively larger (from 1:29 to 1:58). Therefore, a method is required to solve this problem. The downsampling method was applied to balance the two types of data. This method can delete parts of the data in most samples or add some artificially generated or duplicated data to a few samples to solve the problem of remarkable imbalance of sample data 48 . This strategy is generally used to solve the problem of data imbalance in large data samples 19 . The specific processing of this method can be summarized as follows: (1) new nonrainfall data sets are randomly extracted from nonrainfall data sets, and the size of the new data sets is the same as that of the rainfall data sets; (2) the rainfall and new nonrainfall data sets are combined into training data sets, and the  Table 3. Statistical result of the collected meteorological data in SNUS and NTUS stations for three years (2010-2012).  www.nature.com/scientificreports www.nature.com/scientificreports/ proportion of rainfall and new nonrainfall data sets is 1:1; (3) these combined training data sets are used as the training sample data for the BP-NN algorithm 19 .
The weight became extremely large through the build up of accumulators due to the different dimensions and large numerical differences in different meteorological parameters. Moreover, the BP-NN algorithm is difficult to converge if the data are directly input into the model. Therefore, maximum and minimum methods were used to normalize the seven types of balanced data 23,42 . The balanced and normalized data were regarded as training data and input into the BP-NN model to establish the nonlinear relationship between the seven types of meteorological parameters and rainfall.
Simulated experiment. The number of the input layer node was 7 for the BP-NN algorithm because of the number of input parameters (T, P, RH, PWV, MoH, HoD, and DoY). The number of the hidden layer node and the learning rate was calculated based on Eqs. (13) and (14). In this study, the values were 15 and 0.125, respectively. The number of the output layer node was 1 in the simulated experiment. Therefore, the structure of the BP-NN algorithm was 7-15-1. Sigmoid and ReLU functions were used for the transfer function of the hidden and output layers, respectively. The initial weight of the BP-NN model was generated based on the Nguyen-Widrow algorithm, and the BP-NN model was optimized by using the L-M optimal weight method.
The experiments focused on whether the rainfall occurred and not on the size of the rainfall. Therefore, the actual and simulated rainfall results were considered binary values. The actual rainfall was set to 0 when the rainfall was equal to 0 mm and 1 when the rainfall was larger than 0 mm. Negative values were observed in the simulated result because the simulated rainfall based on the BP-NN algorithm oscillated at approximately 0 mm when no rainfall occurred. Therefore, selecting an appropriate rainfall threshold was necessary to determine whether or not rainfall will occur. The specific method set a rainfall threshold (N). The simulated rainfall less than or equal to N mm was set to 0, whereas the simulated rainfall greater than N mm was set to 1.
The following indices were introduced to evaluate the result of the rainfall forecast model based on the improved BP-NN algorithm, namely, true (TFR), false (FFR), and missed (MFR) forecast rates: where N true is the number of forecasted rainfall events of the model, N actual is the actual number of rainfall events, N false is the number of forecasted rainfall events but no rainfall actually occurred, and N missed is the number of forecasted rainfall events that the model failed to predict. Figure 5 shows the simulated result of Schemes 1, 2, and 3 in the SNUS station. This figure shows that TFR generally decreased and FFR and MFR increased with increasing rainfall threshold. The rainfall threshold with a value of 0 mm was the best among the simulated results of all schemes. Therefore, the rainfall threshold (N) of 0 mm was selected as the simulated rainfall result. Table 5 shows the statistical result of the simulated forecasting experiment of the three schemes in the two stations. In the table, the TFR of the simulated result of the three schemes is larger than 98%, whereas the FFR ranged from 17-47% in the two stations. In addition, this table indicates that the TFR of Schemes 2 and 3 was comparable, whereas the FFR decreased when more training data were used to establish the rainfall forecast model based on the improved BP-NN algorithm. The average values of TFR, FFR, and MFR of the three schemes in the two stations were 99.18%, 33.90%, and 0.82, respectively. These results validated the feasibility of the proposed rainfall forecast model based on the improved BP-NN algorithm. www.nature.com/scientificreports www.nature.com/scientificreports/ forecasted experiment. In this section, the proposed rainfall forecast model was applied for rainfall forecasting in the two stations on the basis of the schemes designed in Table 6. The proposed model based on the BP-NN algorithm could forecast rainfall 10-60 minutes in advance. Figure 6 presents the forecasted rainfall result based on the BP-NN algorithm at the SNUS station, indicating that the best result could be obtained when the rainfall threshold was 0 mm. Therefore, this rainfall threshold was also determined in the forecasted experiment. This phenomenon also further verified the rationality of the strategy of selecting the rainfall threshold. Figure 7 shows the forecasted results of the three schemes in the two stations. The TFR and FFR of the proposed rainfall forecast model with the improved BP-NN algorithm could reach up to 92% to 99% and 35% to 43%, respectively. This figure also shows that the average TFR and of the three schemes are above 96% and approximately 40%, respectively. These results improved by approximately 10% with respect to TFR, and FFR is comparable to that of Manandhar et al. 19 . Table 6 shows the statistical forecasted result of the two stations for the three schemes under different levels of rainfall (0-50 mm/h; 0-100 mm/h and >100 mm/h). It can be concluded that the larger the rainfall, basically, the higher predictability the model has. In addition, the statistical result reveals that the averaged TFR, FFR, and MFR of the different schemes were 96.28%, 40.36%, and 3.72%, respectively. These results were superior to the forecasted result of previous studies that used GNSS-derived ZTD or PWV data 3,4,6,10 . In addition, it also can be observed from Table 6 that the forecasted result of Scheme 3 was superior to that of Scheme 2, especially under the case of rainfall <0-50 mm/h. Schemes 2 and 3 were designed to forecast rainfall in 2012 at the two stations by using different trained models. Two years of data (2010-2011) were used to train the rain forecast model for Scheme 3, whereas only one year of data (2011) was used for Scheme 2, further demonstrating that more trained data can improve the ability of describing the rainfall forecast model. Therefore, a better forecasted result could be obtained in Scheme 3. This result also indicated that the proposed rainfall forecast model should be trained by using as much data as possible.   Table 6. Statistical results of the forecasted experiment of the three schemes at the two stations for different levels of rainfall (0-50 mm/h; 0-100 mm/h and >100 mm/h).

conclusion
The correlation analysis between rainfall and different meteorological factors was performed. The results showed that no strong correlation existed between rainfall and any meteorological factor, thereby indicating that the occurrence of rainfall depends on a myriad of atmospheric parameters. Therefore, a rainfall forecast model based on the improved BP-NN algorithm was proposed by using multiple meteorological parameters. Two key parameters (the number of hidden layer nodes and learning rate) were determined based on the Kolmogrov's theorem and empirical principle. The data on the two stations from 2010 to 2012 were used to train and validate the proposed BP-NN model. The simulated result of the BP-NN model in the two stations revealed the good performance of the proposed model with the average RFR and WRF of 99.18% and 33.90%, respectively. The forecasted result revealed that the rainfall could be forecasted 10-60 minutes in advance with the average RFR and WRF of 96.28% and 40.36%, respectively. These results verified the reliability and feasibility of the proposed rainfall forecast model based on the improved BP-NN algorithm. In addition, more data should be used to train the rainfall forecast model. In future studies, WFR should be decreased further by optimizing the selection of parameters in the BP-NN algorithm. Moreover, other rainfall forecast methods must be explored through different machine learning algorithms, such as SVM and long short-term memory, to improve the WFR of rainfall forecasting.