# Investigation of the EWT-PSO-SVM Model for Runoff Forecasting in the Karst Area
## 2 Methodology  
### Empirical Wavelet Transform (EWT)  
The principle of empirical wavelet transform is to adaptively divide the Fourier spectrum and construct a set of suitable signal wavelet filters to decompose each signal into its modes [20]. First, if the given runoff time series \(f(t)\) is composed of \(N\) single-component components, the largest component is found and the series is normalized; second, the Fourier spectrum is segmented into \(N\) continuous intervals. It is necessary to specify \(N+1\) boundary line, where \(\omega_{0}=0\) is the first boundary line and \(\omega_{\text{N}}=\pi\) is the last boundary line. The results of each segmentation are expressed as \(\Lambda_{n}=[\omega_{n-1},\omega_{n}],\ n=1,\ 2,\ \cdots,\ N\). To facilitate the construction of the filter later, a transition segment Tn centered at \(\omega_{n}\) and of width \(2\tau_{n}\) is defined, and \(\tau_{n}=\gamma\omega_{n}\)[20].  
Ref. [21] defines the empirical scale function and empirical wavelet function formula as  
\[\hat{\Phi}_{\text{n}}(\omega)=\left\{\begin{array}{ll}1,&if\ \ |\omega|\leq\ (1- \gamma)\omega_{n}\\ \cos\Big{[}\frac{\pi}{2\tilde{\rho}}\Big{(}\frac{1}{2\tau_{n}}(|\omega|- \omega_{n}+\tau_{n})\Big{)}\Big{]},&if\ (1-\gamma)\ \omega_{n}\leq|\omega|\leq(1+\gamma)\omega_{n}\\ 0,&otherwise\end{array}\right. \tag{1}\]  
\[\hat{\psi}_{n}(\omega)=\left\{\begin{array}{ll}1,&if\ \ (1+\gamma)\omega_{n} \leq|\omega|\leq(1-\gamma)\omega_{n+1}\\ \cos\Big{[}\frac{\pi}{2}\tilde{\rho}\Big{(}\frac{1}{2\tau_{n}+1}(|\omega|- \omega_{n+1}+\tau_{n+1})\Big{)}\Big{]},&if\ \ (1-\gamma)\omega_{n+1}\leq|\omega|\leq(1-\gamma)\omega_{n+1}\\ \sin\Big{[}\frac{\pi}{2}\tilde{\rho}\Big{(}\frac{1}{2\tau_{n}}(|\omega|- \omega_{n}+\tau_{n})\Big{)}\Big{]},&if\ \ (1-\gamma)\ \omega_{n}\leq|\omega|\leq(1-\gamma)\omega_{n}\\ 0,&otherwise\end{array}\right. \tag{2}\]  
where \(\omega_{n}\) is the nth maximal value of Fourier spectrum, \(\gamma\) is between \(0\) and \(1\). Referring to Ref. [23], \(\gamma<min_{n}[\omega_{n+1}-\omega_{n}/\omega_{n+1}+\omega_{n}],\ \beta(x)=x^{4} \big{(}35-84x+70x^{2}-20x^{3}\big{)}\).  
Similar to wavelet transform method, EWT also requires the establishment of orthogonal basis. As defined in Ref. [20], the calculation formulas of detail coefficients, approximation coefficients and the runoff time series reconstruction results are  
\[w_{\text{f}}^{\epsilon}(n,t)=\ \langle f,\psi_{n}\rangle=\int f(\tau)\overline{ \psi_{n}(\tau-t)}d\tau=F^{-1}\Big{(}\hat{f}(\omega)\overline{\hat{\psi}_{n}( \omega)}\Big{)}, \tag{3}\]  
Figure 1: EWT–PSO–SVM hybrid model and its performance investigation schematic diagram.  
\[w_{\rm f}^{c}(0,t)=\ \langle f,\phi_{1}\rangle=\int f(\tau)\overline{\phi_{1}( \tau-t)}d\tau=F^{-1}\Big{(}\hat{f}(\omega)\overline{\hat{\phi_{1}}(\omega)} \Big{)}, \tag{4}\]  
and  
\[f(t)=w_{f}^{c}(0,t)*\phi_{1}(t)+\sum_{n=1}^{N}w_{f}^{c}(n,t)*\psi_{n}(t). \tag{5}\]  
The empirical mode function \(f_{k}\) is obtained from Equation (5) as follows:  
\[f_{0}=w_{f}^{c}(0,t)*\phi_{1}(t) \tag{6}\]  
\[f_{n}=w_{f}^{c}(n,t)*\psi_{n}(t). \tag{7}\]  
In the wavelet analysis of hydrological series, the reasonable selection of wavelet decomposition layers has a great influence on the results. Therefore, this paper uses the adaptive method of wavelet filter decomposition layers proposed by [PERSON] et al. [28] to determine the wavelet decomposition layers of hydrological series. After testing and comparison, the performance of the model is optimal when the hydrological series is decomposed into four layers.