Heat Loss Coefﬁcient Estimation Applied to Existing Buildings through Machine Learning Models

: The Heat Loss Coefﬁcient (HLC) characterizes the envelope efﬁciency of a building under in-use conditions, and it represents one of the main causes of the performance gap between the building design and its real operation. Accurate estimations of the HLC contribute to optimizing the energy consumption of a building. In this context, the application of black-box models in building energy analysis has been consolidated in recent years. The aim of this paper is to estimate the HLC of an existing building through the prediction of building thermal demands using a methodology based on Machine Learning (ML) models. Speciﬁcally, three different ML methods are applied to a public library in the northwest of Spain and compared; eXtreme Gradient Boosting (XGBoost), Support Vector Regression (SVR) and Multi-Layer Perceptron (MLP) neural network. Furthermore, the accuracy of the results is measured, on the one hand, using both CV(RMSE) and Normalized Mean Biased Error (NMBE), as advised by AHSRAE, for thermal demand predictions and, on the other, an absolute error for HLC estimations. The main novelty of this paper lies in the estimation of the HLC of a building considering thermal demand predictions reducing the requirement for monitoring. The results show that the most accurate model is capable of estimating the HLC of the building with an absolute error between 4 and 6%.


Introduction
Energy efficiency in buildings is a key roadmap to achieve sustainable development worldwide.Nearly one third of the primary energy consumed in the world comes from non-industrial buildings, and it is similar to all the energy used in the transport sector [1].Consequently, the residential sector constitutes the largest contributor to global warming by means of carbon dioxide emissions.To achieve the goal of reducing building energy consumption, international cooperation is crucial.The European Union (EU) has created a strict legislative framework implementing two important directives: Energy Performance of Buildings Directive 2010/31/EU (EPBD) [2] and the Energy Efficiency Directive 2012/27/EU [3].Both of them were updated and amended over the years.Specifically, the Directive amending the Energy Performance of Buildings Directive 2018/844/EU [4] includes different aspects strengthening the commitment of real building stock modernisation through technological improvements [5].On the other hand, the International Energy Agency (IEA) is also working hard on this issue by means of its Energy in Buildings and Community (EBC) research programme developing activities towards Nearly Zero Energy Buildings (NZEB), the reduction of carbon dioxide emissions and energy savings technologies.One of the high priority research project themes is the building envelope.
The envelope of a building is one of the main sources of heat transfer between the exterior and the interior of the rooms, and it is responsible for the difference between the conditions predicted at the design stage and the actual conditions of the use of the building, including lighting, occupancy and Heating, Ventilation and Air Conditioning (HVAC) systems' operation.This is called the performance gap between building design and operation [6,7].The envelope efficiency of a building can be characterized under in-use conditions by calculating the Heat Loss Coefficient (HLC) [8].This coefficient determines the rate of heat flow through the buildings' envelope when a temperature difference exists between the indoor air and the outdoor air under steady state conditions [9].Therefore, the accurate estimation of the HLC contributes to optimizing the energy consumption of a building.On the other hand, building energy performance simulation tools have been used in recent years to analyse the energy behaviour of buildings [10].However, achieving an accurate simulation is not trivial.Many sources of error are introduced into the simulation: occupancy and user's behaviour, weather data [11], envelope materials and thickness, the use of electric equipment, etc.The alternative to simulation is the monitoring of the building operation, which leads to the difficulty of the installation of sensors in in-use buildings.Therefore, in this context, the application of advanced mathematical modelling techniques, such as machine learning methods, is becoming more and more common [12].
There are three widely used building energy prediction models: the white-box (physics-based), black-box (data-driven) and grey-box (a combination of physics based and data-driven) modelling approaches [13].The application of black-box models in building energy analysis has been consolidated in recent years.These models have received considerable attention because of their great success in learning complex patterns and being able to make accurate predictions without specific knowledge of the subject [14,15].Machine Learning (ML) models, also known as black-box models, are specific mathematical models that are capable of learning a pattern from data and extrapolating it to a new sample.Thus, they were widely applied in studies presenting control strategies to reduce energy costs.Three of the most used are: eXtreme Gradient Boosting (XGBoost), Support Vector Regression (SVR) and Multi-Layer Perceptron (MLP) neural network.Among them, XGBoost is characterized for building regression trees, one-by-one, so that the subsequent models are trained taking into account the residuals of the previous ones [16].This algorithm has been used in numerous fields such as biology [17,18], econometrics [19], the environment [20,21] or, as in this case, the energy performance of buildings [22,23].SVR models emerged as a predictive alternative due to the use of a distinctive loss function [24,25], on the one hand, and the dual formulation of the problem [26], on the other.This algorithm focuses on minimising an upper bound of the generalization error instead of minimising the prediction error in the training sample (empirical risk minimization) [24].The usefulness of this algorithm is demonstrated by its expansion into scientific fields such as econometrics [26], health [27,28], electrical efficiency in cities [29], as well as energy consumption in buildings [25,30].Lastly, MLP neural networks have stood out in past years for their great capacity to model non-linear relationships between certain inputs and outputs, as well as for their massive interconnectivity [31][32][33].Furthermore, this type of Artificial Neural Network (ANN) has been applied to different areas of study such as chemistry [34], the environment [35,36], sensors [37] or energy analysis of buildings [38][39][40].
The aim of this paper is to estimate the HLC of an existing building through the prediction of building thermal demands using a methodology based on ML models.Specifically, three different methods are applied to a public library in the northwest of Spain and compared: XGBoost, SVR and MLP neural network.The dataset consists of hourly observations of two climate variables (outdoor temperatures and solar radiation) and two variables related to the thermal behaviour of the building (heating demand and indoor temperatures).In addition, to improve model training, three temporal variables (hour of the year, day of the week and hour of the day) are taken into account as model inputs.A comparison between the errors obtained by the different machine learning models is carried out on three different validation samples.Moreover, the accuracy of each of the models is quantified with CV(RMSE) and Normalized Mean Biased Error (NMBE), both recommended by the American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE), and their usefulness was demonstrated in [41,42].The novelty of this work lies in the application of machine learning models to estimate the HLC of a building through heating demand predictions.In this context, this paper contributes with a methodology that reduces the exigency of building monitoring, and heating demands will be accurately predicted.Additionally, this methodology does not depend on physical simulations, which require huge amounts of input data and specific knowledge and which have uncertainty in the evaluation of energy renovation or the energy certification of buildings.

Heat Loss Coefficient Calculation
The HLC is the most used Key Performance Indicator (KPI) to describe the building envelope energy efficiency.This coefficient reflects transmission heat losses through the envelope per degree difference between indoor and outdoor temperatures from walls, roofs and floors (UA(kW/K)) and ventilation and/or infiltration heat losses per degree difference between indoor and outdoor temperatures (Cv(kW/K))) [43].Following the method developed by Uriarte et al. [8], the HLC can be described as Equation (1): where U A stands for the building envelope transmission heat transfer coefficient (kW/K) and Cv stands for the infiltration and/or ventilation heat loss coefficient (kW/K).Moreover, the energy balance used to calculate the HLC, assuming stationary conditions, was developed by Uriate et al. [8,44], and it is presented in Equation (2): where Q k represents the heating gains (kW), K k represents the internal gains (kW) caused by occupants and electricity consumption (K k = K electricity,k + K occupancy,k ), (T in,k − T out,k ) summarizes the gap between temperatures inside and outside the building in degrees Kelvin and S a V sol stands for the solar gains (kW).Several terms of this heat exchange are difficult to measure for in-use buildings.For example, the solar gains are complicated to know, and therefore, they introduce an important source of uncertainty into the equation.Thus, in this study, only cold and cloudy periods are considered where solar radiation was very low; direct solar radiation can be considered null; and all the radiation can be perceived as purely diffuse [45].This is why in this study, direct solar radiation is not taken into account, and only diffuse solar radiation is considered.Another parameter that is difficult to estimate is the occupancy.Therefore, with the aim of reducing the sources of uncertainty, the study is developed during weekends when there is no occupancy.Then, the result of Equation (2) will give an idea of how well built the building is in terms of the enclosure of its envelope.
In this way, the HLC formula that is used in this analysis (average method), taking into account that the periods analysed in this paper were weekends with no occupation and in which there was only purely diffuse radiation, is shown in Equation (3):

Machine Learning Models
The different mathematical models (or black-box models) built to estimate the HLC of the analysed building are presented in this section.In this case, the three machine learning algorithms studied are XGBoost, SVR and MLP neural network.

Extreme Gradient Boosting
Gradient boosting is a meta-algorithm built on the basis of weak learners, like decision trees [19], with the aim of obtaining a strong ensemble learner [46,47].Specifically, XGBoost is a scalable and efficient way to carry out the implementation of a gradient boosting algorithm.It is remarkable for its ease of implementation and its high accuracy in predictions [20].This algorithm focuses on the idea of combining, in a final step, all the predictions made by a set of weak learners (additive training strategy [48]).Moreover, XGBoost is capable of simplifying the objective function with different combinations of predictive and regularization terms without loss in the optimal computational speed [19,20].The specific learning process is summarized as follows [18,20]: An initial learner is fitted to the whole sample of inputs.

•
A second model is fitted to the residuals of the first model to reduce its deficiencies.

•
These two learning steps are repeated until a particular stop criterion is reached.

•
The final predictions are obtained from the sum of the individual predictions of the learners used.The general function to obtain a prediction at step t, with additive training, is presented in Equation (4).
where G t (x i ) is the learner at step t, G (t−1) i the prediction at step t − 1 and x i the input variable.
On the other hand, to prevent the problem of overfitting while maintaining an optimal computational speed, XGBoost takes into account Equation ( 5) to evaluate the suitability of the model [17,20]: n being the number of observations, L a differentiable loss function and Ψ a regularization term that penalizes the complexity of the model [18].XGBoost expands the loss function into the second order to be able to optimize the problem quickly.Furthermore, several specific techniques can reduce the possible overfitting of the algorithm [18].One of them consists of, after each step of boosting, the weights recently added being scaled by a factor η (shrinkage).This process reduces the influence of the individual trees built, and therefore, the training will be slower and more efficient.
Lastly, XGBoost optimization requires the control of multiple parameters [19], and finding the best combination of them is important.In this analysis, the optimal combinations of parameters (max_depth, min_child_weight, subsample, colsample_bytree and learning_rate) are found through a k-fold cross-validation method (k = 10) [49] carried out on the different validation samples studied.

Support Vector Regression
SVR is a nonlinear kernel based regression model that focuses on finding the best regression hyperplane with the least structural risk in a high-dimensional feature space [25][26][27].The SVR function is represented in Equation ( 6): δ(x) being a nonlinear mapping that connects the input space to the feature space, b a bias term and w the weight coefficient vector.In this case, both w and b are estimated by resolving the following optimization problem [26,28]: where the constant C > 0 represents the trade-off between training error and model complexity, corresponds to a threshold value and l is the number of training patterns.As Huang et al. [28] and Vrablecová et al. [29] showed, once having resolved the optimization problem (Equation ( 7)) and taking the Lagrangian, the model solution can be reached with its dual representation (see Equation ( 8)): where α j , α * j are the Lagrangian multipliers ( =0) and the solution for the dual problem, b the bias term and K(x j , x) the kernel function based on the inner product δ(x j ), δ(x) .
Specifically, the model optimization for each of the validation samples studied is carried out through the tuning of certain parameters.In this case, the selected parameters were penalty C and term [24,29].With a cross-validation process (k-fold = 10) [49], different values of these parameters were evaluated, and the best adjustment was obtained depending on the validation sample considered.

•
An input layer (first layer), where the inputs are introduced.

•
An output layer (last layer), where the results obtained by the trained model are given.

•
Hidden layers (intermediate layers) positioned between the previous ones.They can be zero, one or more.
The specific neural network built in this study is composed of five layers (one input layer, one output layer and three hidden layers).The internal structure of neurons in each layer of the network is as follows: 100-100-100-50-1.This architecture is selected after a k-fold cross-validation (k = 10) study [51] in which the grid of different hidden layer options was between zero and four [52,53].On the other hand, in relation to the number of neurons in the network layers, the different options, as recommended by Vujicic et al. [52] and Doukim et al. [54], take into account the size of the sample and the number of inputs and outputs.
Moreover, due to the complexity of the problem, this grid of values was completed with more complex options such as: 50, 100, 200 and 400.
The neural network training was developed via backward propagation; errors were propagated and corrected through the network [55].In this way, the real outputs must be known.In addition, the training process was based on updating the weights with an average update (batch-learning), which was obtained by introducing all the patterns in the input file (an epoch) and accumulating the weight updates [56,57].The stop criterion used to avoid overfitting problems was the cross-validation due to its effectiveness in stopping with the best model generalization [58,59].The training will stop when the performance of the neural network, measured by the Mean Squared Error (MSE) and evaluated with a small part of the whole sample (test sample), stagnates or starts to decrease.Each MLP trained in this study used the Rectified Linear Unit (ReLU) as the activation function [60], a normal kernel initializer and the Adaptive Moment Estimation (Adam) optimizer [61].Lastly, the batch size with which the neural networks were trained was equal to 64, and the limit to the epochs in which the model fit did not improve was 100.Further information about the options and variations of the MLP training process can be found in [62,63].

Description of the Building
The methodology proposed was tested on a public library of the Faculty of Marine Sciences at the University of Vigo (see Figure 1) that is located in the northwest of Spain.The building has three floors that are interconnected, and it is completely monitored and has been used for research purposes many times.Therefore, the building, its HVAC system and its data acquisition system were further and more deeply described in other articles such as Cacabelos et al. [64,65], Fernández et al. [66] and Martínez et al. [40].The building envelope has a large, south-facing window (see Figure 1a), and its enclosures are made of different concrete and insulation material.Table 1 shows the properties and composition of each material layer of the walls, floor and roof.This analysis is focused on the estimation of the HLC of a building.The data available in this study to train the machine learning models were hourly observations between March 2016 and December 2017 of four variables.The variables considered were two describing the thermal behaviour of the building (thermal demand and indoor temperatures) and two describing the climate conditions (outdoor temperature and solar radiation).In addition, to find significant hours when the heating worked normally, only the hours with a thermal demand of more than 5 kW were selected (n = 5727).In this case, it was not necessary to have a continuous sample because the training did not take into account time lags in the explanatory variables.Therefore, three time variables (hour of the year, day of the week, and hour of the day) were introduced into the models to provide more information and thus to improve the training.The variables that were used as model inputs are presented in Figure 2. The model fit was carried out through a cross-validation process in which the whole sample was divided consecutively into two individual samples: training and testing.In the search for the optimal model and the selection of hyperparameters, the models were tested with different partitions (or subsamples) of the whole training sample (k-fold = 10) [49].In addition, the models, after being trained and tested with 10 different test samples, were validated with three independent samples to prove their efficiency in estimating the HLC of the building: These three samples had to comply with certain restrictions due to the specification of the HLC formula (see Section 2.1) and because of the singularities of the monitoring of the building studied (see Section 2.3.1).The restrictions for considering a period suitable for the calculation of the HLC are [8,44]:

•
Weekend: Due to the non-availability of occupation data, the period must be on the weekend when there was no occupancy in the building.

•
Cool period: The average difference between indoor and outdoor temperature must be 10 K or more.

•
Cloudy period: Solar radiation must be low: gains from solar radiation equal to or below 10% of the thermal demand.

•
Temperature stability: The average between indoor and outdoor temperature must be similar at the beginning and end of the period to ensure steady state conditions.

Validation and Error Assessment
The Coefficient of Variation of the Root Mean Squared Error (CV(RMSE)) and the Normalized Mean Biased Error (NMBE) were the error measures calculated to evaluate the accuracy of the models presented: Both measurements were used to compare the performance of the different models in the three validation samples.In addition, the CV(RMSE) was also taken into account to select the best trials of each model (with the lowest error) and, then, represented graphically in the Results Section.These measures have been used and their efficiency has been proven in similar studies [42,67,68].

Results and Discussion
A methodology, based on thermal demands' predictions made with black-box models, to estimate the HLC of a building is developed in this paper.In particular, the building under study was the public library of the Faculty of Marine Sciences at the University of Vigo.The available data were hourly observations of the variables presented in Figure 2 from March 2016 to December 2017; only taking into account the hours with a significative thermal demand (≥ 5 kW).In this analysis, three specific weekends were considered to study the performance of the models estimating the HLC through heating demand predictions.A comparison between the accuracy of each ML model analysed is presented in the following sections.
Section 3.1 presents the models performance in heating demand predictions and Section 3.2 a similar analysis for the HLC estimations.While in the thermal demand analysis, CV(RMSE) (Equation ( 9)) and NMBE (Equation ( 10)) were calculated for each of the models, in the HLC section, the errors were calculated based on an absolute variation rate.Furthermore, to represent the average performance of the different models, the predictions of the three validation samples were repeated 10 times (varying the subsamples where the model was tested).Thus, the numerical results shown are average errors obtained through the 10 trials, as well as their standard deviations.Finally, all figures shown in the following sections were created with the Python programming language [69].

Thermal Demand Analysis
The results of the heating demand predictions for the analysed building in the three validation samples are presented in this section in Figure 3 and Table 2.These predictions are important as they will be used to obtain the subsequent HLC estimations (see Section 3.2).Furthermore, in Figure 3, each of the algorithms is represented by the prediction that obtains the lowest CV(RMSE) among the 10 trials (best scenario).In the case of Sample 1 (Figure 3a) and taking into account the CV(RMSE) results, the XGBoost model presents the lowest average error (18.57%).The MLP neural network and SVR model show a worse performance with an average error of 19.84% and 21.31%, respectively (see Table 2).Moreover, Table 2 shows that in all models, the variability of errors in the 10 trials was relatively low (below ± 4), but MLP is the one that shows the lowest dispersion (±2.41).On the other hand, regarding the NMBE results, the lowest average error was obtained by the MLP model (−5.49%), while the other algorithms only managed to obtain negative average errors higher than 10% (−12.52% for XGBoost and −11.63% for SVR).In addition, in this case, while the variability of the NMBE results of XGBoost and MLP are similar and around ± 5 (see Table 2), the SVR results show a greater dispersion (above ± 8).In general, all the models, in the best scenario, efficiently reproduced the real behaviour of the thermal demand of the building analysed (see Figure 3a).Although the XGBoost model obtained better results in relation to the CV(RMSE), the MLP predictions showed a better overall adjustment to reality by obtaining a similar average CV(RMSE) and an average NMBE much lower than XGBoost.
In Sample 2 (Figure 3b), considering the CV(RMSE) results, the XGBoost algorithm and MLP neural network show a similar average performance.MLP obtained an average error of 17.38% and XGBoost 17.43%.In this situation, the SVR model shows better results than the other models with an average error of 16.61% (see Table 2).Additionally, while SVR and MLP present a similar error dispersion around ± 2, the XGBoost model is the one that presents the highest variability (above ± 4).With respect to the NMBE results, the SVR model again obtained the lowest average error (2.99%).The MLP neural network and XGBoost algorithm, on the other hand, present higher and negative average error (−4.01%and −8.40%, respectively).However, as shown in Table 2, the SVR model is the one that showed the greatest dispersion in the NMBE results (almost ± 7), even though the other models also showed an important variability.In Figure 3b, it is demonstrated that each of the algorithms, taking into account the best scenario, is capable of replicating the reality except for certain peaks.However, more specifically, the model that yielded the best average performance was SVR.
Regarding Sample 3 (see Figure 3c), the three models studied obtained average CV(RMSE) values above 20%.While the SVR algorithm and MLP neural network showed an average CV(RMSE) of 21.60% and 21.54%, respectively, XGBoost model obtained an average error around 29% (see Table 2).Furthermore, taking into account that the variabilities presented were not high, the MLP neural network obtained the least variable results (±2.33) and XGBoost the most variable (±3.81).In the case of the NMBE results, the MLP model stands out from the rest (see Table 2).It shows the lowest average of NMBE by far (0.25%).The average results of the other algorithms were higher than 10% and negative (−13.60% for SVR and −23.05% for XGBoost).On the other hand, the dispersion of the NMBE values among the 10 trials of this sample is high (above 4.5) in all the models, and the MLP neural network was the model with the greatest error dispersion (±6.19).In addition, as in the other validation samples, Figure 3c shows that the built models, in the best case scenario, are very close to the real values.
Table 2. Numerical results of the thermal demand predictions for all validation samples.The mean of the CV(RMSE) and the Normalized Mean Biased Error (NMBE) obtained through the 10 trials, besides the standard deviation (SD) of each of them, are presented.Lastly, it is demonstrated that all the models presented, in general, are capable of recreating reality (see Figure 3), obtaining optimal errors in all the samples studied (see Table 2).Concretely, they normally predict above the real values of the heating demand of the building analysed (see the negative NMBE results in Table 2).Furthermore, encompassing all the results, the model that performed best was the MLP neural network.In terms of CV(RMSE), it always yielded one of the best results, and in terms of NBME, it obtained much better results than the other algorithms in two of the three validation samples.

HLC Estimation Analysis
The specific characteristics of each of the validation samples studied in this work are analysed in Table 3 and presented in Figure 4.Moreover, the results of the HLC estimations, based on the previous heating demand predictions, for each of the three validation samples are shown in this section in Table 4.Although estimated from the heating demand predictions during a weekend, the HLC is represented as a single number (see Equation ( 3)).As in the preceding section, the average performance of the different algorithms among the 10 trials is summarized in Table 4.
Table 3. Thermal conditions of the three validation samples.These represent the mean difference between indoor and outdoor temperatures, the average heating demand (Q), the solar radiation gain (Rad) over the thermal demand and the average temperatures (indoor and outdoor) at the start (T • initial ) and at the end of the period (T • f inal ).HLC, Heat Loss Coefficient.First, Table 3 shows that the three validation samples fulfilled the conditions necessary to efficiently measure the HLC of the analysed building (see Section 2.3.2).Moreover, each of the samples has different HLC values.The main different thermal conditions of the samples, which caused slightly different HLC values, are also summarized in Table 3 and presented in Figure 4.The highest HLC value was obtained in Sample 1 (2.75 kW/K) due to the fact that the weight of the radiation gains, in relation to the heating demands, was the lowest among the samples (0.09%).This is related to the fact that the average thermal demand throughout this period was the highest and is a numerator value in the HLC formula (see Equation ( 3)).In addition, the average difference between indoor and outdoor temperatures, as shown in Figure 4a, was one of the smallest (12.48 K).These were the main reasons for obtaining a greater HLC (see Table 3).On the other hand, Sample 2 is where the HLC value is the lowest (2.15 kW/K) because, as shown in Figure 4b, the average difference between indoor and outdoor temperatures was the largest (15.25 K).This value, which is in the denominator of the HLC formula, together with an average heating demand significantly lower than in Sample 1 (32.72 kW) reduces the calculated HLC value (see Table 3).Lastly, in Sample 3 (see Figure 4c), an intermediate value of the HLC (2.46 kW/K) that came from the lowest average difference between indoor and outdoor temperatures (12.05 K) and the lowest average thermal demand (29.70 kW) was obtained.On the other hand, in the case of Sample 1, where the calculated HLC was 2.75 kW/K, the MLP neural network was the most accurate model (see Table 4).While this algorithm obtained an average absolute variation rate of 6.50%, the XGBoost and SVR models were only able to obtain an average absolute variation greater than 10% (12.52.% and 12.16%, respectively).Thus, the average HLC value estimated by MLP (2.90 kW/K) is the closest to the measured HLC value.Table 4 shows that all models obtained a higher average estimation than the calculated one (the same situation as in Section 3.1).Additionally, in relation to the variation rate dispersion, the MLP neural network was the one with the lowest variability among the errors (±4.5).However, in general, all models showed a significant high standard deviation.Table 4. Numerical results of the HLC estimations for all validation samples.The values shown summarize the performance of each of the models through 10 repetitions of the experiment.The mean of the absolute variation rates (together with the standard deviation), the mean of the estimated HLC values and the calculated HLC are presented.In Sample 2 the calculated HLC was 2.15 kW/K, and in relation to the average absolute variation values, the most accurate model was the MLP neural network (4.08%), but close to the SVR model (5.68%).As in the thermal demand section, the XGBoost model performed worse with an average absolute variation rate of 8.40% (see Table 4).Therefore, the HLC values estimated by the SVR and MLP models are very close to the calculated HLC value; while the average value obtained by SVR is 2.08 kW/K, the average value estimated for MLP is 2.23 kW/K.With respect to the dispersion of variation rate data and, as in Sample 1, Table 4 shows that the MLP neural network was the most stable model with a standard deviation below ±3.The other models presented values above ±4.
Regarding Sample 3, in which the measured HLC was 2.46 kW/K, the MLP neural network was again the model with the best average performance.While the XGBoost and SVR algorithms presented average absolute variation of 23.05% and 13.60%, respectively, the MLP model showed an average absolute variation of 4.97% (see Table 4).Therefore, the average HLC value from the MLP estimations (2.46 kW/K) was much closer to the calculated HLC value than those obtained by the other models.In addition, in this sample, all models obtained a high variability in their results: all standard deviations were higher than ±3.5.In this situation, the MLP neural network was the model with the lowest dispersion among its errors (±3.70).
Definitely, the HLC value that characterizes the studied building, calculated as the average of the presented results, was 2.45 ± 0.30 kW/K.Observing the results presented in Table 4 and taking into account the whole analysis (the results of the three validation samples), the model that presents the best average performance was the MLP neural network.It was the model that obtained the most stable results and had the lowest average absolute variation rate for all the samples analysed.In this way, it is demonstrated that it is possible to estimate the HLC of the analysed building with an absolute error around 4 or 6% if an MLP model is used to make the necessary thermal demand predictions.On the other hand, if an SVR algorithm is used, the error increases to 5-13%, and if the model is XGBoost, the errors vary between 8 and 23%.

Conclusions
A new methodology for estimating the HLC of a building is presented in this paper.It is based on the introduction of thermal demand predictions obtained with machine learning models in the HLC formula.This study focuses on the analysis, on the one hand, of monitored data on heating demands and indoor temperatures belonging to the Science Library of the University of Vigo.On the other hand, two meteorological variables (outdoor temperature and solar radiation) and three temporal variables (hour of the year, day of the week and hour of the day) are also taken into account.The aim of this paper is to show a methodology that allows the efficient estimation of the HLC value of a building without the need to control its heating demands (nor indoor temperatures if they are assumed to be constant).The search for the optimal methodology considers and compares three different machine learning models (XGBoost, SVR and MLP neural network).In addition, the performance of each one is evaluated and analysed both through its average accuracy in thermal demand predictions and its average accuracy in HLC estimations.
The research contribution of this work is the application of mathematical models to estimate the HLC of a building with low errors.In addition to reducing the necessity for monitoring, these models can be useful for detecting errors in measurements from sensors installed in the building.Moreover, the black-box models presented contributes with advantages compared to traditional research in building simulation.The use and application of the traditional building thermal simulation models are conditioned by the need for significant knowledge on a subject.In addition, these models need to control many different parameters related to the energy performance of a building.Nevertheless, machine learning models, which need less time for development than dynamic simulation methods, do not require specific prior knowledge and can be applied in numerous fields.The only important need for these models is the availability of a significant amount of data from which a behaviour pattern is extracted.Furthermore, the inputs introduced in the built models are variables typically monitored in buildings.Therefore, the methodology presented here is extractable to other studies and buildings.
The results obtained show that it is possible to efficiently estimate the HLC value of a building over specific time periods with black-box models.To this end, it is important to obtain thermal demand predictions, which are used as inputs in HLC estimations, with average errors lower than the values proposed for the calibrated models.The results also demonstrate that the MLP neural network is the algorithm with the best average performance in HLC estimation (more stability and higher average accuracy in all samples studied).The SVR model shows a close average behaviour, but XGBoost, except in Sample 1, presents a much worse performance than the other two.In the first validation sample, in which the measured HLC is 2.750 kW/K, only the MPL neural network is capable of obtaining an average absolute variation rate below 10% (6.50%).The SVR and XGBoost models obtain an average variation of 12.16% and 12.52%, respectively.On the other hand, in the second validation sample, where the calculated HLC was 2.146 kW/K, both the MLP and SVR models performed better than XGBoost.While the first two obtain an average absolute variation rate of 4.08% and 5.68%, respectively, XGBoost shows an average variation of 8.40%.Lastly, in the case of the third validation sample, with a measured HLC value of 2.464 kW/K, the MLP neural network yields an average absolute variation rate far from the other algorithms (4.97%).The SVR and XGBoost models are only able to yield an average absolute variation of 13.60% and 23.05%, respectively.Furthermore, regarding the dispersion in error data, MLP model is the one that shows the most stable results in all validation samples.The other algorithms present similar variability between them, but higher than the one obtained by the MLP model.Definitely, taking into account all the results presented, the HLC value of the analysed building is 2.45 ± 0.30 kW/K.
From an energy point of view, the conclusion is that efficient predictions related to the thermal conditions of a building and, in addition, made by machine learning models can be used to efficiently estimate its HLC.This is demonstrated in this paper with three different validation samples that fulfil the necessary conditions to calculate the HLC.The most accurate model, which in this case is the MLP neural network, is able to estimate the HLC of the analysed building with an average absolute variation rate of around 5% and with a standard deviation of around ±3. On the other hand, the main limitation of this research is the many restrictions on finding suitable time periods for calculating the HLC.In this case, the unavailability of occupation data means that only weekends are studied.For this reason, some possible future lines of research are similar analyses considering more data such as occupation or extending the study to more general situations.

Figure 1 .
Appearance of the analysed building: (a) exterior and (b) interior.

Figure 2 .
Figure 2. Summary of the training and prediction process.On the left, the input variables of the models.On the right, the objective estimations of the Heat Loss Coefficient (HLC).

Figure 3 .
Results of thermal demand predictions in all samples studied: (a) Sample 1; (b) Sample 2; (c) Sample 3.Each machine learning model is represented by the prediction curve with the lowest CV(RMSE) among the 10 experiment trials.

Figure 4 .
Summary of the thermal conditions of each of the validation samples: (a) Sample 1; (b) Sample 2; (c) Sample 3. Solar radiation and indoor and outdoor temperatures affecting the analysed building during the specific time periods are represented.

Table 1 .
Composition and properties of the enclosures of the analysed building.