# Hybrid Load Forecasting Using Gaussian Process Regression and Novel Residual Prediction
## 3 Empirical Wavelet Transform  
EWT [30] is used to preprocess the energy load data. This will ensure that the analyzed data will follow a smooth path that shapes accordingly to data changes without capturing the peak values  
Figure 4: Energy load—humidity influence.  
Figure 5: Energy load—dew point influence.  
introduced by field equipment. All data are preprocessed before using the forecasting algorithm. This method is not used in real time because data are collected until the end of the day. After acquiring the new data set, the EWT preprocess starts and the result is then added to the historical data. This wavelet method adapts to the processed signal by building a set of bandpass filters. To construct the wavelet filter bank, a robust peak detection is used prior to determining a maxima for the spectrum segmentation. This method is proposed based on multiple studies that have validated it as a perfect fit for non-stationary time signals as an energy load measurements vector [31].  
To perform a short description of the algorithm, first, a limit, \(\omega_{n}\), is defined between each step segment. The segments are denoted with \(\Lambda_{n}=[\omega_{n-1},\omega_{n}]\), and because \(\omega_{n}\in(0,\pi)\), the U\({}_{n=1}^{N}\Lambda_{n}=[0,\pi]\), where \(N\) is the number of segments. The scaling function is defined below:  
\[\hat{\phi}_{n}(\omega)=\left\{\begin{array}{ll}1&if\ \ \ |\omega|\leq\ (1- \gamma)\omega_{n}\\ cos\Big{[}\frac{\pi}{2}\beta\Big{(}\frac{1}{2\gamma\omega_{n}}(|\omega|- \omega_{n}+\gamma\omega_{n})\Big{)}\Big{]}&if\ \ (1-\gamma)\omega_{n}\leq|\omega|\leq\ (1+ \gamma)\omega_{n}\\ 0&\text{otherwise}\end{array}\right. \tag{1}\]  
where function \(\beta(x)=\left\{\begin{array}{ll}0&if\ x\leq 0\\ 1&if\ x\geq 1\end{array}\right.\) and \(\beta(x)+\beta(1-x)=1,\ \forall x\ \epsilon\ [0,1]\) and \(\gamma\ \in(0,1)\).  
The corresponding wavelets are then defined as:  
\[\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}\beta\Big{(}\frac{1}{2\gamma\omega_{n+1}}(|\omega|- \omega_{n+1}+\gamma\omega_{n+1})\Big{)}\Big{]}&if\ (1-\gamma)\omega_{n+1}\leq|\omega|\leq\ (1+ \gamma)\omega_{n+1}\\ sin\Big{[}\frac{\pi}{2}\beta\Big{(}\frac{1}{2\gamma\omega_{n}}(|\omega|- \omega_{n}+\gamma\omega_{n})\Big{)}\Big{]}&if\ (1-\gamma)\omega_{n}\leq|\omega|\leq\ (1+ \gamma)\omega_{n}\\ 0&\text{otherwise}\end{array}\right. \tag{2}\]  
After defining the wavelet methodology, the detailed coefficients and the approximation coefficients required for the signal reconstruction must be defined. The detailed coefficients are obtained from the inner product of the signal with the empirical wavelets, and the approximation coefficients result from the inner product of the signal with the scaling function:  
\[\mathcal{W}_{f}^{\kappa}(n,t)=\langle f,\psi_{n}\rangle=\int\ f(\gamma\omega) \overline{\psi_{n}(\gamma\omega-t)}d\omega \tag{3}\]  
\[\mathcal{W}_{f}^{\kappa}(0,t)=\langle f,\phi_{1}\rangle=\int\ f(\gamma\omega) \overline{\phi_{1}(\gamma\omega-t)}d\omega \tag{4}\]  
The signal reconstruction is obtained by summing the approximation with all the detailed coefficients, as shown below:  
\[f(t)=\mathcal{W}_{f}^{\kappa}(0,t)\star\phi_{1}(t)+\sum_{n=1}^{N}\mathcal{W}_ {f}^{\kappa}(n,t)\star\psi_{n}(t) \tag{5}\]  
For the energy load signal, a level three decomposition with the proposed EWT method is applied. A graphical comparison of the original signal and the reconstructed signal after processing is illustrated below in Figure 6. As presented, the EWT, smoothens the input data which will prove very beneficial for the forecasting algorithm because it will help form patterns more easily.