# Plum Tree Algorithm and Weighted Aggregated Ensembles for Energy Efficiency Estimation
## 5 PTA and Machine Learning Ensembles for Energy Efficiency Estimation
### PTA for Ensemble Weight Optimization for Energy Efficiency Estimation  
Figure 8 presents the PTA methodology for ensemble weight optimization used in the estimation of energy efficiency. Figure 8: PTA Methodology for Ensemble Weight Optimization for Energy Efficiency Estimation. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Column Name** & **Variable Name** & **Range** \\ \hline X1 & Relative Compactness & [0.62, 0.98] \\ X2 & Surface Area & [54.5, 80.85] \\ X3 & Wall Area & [24.5, 416.5] \\ X4 & Roof Area & [110.25, 220.5] \\ X5 & Overall Height & [3.5, 7] \\ X6 & Orientation & [2, 5] \\ X7 & Glazing Area & [0, 0.4] \\ X8 & Glazing Area Distribution & [0, 5] \\ Y1 & Heating Load & [6.01, 43.1] \\ Y2 & Cooling Load & [10.9, 48.3] \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Energy Efficiency Dataset Attribute Information Summary. The steps of the methodology are as follows:  
1. The input is the Energy Efficiency Dataset. The data samples of the original dataset are shuffled randomly. Two datasets are derived from this dataset, namely, the Cooling Dataset and the Heating Dataset, depending on the column used for the prediction. The Cooling Dataset does not contain the Y1 column, whereas the Heating Dataset does not contain the Y2 column. 2. In the cross-validation phase, fivefold cross validation is used. Table 9 presents a summary of the number of samples of each fold. 3. The Training Data and the Testing Data are represented by 80% and 20% of the total samples, respectively. In each of the five cases, the Testing Data is represented by one distinct fold from the five folds, whereas the Training Data is represented by the remaining four folds. 4. The four algorithms of the ensemble are the Random Forest Regressor (RFR), the Gradient Boosting Regressor (GBR), the AdaBoost Regressor (AdaBoost), and the Extra Trees Regressor (ETR). The implementations of these regressors are the ones from the sklearn.ensemble library, and their default configurations are used. The only parameter which is overwritten was the random_state, which is set to an arbitrary constant, namely 42, to obtain reproducible research results. 5. The original PTA is adapted to compute the weights of the ensemble. The number of dimensions of the search space \(D\) is set to 4, a value equal to the number of the algorithms of the ensemble. Then, for each plum \(P_{i}\), where \(i\) is the index of the plum, the partial weights are computed using the following formula:  
\[ \begin{bmatrix}w^{\prime}_{RFR}\\ w^{\prime}_{GBR}\\ w^{\prime}_{AdaBoost}\\ w^{\prime}_{ETR}\end{bmatrix} = \begin{bmatrix}P_{i,1}+X_{max}\\ P_{i,2}+X_{max}\\ P_{i,3}+X_{max}\\ P_{i,4}+X_{max}\end{bmatrix} , \tag{8}\]  
whereas the ensemble weights are computed using the following formula:  
\[ \begin{bmatrix}w_{RFR}\\ w_{GBR}\\ w_{AdaBoost}\\ w_{ETR}\end{bmatrix} = \begin{bmatrix}\frac{w^{\prime}_{RFR}}{w^{\prime}_{GBR} +w^{\prime}_{AdaBoost}+w^{\prime}_{ETR}}\\ \frac{w^{\prime}_{GBR}}{w^{\prime}_{ERR}+w^{\prime}_{GBR}+w^{\prime}_{AdaBoost} +w^{\prime}_{ETR}}\\ \frac{w^{\prime}_{GBR}}{w^{\prime}_{ERR}+w^{\prime}_{GBR}+w^{\prime}_{AdaBoost} +w^{\prime}_{ETR}}\\ \frac{0.25}{0.25}\\ 0.25\\ 0.25\\ 0.25\end{bmatrix} ,\quad\quad\text{otherwise}. \tag{9}\]  
Considering the values of \(y_{RFR}\), \(y_{GBR}\), \(y_{AdaBoost}\), and \(y_{ETR}\) predicted by using the RFR, GBR, AdaBoost, and ETR, respectively, as well as the values \(z\) of the Standardized \begin{table}
\begin{tabular}{c c c} \hline
**Dataset** & **Fold** & **Number of Samples** \\ \hline Cooling Dataset & fold 1 & 154 \\  & fold 2 & 154 \\  & fold 3 & 154 \\  & fold 4 & 153 \\  & fold 5 & 153 \\ Heating Dataset & fold 1 & 154 \\  & fold 2 & 154 \\  & fold 3 & 154 \\  & fold 4 & 153 \\  & fold 5 & 153 \\ \hline \end{tabular}
\end{table} 
Table 9: Cooling Dataset and Heating Dataset Folds Summary.