Machine Learning Models for the Prediction of Energy Consumption Based on Cooling and Heating Loads in Internet-of-Things-Based Smart Buildings

: In this article, the consumption of energy in Internet-of-things-based smart buildings is investigated. The main goal of this work is to predict cooling and heating loads as the parameters that impact the amount of energy consumption in smart buildings, some of which have the property of symmetry. For this purpose, it proposes novel machine learning models that were built by using the tri-layered neural network (TNN) and maximum relevance minimum redundancy (MRMR) algorithms. Each feature related to buildings was investigated in terms of skewness to determine whether their distributions are symmetric or asymmetric. The best features were determined as the essential parameters for energy consumption. The results of this study show that the properties of relative compactness and glazing area have the most impact on energy consumption in the buildings, while orientation and glazing area distribution are less correlated with the output variables. In addition, the best mean absolute error (MAE) was calculated as 0.28993 for heating load (kWh/m 2 ) prediction and 0.53527 for cooling load (kWh/m 2 ) prediction, respectively. The experimental results showed that our method outperformed the state-of-the-art methods on the same dataset.


Introduction
In information and communication technology, the Internet of things (IoT), as stateof-the-art technology for intelligent interconnectivity, has recently been presented to communicate at any time, from anywhere, and through any object.The IoT is extensively utilized in different fields, e.g., manufacturing [1], home [2], agriculture [3], healthcare [4], environment [5], military [6], retail [7], and sports [8].It can be used in a great variety of applications for different purposes in mentioned fields, e.g., temperature control, appliance control, communication, quality control, threat analysis, situational awareness, risk assessment, patient care, fitness trackers, crop management, fire detection, species tracking, weather prediction, traffic flow, smart parking, theft protection, inventory control, and focused marketing.Using IoT-based solutions provides many opportunities for different processes, intelligent devices, real-time applications, and operating platforms to facilitate the accessibility of specific information and services, to enhance people's lifestyle as an enabler in various environments, especially in industry [9,10].
An essential subfield of computer science that IoT can use is machine learning which aids computer software in making a prediction from former data.Based on it, the learning process can be grouped into four different types: supervised learning, unsupervised learning, semisupervised learning, and reinforcement learning.In this study, we focused on supervised learning that builds a model from historical data to be able to predict an output value associated with a particular input vector.
Rapid developments in various information technologies have simplified the advent of Internet-based devices that deliver observation and measurement from the real physical world.Thus, the total number of such devices or IoT is overgrowing and leads to a high volume of data generated by different IoT and considered by the location and time dependency, with various modalities and varying data quality.As a result, intelligent analyses of such data are the crucial means of developing IoT applications [11].This study focuses on building intelligent models for the prediction of energy consumption in IoT-based smart buildings.
According to [12], buildings in cities consume 70% of the primary energy, in which the most energy-consuming part is the HVAC (heating, ventilation and air conditioning) system.Therefore, predicting and optimizing energy consumption in IoT-based buildings through machine learning algorithms is an essential human need and economic and social development factor [12], which we focus on in this study.That means that an accurate prediction of heating load and cooling load in different IoT-based buildings through the proposed model can lead to optimizing energy consumption, which implies a small but necessary step to prevent global warming.Moreover, considering factors that affect energy consumption, the heating load (HL) is the amount of heat energy added to an environment to keep its temperature in a satisfactory manner for the residents.The cooling load (CL) is the amount of heat energy removed from an environment to similarly keep its temperature satisfactorily for the residents.The heating and cooling loads which are named thermal loads, consider the construction features of buildings.Prediction of the CL and HL from simple properties of the buildings such as surface area, height, orientation, and so on, might assist in determining the energy performance of the buildings (EBP).It can also assist decision-makers in allocating resources to reconstruction measures, which can have both long-term and short-term benefits for cost savings, energy efficiency, and environmental health.The main requirements of predicting HL and CL in buildings are to reduce energy consumption, manage energy demands, reduce operational cost, and reduce emissions of harmful gases.In IoT-based buildings, air-conditioning or heating devices may handle the heating and cooling Loads smartly.This process will improve energy consumption through an efficient prediction based on building features to keep the temperature at a suitable level.
The main contributions of this study can be listed as follows.(i) It proposes novel predictive models for cooling and heating Loads in IoT-based smart buildings by applying various machine learning techniques to the data and considering features to have efficient energy consumption.(ii) It is the first study that uses both the tri-layered neural network (TNN) and maximum relevance minimum redundancy (MRMR) algorithms together to predict energy consumption in IoT-based smart buildings.The structure of the neural network was designed by considering many aspects such as the number of nodes, activation function, and symmetry property.(iii) Our study is also original in that it proposes a multitarget learning solution, unlike the traditional single-target learning studies.(iv) The experimental results showed that our method outperformed the state-of-the-art methods on the same dataset.
The rest of the paper is organized as follows.In the following section, a recent literature review on machine learning for IoT systems is given.In Section 3, the proposed model is described.Section 4 explains the experiments that were carried out in this study.In the next section, the obtained results are presented.In Section 6, the related conclusions and future works are described, respectively.

Literature Review
In the recent past, some machine learning studies have also been conducted with or without taking into account the symmetry concept.Gaber et al. (2022) proposed an intrusion detection method based on machine learning to distinguish the injection attacks in smart-city IoT for security.As indoor wireless networks include more than 80% of the IoT networks for smart cities, security and privacy challenges have become a serious concern for intelligent IoT devices.Thus, they applied SVM, RF, DT, recursive feature elimination, and constant removal algorithms to the public AWID dataset, and used a t-test to analyze the results.According to the results, the decision tree method could be used to recognize injection attacks by utilizing just eight features with 99% accuracy [13].Mondal et al. (2021) implemented a machine learning model with IoT devices to provide a smart healthcare ecosystem, which can lead to improvement in the healthcare industry.They gathered the dataset from wearable sensors and used various wearable devices and cloud computing technologies.Therefore, this investigation conquers the challenges of wearable and implanted healthcare body network connections [14].Siaterlis et al. (2022) designed and developed a framework to monitor the condition of harsh operating environments by means of IoT, including a knowledge graph in industrial production procedures for condition monitoring and predictive maintenance of assets, which can support personnel in decision-making and supervision processes.In their study, they aimed to apply semantic artificial intelligence and machine learning for approximating the remaining useful life of the monitored assets.Furthermore, they used a real dataset over five years from an aluminum-producing company and proved the usefulness of the proposed solution for practical applications [15].Junior et al. (2022) proposed a method in the field of IoT smart agriculture to reduce the data on machine learning algorithms for fog computing because of cloud disconnections that usually occur in the countryside.Their proposed approach collects and stores data in a fog-based intelligent agricultural surrounding.Moreover, various data-reduction approaches were used to preserve the data's time-series nature.Furthermore, the k-means and latent classification model (LCM) algorithms were applied to two real datasets.They achieved higher reduction results than the previous works [16].Tiwari et al. (2021) established an ensemble machine learning approach for ocean IoT attack detection on the basis of the improved light gradient boosting machine algorithm.Their model was proposed to protect the marine IoT environment from cyberattacks and destructive activities.As a result, the dispersed IoT attacks could be controlled in more profound marine environments with lower computational costs, and higher accuracy was achieved and evaluated with various metrics.Their method presents a hopeful future for IoT applications in the ocean environment [17].Fard and Hosseini (2022) aimed to investigate the properties of a building that influence the amount of energy consumption inside it by means of IoT concept and machine learning algorithms, namely univariate linear regression, RF, KNN, AdaBoost, and neural network.They utilized the energy efficiency dataset, and as a result, the overall height of buildings was introduced as the most important feature impacting energy consumption.Moreover, the AdaBoost algorithm was introduced as the best algorithm for heating and cooling loads [18].
Cakir et al. ( 2021) created an industrial IoT-based condition monitoring system at a low cost.As it is crucial to detect defective bearings earlier than reaching a critical level, it was predicted by machine learning algorithms, including SVM, DT, RF, and KNN.Furthermore, their system can notify the related maintenance team to take the necessary measures in critical events [19].Rahman et al. (2022) presented a machine learning and IoT-based farming system that enables intelligent control to categorize poisonous and edible mushrooms.As automation was an essential need for farmers, they preferred to move from traditional methods to modern ones.In their method, remote monitoring and management (RMM) and sensor technologies had been included.Additionally, various machine learning algorithms have been used, including DT, SVM, KNN, and RF.The accuracy of their model is very high, which can be efficient in mushroom farming [20].Meghana et al. (2021) proposed an approach to collect the data on social IoT.Moreover, the performance of different machine learning algorithms on its data was investigated.The result of their study revealed that artificial neural networks and decision tree algorithms achieved a good performance in comparison with other machine learning algorithms.In contrast, KNN was shown to have the weakest performance in most cases.Therefore, it resulted that applying machine learning algorithms to data aggregation led to better network performance in comparison with the entire dataset [21].
Khan and Al-Badi (2020) investigated the various open-source machine learning platforms from the programming language, implementation, and usage aspects.Nowadays, industries need machine learning methods to analyze huge amounts of datasets, which are generated through applications, smart devices, industrial systems, and sensors.Such generated data have their specific properties, and thus, it may be difficult to understand and use newly developed models for machine learning.In their work, different types of machine learning algorithms (linear regression, support vector machines, decision tree, and random forest) and related frameworks (Tensorflow, H2O, Caffe, PyTorch, Microsoft Cognitive Toolkit, etc.) were examined by the data of IoT systems.The optimal selection of the machine learning frameworks for applying various models was PyTorch and Tensorflow, among the others [22].
Our work differs from the previous studies in four important aspects.(i) It proposes novel predictive models to predict energy consumption in IoT-based smart buildings.(ii) It is the first study that uses both the tri-layered neural network (TNN) and maximum relevance minimum redundancy (MRMR) algorithms together for the prediction of cooling and heating loads in buildings.(iii) Our study is also original in that it proposes a multitarget learning solution, unlike the traditional single-target learning studies.(iv) Our method achieved better performance than the state-of-the-art methods on the same dataset.

Description
This study proposes novel machine learning models for the prediction of cooling and heating loads in IoT-based smart buildings.It is the first study that uses both the tri-layered neural network (TNN) and maximum relevance minimum redundancy (MRMR) algorithms together to predict energy consumption in buildings.Our study is also original in that it proposes a multitarget learning solution that predicts two outputs: heating load (Y1) and cooling load (Y2), unlike the traditional single-target learning studies.
Figure 1 shows the general overview of the proposed model.An energy efficiency dataset is analyzed by using some data-preprocessing techniques.Although the concept of symmetry is widely used in many topics, it is almost not discussed related to the distribution of building features for the prediction of energy consumption based on cooling and heating loads.After data analysis, the feature-selection algorithms, namely maximum relevance minimum redundancy (MRMR), F-test, and Regressional Relief version-F (RReli-efF), are used for the mentioned dataset features.Based on [23], MRMR was finally chosen as the feature-selection algorithm in all experiments of this work, which uses an incremental greedy strategy.After the feature-selection step in the proposed model, Bayesian optimization is used to tune the hyperparameters of a model on a validation dataset, e.g., in GPR, for fitting the model.The improvement of the acquisition function is expected per second plus.It is regarded for a number of iterations in the implementation of this model.Moreover, in the next step, the k-fold cross-validation technique is used to partition the related data into folds and estimate the accuracy of each fold to decrease the risk of underfitting or overfitting.The k-fold cross-validation is a technique that randomly divides the dataset into k equal-sized subparts (called folds).At each step, the k-th part of the dataset is regarded as the validation data for testing the model, and the remaining k − 1 subparts are used as training data to construct a classifier.This process is repeated k times such that all the subparts are successively employed for validation.In the end, the k results from the folds are averaged to determine performance.
The proposed approach assesses ten different machine learning regression algorithms, namely bagged tree (BaT), fine tree (FT), boosted tree (BoT), coarse tree (CT), medium tree (MT), tri-layered neural network (TNN), Gaussian process regression (GPR), stepwise linear regression (SLR), linear regression (LR), and support vector regression (SVR) with various parameters by training 60 models in several experiments.After that, performance evaluations of these algorithms are made in terms of different metrics, including meansquare error (MSE), MAE, and root-mean-square error (RMSE).MAE takes the absolute difference between the actual and predicted values and averages it across the dataset.Hence the lower MAE means the higher accuracy of a model.The TNN model is selected as the best predictor to make predictions for cooling load and heating load in IoT-based smart buildings, returning the energy consumption to the server node and notifying the IoT devices.
To have a better understanding of the proposed model, an example architecture is shown in Figure 2. In this model, by connecting the IoT devices and communication modules inside a smart building, the extracted knowledge from data can be delivered to the cloud through the Wi-Fi module to generate notifications and maybe alarms for smart devices (especially air-conditioning systems and IoT heating) and also for occupants (by e-mail and SMS) through different IoT devices such as a smartwatch, smartphone, laptops, PDAs, and so on.Here, symmetrical connections are assumed.After the prediction of heating load and cooling load by an intelligence model, the energy-consumption estimation is returned to the server node to notify the IoT devices, e.g., IoT air conditioning and IoT heating, and then take the necessary actions for balancing energy consumption inside the building.
The k-fold cross-validation is a technique that randomly divides the dataset into k equal-sized subparts (called folds).At each step, the k-th part of the dataset is regarded as the validation data for testing the model, and the remaining k − 1 subparts are used as training data to construct a classifier.This process is repeated k times such that all the subparts are successively employed for validation.In the end, the k results from the folds are averaged to determine performance.
The proposed approach assesses ten different machine learning regression algorithms, namely bagged tree (BaT), fine tree (FT), boosted tree (BoT), coarse tree (CT), medium tree (MT), tri-layered neural network (TNN), Gaussian process regression (GPR), stepwise linear regression (SLR), linear regression (LR), and support vector regression (SVR) with various parameters by training 60 models in several experiments.After that, performance evaluations of these algorithms are made in terms of different metrics, including mean-square error (MSE), MAE, and root-mean-square error (RMSE).MAE takes the absolute difference between the actual and predicted values and averages it across the dataset.Hence the lower MAE means the higher accuracy of a model.The TNN model is selected as the best predictor to make predictions for cooling load and heating load in IoTbased smart buildings, returning the energy consumption to the server node and notifying the IoT devices.
To have a better understanding of the proposed model, an example architecture is shown in Figure 2. In this model, by connecting the IoT devices and communication modules inside a smart building, the extracted knowledge from data can be delivered to the cloud through the Wi-Fi module to generate notifications and maybe alarms for smart devices (especially air-conditioning systems and IoT heating) and also for occupants (by e-mail and SMS) through different IoT devices such as a smartwatch, smartphone, laptops, PDAs, and so on.Here, symmetrical connections are assumed.After the prediction of heating load and cooling load by an intelligence model, the energy-consumption estimation is returned to the server node to notify the IoT devices, e.g., IoT air conditioning and IoT heating, and then take the necessary actions for balancing energy consumption inside the building.

Properties
Machine learning is one of the most important techniques that implements symmetry in computer science.The mentioned problem in this research is considered as a regression problem since the output attributes (heating load and cooling load) contain continuous data.
In machine learning, regression is concerned with the prediction of a continuous target variable based on the set of input variables.Therefore, as one of the most common statistical methods, regression analysis was performed in this study to determine the relationship between independent and dependent variables.Different machine learning algorithms (TNN, FT, CT, MT, BaT, BoT, GPR, LR, SLR, and SVR) were applied to the energy efficiency dataset.Among these algorithms, the tri-layered neural network was selected as the best algorithm for the current work so it could be efficiently used for future predictions.The parameter values of TNN are given in Table 1.The structure of the neural network was designed by taking into account many aspects such as the activation function, number of nodes, and symmetry property.An optimal design of NN architecture is important to speed up the training process and strengthen the generalization ability of the model, which means better fitting of the network to new (unknown) samples.In addition to TNN, the MRMR feature-selection algorithm was applied to select the features with the most impact.Moreover, Bayesian optimization and k-fold cross-validation techniques were involved in this research.Moreover, the MAE metric was used to evaluate the performance of the proposed model.The heating load (HL) is the amount of heat energy that is considered for an environment to keep its temperature in a satisfactory manner for the residents.The cooling load (CL) of a building is the amount of energy that is caused by energy transferred through the building envelope (walls, floor, roof, etc.) and energy generated by occupants, lights, and equipment.They are based on the principle that the energy required for space cooling and heating primarily depends on the difference in temperatures between outdoors and indoors.Both are very sensitive to the design and the operation of the buildings and are to be managed based on several physical parameters such as temperature, relative humidity, and air velocity within the environment.The HL and CL are also named thermal loads and are influenced by different physical factors, especially the construction features of buildings.Each building is regarded as a whole block from the viewpoint of a heat network, which means the heating and cooling loads of a building are influenced by several physical factors such as the building itself (i.e., geometry, layout, construction, mechanical equipment), the location, the climate, and the residents.They play major roles in the financial cost according to the different seasons.If the heating and cooling loads of a building are to be predicted, it is important to know the influence of these factors.The prediction of the HL and CL of a building is essential for planning the efficient next-day operation of air conditioning, ventilation, and heating equipment.In this context, the objective of this study is to build an intelligent model that predicts HL and CL under different input assumptions such as surface area, height, and orientation of buildings.

Algorithm
Algorithm 1 presents the pseudocode of the proposed model for the prediction of the cooling load and heating load.First, the data are prepared by considering the smart building parameters.After that, data preprocessing and analysis are undertaken using the dataset such that irrelevant, redundant, and noisy data are eliminated.Next, a feature rating is determined for each feature by using the MRMR algorithm.The most important features are selected and data are prepared for learning.After that, the predictive models are built by using the TNN algorithm separately for heating and cooling loads.Finally, the outputs are predicted by the models for each of the test query data.In this study, we designed four experiments in order to provide a deep analysis.The first experiment is related to predicting heating load (Y1) considering 70% training set and 30% testing set from the original data.The second experiment also focused on the prediction of heating load (Y1), but in this case, the 5-fold cross-validation technique was used.Similarly, in the third experiment, for the prediction of cooling load (Y2), 70% of the dataset and 30% of the dataset were considered as the training set and testing set, respectively.In addition, for predicting cooling load (Y2) in the fourth experiment, 5-fold cross-validation was used.
The proposed model was implemented in MATLAB ® Online™ R2022a, which is accessible from a web browser, is automatically updateable to the latest version, is a consistent platform with the latest features, and is fully integrated with drives.
As evaluation criteria, mean absolute error (MAE), mean-squared error (MSE), and root-mean-square error (RMSE) were utilized.MAE depends on the mean of the difference between predictions and real values, as given in Equation (1).MSE is the sum of the square error between the predicted output and actual output, as given in Equation (2).RMSE is another index reflecting the difference between actual and predicted values, as given in Symmetry 2022, 14, 1553 9 of 24 Equation (3).Based on these evaluation metrics, the best model was selected and used for the prediction.
where n is the number of samples, P i is the predicted value, and O i is the observed value.

Dataset Description
In this study, the "Energy Efficiency" dataset [24], which is available in the UCI (University of California Irvine) dataset repository, was used.It is a popular dataset that has been used by many studies [18,, has a high hit value in the repository, and has made a significant contribution to the field of energy.The dataset information is given in Table 2. Energy analysis was performed by using 12 different building shapes, which differ from each other considering the building parameters.This dataset consists of 768 samples and eight features (X1, X2, . . ., X8) to predict real-valued responses (Y1 and Y2).The features, their descriptions, and statistical information are included in Table 3. Relative compactness (RC) indicates the ratio of the surface area (A) to the corresponding volume (V) in the building and is calculated by the following formula: RC = 6V 2/3 /A.The shapes of the buildings with their corresponding RC values are shown in Figure 3.The glazing area (GA) represents the overall area measured through the rough opening, including the glazing, sash, and frame.In other words, GA is the total area of the wall, which is glass.GA affects the cooling and heating conditions of the building since it is exposed to external factors such as sun, wind, snow, and others.In the dataset, there are four kinds of glazing areas with different percentages of the floor area: 0%, 10%, 25%, and 40%.Glazing area distribution (GAD) indicates the distribution of the GA within the whole building.The dataset has six different distribution scenarios for each glazing area: (i) uniform: with 25% glazing on each side; (ii-v) north, east, south, and west: 55% in the corresponding direction and 15% on the remaining sides; (vi) no glazing areas.Skewness in Table 3 is a measure of the symmetry of the distribution for the related feature.

Feature Selection
Some features in the dataset are more significant than the other ones.This study used three different feature-selection algorithms (MRMR, F Test, and RReliefF) in order to cross-check results and ensure the robustness of the selected feature set.The results are in Tables 4-6 for experiment 1, Tables 7-9 for experiment 2, Tables 10-12 for experiment 3, and Tables 13-15 for experiment 4, respectively.These tables show weight values obtained by the algorithms to examine the importance of each predictor.A large weight value indicates that the corresponding predictor is more important.The parameter setting of the F Test was determined as follows: the number of bins for binning continuous pre- Figure 3 illustrates the general structure of the dataset, which varies in size and has four glazing regions with five distribution scenarios and four orientations.Note that the orientation consists of the north, east, south, and west.Each building form is composed of 18 elements (elementary cubes).The buildings were constructed with the most prevalent, newest, and similar materials, as well as the lowest U-value: floors (0.860 W/m 2 K; walls (1.780 W/m 2 K), windows (2.260 W/m 2 K), and roofs (0.500 W/m 2 K).The buildings are used for sedentary purposes (70 W) and are residential with a maximum of seven persons.The interior design has the following properties: 60% moistness, 0.6 clothing, 300 Lux illumination intensity, and 0.30 m/s airspeed.While the infiltration rate is 0.5 for air change rate with a wind sensitivity of 0.25 air changes/h, internal gains were set at latent (2 W/m 2 ) and sensible gain (5).Thermal characteristics were defined by a thermostat between 19 and 24 • C, a mixed mode with a 95% efficiency, 10-20 h of operation on weekends, and 15-20 h on weekdays.
It should be mentioned that splitting data into training and testing sets is an essential step for evaluating a machine learning-based model.Typically, in such separations, a great amount of data are used for training, and a small amount of data are used for testing.This process can reduce the effect of data discrepancies and lead to a better understanding of the model characteristics.
In the implementation, approximately 500 instances were used as training data, while the remaining instances were considered as testing data in the first and third experiments for predicting heating load and cooling load, respectively.Because there was no priority among the original dataset rows and having the same underlying distribution, this work used the common rule of 70% for training data and 30% for testing data in the preprocessing phase of splitting in the first and third experiments.This ratio was preferred, with the aim of providing comparability since some previous studies [25,36,39,40,42] used it.Moreover, k-fold cross-validation was used in the second and fourth experiments for the evaluation of the performances of the models.

Feature Selection
Some features in the dataset are more significant than the other ones.This study used three different feature-selection algorithms (MRMR, F Test, and RReliefF) in order to cross-check results and ensure the robustness of the selected feature set.The results are in Tables 4-6 for experiment 1, Tables 7-9 for experiment 2, Tables 10-12 for experiment 3, and Tables 13-15 for experiment 4, respectively.These tables show weight values obtained by the algorithms to examine the importance of each predictor.A large weight value indicates that the corresponding predictor is more important.The parameter setting of the F Test was determined as follows: the number of bins for binning continuous predictors was set to 10, missing values are discarded, and the weights of all features were equally set to 1.For the RReliefF algorithm, the nearest-neighbor parameter (k) was assigned to 10, so the algorithm found the nearest objects to a query instance from both the same class and the other different classes, called hits and misses, respectively.The verbosity level parameter of MRMR, which controls the amount of diagnostic information, was set to zero.The MRMR feature-selection technique distinguishes the features that impact the amount of energy consumption.According to this algorithm, "relative compactness" and "glazing area" properties affect prediction the most.According to the results of the MRMR, F Test, and RReliefF algorithms, "orientation" and "glazing area distribution" are less correlated with the output variables than other features.This conclusion has also been supported by previous studies with different methods such as random forest [36], gradient boosting machines [36], Pearson correlation [25], and Spearman rank correlation coefficient [12,38].Therefore, when constructing the models in this study, we used the feature subset that includes X1, X2, X3, X4, X5, and X7 variables, corresponding to relative compactness, surface area, wall area, roof area, overall height, and glazing area, respectively.

Results
The comparison of different machine learning models based on RMSE, MSE, and MAE are shown in  for four experiments of this study.The results revealed that the tri-layered neural network (TNN) algorithm performed better than other machine learning algorithms for the prediction of cooling load and heating load.For example, in the first experiment, TNN made predictions with small error values (kWh/m 2 ): 0.43101, 0.18577, and 0.28993 in terms of RMSE, MSE, and MAE, respectively.The TNN algorithm with the MRMR feature-selection method obtained the best scores for heating load and cooling load predictions in the first and fourth experiments, with 0.28993 and 0.53527 MAE values (kWh/m 2 ), respectively.Figure 4 shows the critical difference (CD) diagram, which illustrates the average rank of each model over four experiments.In the ranking process, each algorithm is rated according to its MAE value on the corresponding dataset.This process is performed by assigning rank 1 to the most accurate algorithm, rank 2 to the second best, and so on.In the case of ties, the average of the ranks is assigned to each algorithm.Figure 4 is useful to show the differences among various machine learning algorithms.The lower the rank (further to the left), the better performance of a model under the MAE metric compared to the others on average.In Figure 4, we observe that the TNN algorithm acquired the lowest average ranking (1) on MAE, indicating that it is the best among all comparative algorithms.TNN significantly outperformed its competitors on the MAE metric regarding predictive accuracy.Therefore, we can safely say that TNN is superior to the others with the lowest average ranking.The BaT and MT methods are tried, and similarly, the performances of LR and SLR are the same. I fact, the CT method was not performing well compared to other methods.The "true response" versus "predicted response" graphs are presented in four experiments in Figures 5-8 for heating load and cooling load prediction.A perfect regression model has a true response equal to the predicted response; hence, all points lie on a diagonal line.The vertical distance of any point from the line indicates the error of prediction for this point.In this study, the predictions were scattered no farther from the line.Therefore, it can be concluded that the models have small errors in all the experiments.The "true response" versus "predicted response" graphs are presented in four experiments in Figures 5-8 for heating load and cooling load prediction.A perfect regression model has a true response equal to the predicted response; hence, all points lie on a diagonal line.The vertical distance of any point from the line indicates the error of prediction for this point.In this study, the predictions were scattered no farther from the line.Therefore, it can be concluded that the models have small errors in all the experiments.
The "true response" versus "predicted response" graphs are presented in four experiments in Figures 5-8 for heating load and cooling load prediction.A perfect regression model has a true response equal to the predicted response; hence, all points lie on a diagonal line.The vertical distance of any point from the line indicates the error of prediction for this point.In this study, the predictions were scattered no farther from the line.Therefore, it can be concluded that the models have small errors in all the experiments.The "true response" versus "predicted response" graphs are presented in four experiments in Figures 5-8 for heating load and cooling load prediction.A perfect regression model has a true response equal to the predicted response; hence, all points lie on a diagonal line.The vertical distance of any point from the line indicates the error of prediction for this point.In this study, the predictions were scattered no farther from the line.Therefore, it can be concluded that the models have small errors in all the experiments.

Comparison with the State-Of-The-Art Studies
In order to show the superiority of our method, we compared it with the state-of-theart methods in the literature [18,.Some of them are tree-based methods that build the model in the tree architecture by splitting the dataset into various subsets, consisting

Comparison with the State-Of-The-Art Studies
In order to show the superiority of our method, we compared it with the state-of-theart methods in the literature [18,.Some of them are tree-based methods that build the model in the tree architecture by splitting the dataset into various subsets, consisting

Comparison with the State-of-the-Art Studies
In order to show the superiority of our method, we compared it with the state-ofthe-art methods in the literature [18,.Some of them are tree-based methods that build the model in the tree architecture by splitting the dataset into various subsets, consisting of decision nodes and leaf nodes, such as the mathematical programming tree (MPtree) [50], model tree regression (M5P) [44], conditional inference tree (CTree) [33], evolutionary tree (Evtree) [50], StatTree [33], classification and regression tree (CART) [34], and reduced error pruning tree (REPTree) [44].Some of the methods were combined with an optimization algorithm to build one optimal model for predicting the target, such as particle swarm optimization (PSO) [28], optics-inspired optimization (OIO) [26], teachinglearning-based optimization (TLBO) [30], whale optimization algorithm (WAO) [41], ant colony optimization (ACO) [12], and Harris hawks optimization (HHO) [43].Ensemble learning-based methods have also been used for predicting heating and cooling loads, such as AdaBoost [18], random forest [18,24,32,36,39,45,49,51,53], and regression tree ensemble [25].When we applied the random tree (RT) algorithm [58] to the same dataset, the MAE values of 0.3780 and 0.9349 were obtained for heating load (kWh/m 2 ) and cooling load (kWh/m 2 ), respectively.Therefore, the proposed method in this study is also more efficient than RT.
Table 20 presents the previous works along with the methods and the corresponding MAE values.Since the researchers used the same dataset as our study, the results were directly taken from the referenced study.According to the results, our model achieved lower MAE values than the previous models built on the same dataset.Therefore, it can be concluded from Table 20 that the proposed method outperformed the other methods.While the differences between outputs are small for some methods [18,25,34], the improvement provided by the proposed method over some state-of-the-art methods [26][27][28][29][30][31]37,41,43,46,54] is rather significant.
The results were validated by using a statistical test to ensure the differences in performance are statistically significant.We used the Wilcoxon Test, which is a wellknown nonparametric statistical test for comparing two groups.The p-values obtained for heating load and cooling load are 0.00459264 × 10 −21 and 0.00305302 × 10 −20 , respectively.Therefore, it can be concluded that the results are statistically significant since the p-values are smaller than the significance level (0.05).

Conclusions and Future Works
This paper focuses on the consumption of energy in IoT-based smart buildings, some of which have the symmetry property.This study's main aim is to predict cooling and heating loads in buildings.For this purpose, it proposes novel machine learning models by selecting the best features.It is the first study that uses both the tri-layered neural network (TNN) and maximum relevance minimum redundancy (MRMR) algorithms together to predict energy consumption in smart buildings.Our study is also original in that it proposes a multitarget learning solution, unlike the traditional single-target learning studies.
The experimental studies were conducted on an energy-efficiency dataset.The building-related features in the dataset were investigated in terms of skewness to determine whether their distributions are symmetric or asymmetric.As lower MAE means the higher accuracy of a model, and the lower training time (between 10 and 19 s) in all experiments is also an important factor for assessing predictive models, the results show the efficiency of the proposed method.The results also show that the relative compactness (X1) and glazing area (X7) are the features of buildings that have the highest effect on the amount of energy consumption inside the buildings.Moreover, the orientation (X6) and glazing area distribution (X8) are the other features that have the least effect on the energy consumption in buildings.The best mean absolute error was calculated as 0.28993 for heating load (kWh/m 2 ) prediction and 0.53527 for cooling load (kWh/m 2 ) prediction.The experimental results showed that our method outperformed the state-of-the-art methods on the same dataset.
For future works, the proposed model can be combined with thermal sensors inside the smart buildings to predict energy consumption not only based on the building features but also considering the temperature from different areas of the building.Moreover, as this study aims to balance the energy consumption in buildings precisely based on machine learning predictions, it can be developed into a smart energy recycling system to trade off cooling load and heating load in different areas of the building according to related features.As another trend, it can be advised to present a novel system that applies the security measurements for saving the related appliances of the building by considering the threshold temperatures.In addition, mobile phone apps can be implemented for real-time remote monitoring and controlling the energy consumption inside the buildings.In addition, generating daily, weekly, or monthly reports is possible through IoT-based buildings to have an efficient building energy management system (BEMS) through predictive models.

Figure 1 .
Figure 1.The proposed model in the IoT environment.

Figure 1 .
Figure 1.The proposed model in the IoT environment.

Figure 2 .
Figure 2. Model architecture in the IoT environment.Figure 2. Model architecture in the IoT environment.

Figure 2 .
Figure 2. Model architecture in the IoT environment.Figure 2. Model architecture in the IoT environment.

Figure 3 .
Figure 3. Block diagram depiction of the dataset.

Figure 3 .
Figure 3. Block diagram depiction of the dataset.

Figure 5 .
Figure 5. Predicted response versus true response for Y1 in experiment 1.

Figure 6 .
Figure 6.Predicted response versus true response for Y1 in experiment 2.

Figure 5 .
Figure 5. Predicted response versus true response for Y1 in experiment 1.

Figure 5 .
Figure 5. Predicted response versus true response for Y1 in experiment 1.

Figure 6 .
Figure 6.Predicted response versus true response for Y1 in experiment 2.Figure 6. Predicted response versus true response for Y1 in experiment 2.

Figure 6 .
Figure 6.Predicted response versus true response for Y1 in experiment 2.Figure 6. Predicted response versus true response for Y1 in experiment 2. Symmetry 2022, 14, x FOR PEER REVIEW 18 of 26

Figure 7 .
Figure 7. Predicted response versus true response for Y2 in experiment 3.

Figure 8 .
Figure 8. Predicted response versus true response for Y2 in experiment 4.

Figure 7 .
Figure 7. Predicted response versus true response for Y2 in experiment 3.

Figure 7 .
Figure 7. Predicted response versus true response for Y2 in experiment 3.

Figure 8 .
Figure 8. Predicted response versus true response for Y2 in experiment 4.

Figure 8 .
Figure 8. Predicted response versus true response for Y2 in experiment 4.

Table 3 .
Dataset features and their properties.

Table 4 .
F Test for Y1 in experiment 1.

Table 7 .
F Test for Y1 in experiment 2.

Table 10 .
F Test for Y2 in experiment 3.

Table 13 .
F Test for Y2 in experiment 4.

Table 20 .
Comparison of the proposed method against the state-of-the-art methods on the same dataset.