## 3 Methodology
### Improved Prophet Model  
The Prophet model is a decomposable time series forecasting model open-sourced by Facebook [45; 46]. The model is a whole-loop structure divided into a manual manipulation part and an automated part, which integrates background knowledge of specific problems and statistical analysis [46]. Analysts can check predictions and adjust models based on feedback and realistic scenarios. This combination makes the Prophet model more accurate and rapid, more automatic, and parameters are easier to adjust than the traditional time series prediction model [47]. The principle of the model is shown in Figure 3.  
Figure 3: The principle of the Prophet model for prediction. Figure 2: LSTM working principle. The three \(\sigma\) are the forget gate, the input gate and the output gate. \(\odot\) is the dot product operation. \(C_{t}\) denotes the cell state, \(X_{t}\) denotes the input data and \(h_{t}\) denotes the output data. The algorithm of the model is formulated as follows:  
\[Y_{(t)}=g_{(t)}+s_{(t)}+f_{(t)}+e_{(t)} \tag{10}\]  
which includes:  
(1) Trend function \(g_{(t)}\)  
This is the core part of the whole Prophet model, and is mainly used to represent the trend in the time series of the non-periodic changes. It reflects the overall trend in the fluctuation of the time series, while the future trend is predicted [48]. The trending term has two important functions: the segmented linear function based on linear regression, and the saturated growth function based on logistic regression. This simulation adopts a piecewise linear function [46]. (2) Periodic function \(s_{(t)}\)  
The time series contains seasonal trends in various types of cycles, such as days, weeks, months and years [49]. For these irregular periodic variations, fitting these variations effectively has a significant effect on the accuracy of the model predictions. Therefore, the Prophet model approximates this cyclical property with a Fourier series [50]. (3) Flow function \(f_{(t)}\)  
In the original Prophet model, this item is the holiday function \(h_{(t)}\). Prophet has built-in important holidays in each country, and in the prediction of the series affected by special time points such as sales volume or electricity consumption, the holiday term can effectively simulate the impact of special time points, such as a surge in orders on the National Day. As for the runoff error series in this study, it is not affected by holidays in the traditional sense. Through comparison and observation, it is found that the runoff error series is influenced by high-flow and low-flow periods, and the error in the BTOP simulation increases accordingly at the maximum point of runoff. Therefore, the improved Prophet model uses the flow function \(f_{(t)}\) to replace the original holiday function \(h_{(t)}\). The maximum value point in the runoff series is used as a special \"holiday\" to effectively reduce the effect of the high-flow periods on the error series, and the equation is as follows:  
\[f_{(t)}=Z_{(t)}k=\sum_{i=1}^{L}k_{i}\cdot L_{\{t\in D_{i}\}} \tag{11}\]  
where \(k_{i}\) denotes the influence range of the high flow periods, \(k\) follows a normal distribution, \(k\sim\text{Normal}(0,q^{2})\). The parameter _flow_prior_scale_ influences the normal distribution, and the parameter value is specified according to the average flow rate of each station. The larger the value, the greater the influence of the high-flow periods on the model; \(L\) is the number of extreme value points of the high-flow periods, and these points are located on the rainfall-runoff map and entered into the model by manually creating a data frame; \(D_{i}\) indicates the date before and after the high-flow periods, and it is set using the _lower_window_ and _upper_window_ parameters, respectively. (4) White noise function \(e_{(t)}\)  
This function represents the residual fluctuation, and there is no specific formula for calculation. The _mcmc_samples_ parameter was used to select the probability estimation mode.