The objective of this paper is to develop an efficient ensemble learning model to predict the heating load (HL)and the cooling load (CL) of residential buildings, considering eight input variables (relative compactness, surface area,wall area, roof area, overall height, orientation, glazing area, and glazing area distribution). Feature engineering is an important step in predictive modeling, once the design of correct features can improve the models’ predictive accuracy.For the eight input variables, thirty-three statistical features are obtained. Therefore, it is investigated the predictive performance in terms of mean squared error (MSE) for 10-fold cross-validation procedure with random forest (RF) model, when principal component analysis (PCA) and differential evolution optimization algorithm (DE) are employed during the feature selection process. The PCA is employed to reduce the feature space into the principal components to explain 95% of the data variability, and DE to select the most suitable set of inputs to predict HL and CL. Empirical results show that errors of DE-RF are lower than PCA-RF and RF to predict both outputs. The improvement on MSE achieved by DE-RF ranges between 11.58% - 11.63% regarding RF, and 9.73% - 61.41% regarding PCA-RF, for HL and CL, respectively.