## 3 Results and Discussion
### ML Models: Accurate Predictions of Heating and Cooling Loads  
This section presents the outcomes of the investigation into the application of ML algorithms for the accurate prediction of heating and cooling loads in buildings. Leveraging advanced models and methodologies, this section delves into the effectiveness of well-known ML models in optimizing energy consumption prediction and improving thermal comfort within the built environment. The results presented herein offer valuable insights into the performances of these models, shedding light on their potential for revolutionizing the way we approach heating and cooling load predictions in the realm of LEBs. In Figures 7-9, the predictive capabilities of each ML model are evaluated for both heating and cooling loads in three different climates. This assessment uses a combination of inputs that includes all predictor variables. The ranking of the ML models is determined according to the performance score. Additional analyses are conducted considering MAPE, \(\sigma\), and R\({}^{2}\). For the Mediterranean climate represented by Meknes City, the results show that during the training phase, the XGBoost model achieves the best performance in predicting both heating and cooling loads. In the testing phase, the ELM model demonstrates superior performance for heating load prediction, while the SVM model outperforms others in predicting cooling loads. Moreover, based on the high R\({}^{2}\) values obtained, alternative models like SVM display strong potential, exhibiting near-perfect correlations for both thermal loads along with low dispersion indicators. Further details are illustrated in Figure 7.  
The results obtained for Ifrane (a cold climate) demonstrate that, during the training phase, the XGBoost model performs optimally for predicting thermal loads. During the testing phase, the SVM model emerges as the most effective, showcasing a perfect correlation and very low values for the dispersion indicators considered in this study. Additional insights can be obtained from Figure 8.  
Similar to the findings in a cold climate, the results for Marrakech, representing a semi-arid climate, reveal that, during the training phase, the XGBoost model excels in predicting both heating and cooling thermal loads. However, the SVM model is the most effective in the testing phase. Additional insights can be derived from Figure 9.  
Figure 8: A comparative analysis of ML models in predicting thermal loads within a cold climate (Iframe City). Figure 7: A comparative analysis of ML models in predicting thermal loads within a Mediterranean climate (Meknes City). The XGBoost model optimally predicts heating and cooling thermal loads across the three considered climates during the training phase. However, excluding the Mediterranean climate, the SVM model is the most effective for predicting the heating and cooling loads. In a Mediterranean climate, the ELM model slightly exceeds the SVM model only in predicting heating loads, while the SVM model outperforms all ML models in predicting cooling loads. As a summary of the most accurate predictions of heating and cooling loads, we conclude that the XGBoost model consistently performed best during the training phase for all climates. In testing, model performance varied by region:  
* Mediterranean climate (Meknes)--ELM was most effective for heating load prediction, while SVM led in cooling load prediction;
* Cold climate (Ifrane)--SVM outperformed others with near-perfect accuracy;
* Semi-arid climate (Marrakech)--SVM again showed superior performance. Overall, while XGBoost excelled in training, SVM emerged as the most robust model during testing, especially for Ifrane and Marrakech. In Meknes, ELM slightly outperformed SVM for heating loads, but SVM remained dominant for cooling predictions.