# Hybrid Load Forecasting Using Gaussian Process Regression and Novel Residual Prediction
## 5 Results and Analysis  
To test the method's accuracy, three of the most commonly used performance metrics in machine learning were used: mean absolute percentage error (MAPE), root mean square error (RMSE) and mean absolute error (MAE) [34]. Each of these metrics measures the difference between the experimental and the predicted data. The smaller their value, the better the algorithm will perform:  
\[MAPE=\frac{\sum_{i=1}^{n}\left|\frac{y_{i}-y_{ii}}{y_{i}}\right|}{n}\ast 100\% \tag{20}\]  
\[RMSE=\sqrt{\frac{\sum_{i=1}^{n}\left(y_{i}-y_{ii}\right)^{2}}{n}} \tag{21}\]  
\[MAE=\frac{\sum_{i=1}^{n}\left|y_{i}-y_{*i}\right|}{n} \tag{22}\]  
where \(y_{i}\)_and_\(y_{*i}\) are the measured and predicted parameters at \(i\) time and \(n\) represents the number of the considered data.  
The algorithm was trained and tested using the energy load historical data described above. Before starting the validation process, and in order to enhance the processm some measurements against overfitting are required. Overfitting represents the set of data that corresponds too closely or exactly to another particular set of data and may therefore fail to predict future observations reliably. To protect against overfitting, a fivefold cross-validation method was used. The described performance metrics of the algorithm are MAPE = 4.89%, RMSE = 245.3 MWh, MAE = 188.4 MWh. Figure 7 presents a comparison between the predicted and actual values of the load. The first observation is that the forecasted load mimics the characteristics of the historical data. Also, as computed above, the results are expected to generate solid forecasting data for this specific energy load trend.  
The graphical representations from Figure 8 present the residuals with true and predicted responses, and the influences of temperature and month. It can be observed how the month of the year influences the residual precision, with the lowest values for the middle of the year. The same patterns can be observed for the temperature predictor; in this case, the residuals are higher for lower values of the temperature.  
As proposed in the methodology section, to further improve the algorithm, the residuals were predicted using the same regression methodology. Applying this dual-layer prediction process improves the forecasting values and the performance metrics: MAPE = 4.09%, RMSE = 221.6 MWh, and MAE = 153.2 MWh. Figure 9 illustrates the load's actual value in blue, the predicted value in red, and the dual-layer prediction in magenta.  
To further validate and test the algorithm's fitness for the specific load pattern, another test was performed. As presented above, the algorithm was implemented on historic energy load data from January 2018 to June 2019. Data collected from the month of July were used to test the algorithm's performance. Figure 10 presents a graphical representation of the measured and predicted energy load values for this specific period of time. This graph validates the algorithm that uses residual prediction and also shows its superiority over the hybrid method without error prediction.  
Figure 8: Residuals plot: (**a**) month predictor; (**b**) predicted response comparison; (**c**) temperature predictor; (**d**) true response comparison.  
Figure 7: Prediction comparison.  
A comparison was made between the proposed forecasting method with and without error prediction. Table 1 presents the performance metrics for the July testing.