## 4 Discussion
### Key Variables in the Model  
To understand which variables in the model are most important for predicting NRPEC, we can use the XGBoost algorithm to obtain the total gain of each input variable in the model. This allows us to determine the improvement in accuracy that each variable contributes to the overall model.  
Figure 8 highlights that climate zone is the most influential variable in the model by a significant margin, followed by construction date, compactness, and housing size. These four variables are crucial for accurately characterizing NRPEC, underscoring their high relevance. Additionally, the percentage of exposed envelope surface is identified as a significant factor within the ML algorithm, contributing valuable insights derived from the model. Another noteworthy variable is building quality, an internal metric from the Spanish cadastre primarily used for tax purposes. Interestingly, it enhances the model by providing supplementary information that improves its predictive accuracy. It is important to note the limited impact of the year of renovation and renovation cost variables, which, while theoretically vital for assessing building energy performance, are of limited relevance in the current model. Although recorded in Spain's cadastre, these variables lack specificity, as the cadastre does not indicate whether the renovations were energy-related or focused on other aspects of the building, such as an interior home renovation for aesthetic reasons. This lack of detail is compounded by the absence, until the 2024 EPBD, of a legal definition at the EU level for what qualifies as a deep renovation. The new EPBD defines deep renovation as one in line with the 'energy efficiency first' principle, focusing on essential building elements and transforming a building into a nearly zero-energy building. However, member states, including Spain, have not yet fully incorporated this definition into their national regulations.  
This limitation could significantly skew predictions for older versus newer buildings because the lack of detailed renovation data makes it difficult to accurately assess the energy performance improvements made over time. For older buildings, the absence of information on whether these renovations qualify as deep renovations (or any energy-related upgrades) could lead to over- or underestimations of their energy performance.  
Figure 8: Total gains of the main input variables of the model. LTRS: long-term renovation strategy.  
As renovation efforts expand across building stock, these variables will become essential for understanding energy consumption more precisely. To ensure the future success of tools such as this nUBEM, Spain should integrate detailed renovation data--aligned with the 2024 EPBD--into its cadastre to better capture the decarbonization of its building stock. This data should clearly indicate which renovations qualify as deep renovations under the EPBD definition. Additionally, it should include information on other levels of energy improvement, allowing for a more granular assessment of the building stock's progress toward decarbonization. Ensuring detailed data collection on renovation types will be vital for the continued development of accurate and actionable energy performance models.