# Predicting Heating Load in Energy-Efficient Buildings Through Machine Learning Techniques
## 3 Model Development
### Alternating Model Tree (AMT)  
Alternating model tree (AMT) [45] is supported by ensemble learning. In this technique, a single tree will form the structure of AMT. Therefore, it can be compared with the M5P tree algorithm (i.e., a reconstruction of [PERSON]'s M5 algorithm for developing trees of regression models). It is well known that the M5P combines a conventional decision tree with the possibility of linear regression functions at the nodes. This model has been successfully employed in different subjects [46; 47]. As the most similar technique with the AMT, alternating decision trees (ADT) provide the predictive power of decision tree ensembles in a single tree structure. Existing approaches for growing alternating decision trees focus on classification problems. In this paper, to find a relationship between the inputs and output layer we have proposed the AMT for regression, inspired by work on model trees for regression. As in most machine learning-based solutions, there are different parameters that can directly influence the accuracy of the prediction; we have run sensitivity analysis for different influential parameters. Since the highest variations in the results obtained stemmed from the term'number of iterations' we ran the analysis with different iteration numbers. To have a different data validation system, a new system of 10 k-fold selection was used here. It can be seen that the R\({}^{2}\) reduces when the number of iterations increases. Therefore, the number of iterations equal to 10 was used as the default in the Weka software.  
Some of the influential terms that can influence the accuracy of the regression are number of iterations (numberOfIterations), batch size (batchSize), and number of decimal places (numDecimalPlaces).  
NumberOfIterations--Sets the number of iterations to perform. A sensitivity analysis is provided to select a proper number of iterations for the proposed AMT structure (as shown in Table 2 and Figure 8).  
\begin{table}
\begin{tabular}{c|c|c|c|c|c} \hline \multicolumn{6}{c}{**Number of Iterations**} \\ \hline Evaluation metrics & 10 & 20 & 30 & 40 & 50 \\ \hline Correlation coefficient & 0.9984 & 0.9971 & 0.9974 & 0.9975 & 0.9972 \\ \hline Mean absolute error & 0.4349 & 0.7527 & 0.7051 & 0.6464 & 0.6666 \\ \hline Root mean squared error & 0.5752 & 0.9566 & 0.8936 & 0.8495 & 0.8995 \\ \hline Relative absolute error (\(\%\)) & 4.75 & 7.94 & 7.43 & 6.82 & 7.0341 \\ \hline Root relative squared error (\(\%\)) & 5.69 & 8.94 & 8.35 & 7.93 & 8.4062 \\ \hline \end{tabular}
\end{table}
Table 2: Evaluation metrics calculated for the alternating model tree (AMT) method varied based on number of iterations.  
Figure 7: Variation of the correlation coefficient (R\({}^{2}\)) versus number of used KNN neighbors in lazy locally weighted learning (LLWL) technique.  
NumDecimalPlaces--Is as described in LLWL. Based on the required accuracy, up to two decimals are considered for final outputs.  
BatchSize--The preferred number of instances to process. In the current study the default batch size of 100 is considered.