Abstract:This paper analyzes comparatively the performance of Random Forests and Gradient Boosting algorithms in the field of forecasting the energy consumption based on historical data. The two algorithms are applied in order to forecast the energy consumption individually, and then combined together by using a Weighted Average Ensemble Method. The comparison among the achieved experimental results proves that the Weighted Average Ensemble Method provides more accurate results than each of the two algorithms applied alone.