Next Article in Journal
RETRACTED: Pyatkina et al. Modeling and Management of Power Supply Enterprises’ Cash Flows. Energies 2021, 14, 1181
Previous Article in Journal
A Method for Formulating Delivery Curves of Clean Energy Bases Considering Load Demand of Receiving Provinces
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Perspective for Improving Energy Efficiency and Indoor Climate Towards Prediction of Energy Use: A Generalized LSTM-Based Model for Non-Residential Buildings

1
Department of Infotronics and Cybersecurity, Cracow University of Technology, Warszawska 24, 31-155 Krakow, Poland
2
AI4Smart SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ, ul. Pietrusińskiego 6/3, 30-222 Krakow, Poland
3
Department of Architectural and Construction Design, Cracow University of Technology, Warszawska 24, 31-155 Krakow, Poland
4
Department of Mechanical and Aeronautical Engineering, Wallace H. Coulter School of Engineering, Clarkson University, 8 Clarkson Avenue, Potsdam, NY 13699-5725, USA
*
Author to whom correspondence should be addressed.
Energies 2026, 19(10), 2446; https://doi.org/10.3390/en19102446
Submission received: 10 November 2025 / Revised: 16 March 2026 / Accepted: 24 March 2026 / Published: 19 May 2026
(This article belongs to the Special Issue Science and Practice of Energy Technology in Residential Buildings)

Abstract

The emergence of Artificial Neural Networks (ANNs) and their deep learning form called Artificial Intelligence (AI) opened a new path to improve energy efficiency and the indoor environment. A small collaborating network team is now extending the passive house approach, in a book entitled Retrofitting, the Energy and Environment of Buildings (Gruyter Publishers), and presenting generalized AI modeling in the following paper. This concept uses a long-term neural network with a short-term memory (LSTM) and three stages (training, validation, and test) for optimalization to hourly data collected for one full year. The non-residential buildings are less affected by the space occupants. This paper examines the feasibility of a uniform, climate modified technology, as our objective is to create a universal and affordable approach to buildings assisting in slowing the rate of climate change. Hence, the idea of creating a generalized neural network for predicting electricity consumption linked with weather conditions was born. This network is to forecast the electricity consumption for buildings linked to the local weather conditions, but different categories of buildings are put together in one set. While this will lower the large set precision, still our question is if such a network would work. If so, in the future we will create multi-variant, local residential systems with the capability of predicting energy use.

1. Introduction

1.1. Literature Review

Parallel to the introductory ANN characterization [1,2,3,4], the broader context of passive house retrofitting and energy efficiency in buildings, which motivates the present work, is discussed in [5]. There have been several well documented studies addressing several aspects of Artificial Neural Networks (ANNs).
Papers [6,7] addressed recurrent neural networks. For example, ref. [8] addressed the normalization of measured variables by a transformation called scaling, and refs. [9,10] were focused on a long series with temporary memory (LSTM) type of ANN to address the indoor climate in buildings.
A large dataset [11,12] that included non-residential buildings from three continents was made public in 2017 and explained in subsequent publications [13,14,15]. It created a foundation for several works. For instance, ref. [16] compared two statistical approaches: based on computational models and based on data patterns. In 2020, an autoencoder based on convolutional neural networks was proposed to detect outliers in a series of electricity consumption measurements [17,18]. Following the successful application of hourly energy consumption, where the model was trained and tested for each building separately, the method of building–electricity profile classification was extended to different service periods [19].
A model prediction for the electricity consumption of buildings located in Phoenix, United States [20] included data grouped in categories (Office, PrimClass, UnivClass, UnivDorm, UnivLab) and used different AI techniques (random forest, LightGBM, XGBoost) with an R2 fit quality of the neural network model scored in the range of [0.596; 0.935]. Energy ratings [21,22] in these types of building–energy research were calculated, outliers [23] were eliminated, and attention was paid to the classification of the buildings [24]. A few papers explaining the basic developments in ANNs [25,26,27], including Adam’s optimization [28,29], a need for attention to avoid overfitting [30,31], and dealing with the drop of further iterations [32], completes the basic literature review [8].
From recent advances, we would like to mention the International Energy Agency (IEA)’s New Report on Energy and AI (14 April 2025). The World Energy Outlook Special Report on Energy and AI was developed by the International Energy Agency (IEA). This report underscores the implications of AI for the global energy sector, including the applications of AI in buildings and particularly its potential to enhance energy efficiency and demand response. AI can optimize heating, ventilation, and air conditioning (HVAC) systems, enable demand response programs, adjust energy use during peak periods to reduce strain on the grid and lower energy costs as it integrates BMS, SMS and EMS systems existing in the building. However, the adoption of AI in buildings is limited by factors such as fragmented ownership, lack of digitalization, and inadequate incentives. Overcoming one of these barriers is an objective of our work.

1.2. Novelty of This Work

While an analysis of all the factors affecting the consumption of energy is necessary to understand their impact and interactions, the validity of the numerical models cannot be expanded beyond the case studied. However, the overarching objective of our network was to develop affordable, climate adapted, and universally applicable technologies for both new constructions and retrofitted buildings. Initial studies [1,2,3,4] demonstrated that ANN models achieved substantially higher precision compared with traditional numerical approaches. Access to publicly available data from 507 buildings across three continents provided the opportunity to construct a genuinely globalized AI model.
Applying the methodology of statistical preparation of the data, including the removal of outliers, to the data from Genome Project [6,7], we created a global aggregation of the data including the variety of building types and the climates in which these data were collected. This global dataset is not expected to yield a high precision model but will indicate if universal models can be established and what is the lowest precision AI network from which all individual models will be better.

2. Materials and Methods

The data used in this paper are publicly available.

2.1. Origin of Measurement Data

The Building Data Genome Project dataset [11,12] contains hourly electricity consumption measurements for 507 non-residential buildings from the years 2010–2016, where one-year data for each building is recorded. In addition to the electricity, the data characterizes the weather and surroundings and the energy efficiency of the building. All buildings are public utility or office buildings located in the United States, Europe, and Southeast Asia. After processing, the global dataset is used to validate the AI algorithms.

2.2. Software Platform and Code Availability

All data processing, model construction, training and evaluation were performed in Python 3.12 using the TensorFlow 2.13 deep learning framework with the Keras API. The LSTM neural network models were built using the keras.layers.LSTM layer within the tensorflow.keras.Sequential architecture. Data manipulation and statistical analysis relied on pandas 1.5 and NumPy 1.24, scaling of input attributes was performed using scikit-learn 1.3, and all visualizations were produced with Matplotlib 3.7. The computations were carried out in Jupyter Notebook (version 1.0.0) environments. Training of the neural networks was performed on an NVIDIA CUDA (GIGABYTE Technology, New Taipei City, Taiwan)-compatible GPU with a minimum of 32 GB of system RAM.
The complete source code of the data preprocessing pipeline, model optimization, and evaluation is publicly available (GIGABYTE Technology, New Taipei City, Taiwan) [33]. The repository contains seven sequentially numbered Jupyter Notebooks that reproduce all stages of this study—from the raw data processing through the data preparation and normalization, the LSTM architecture optimization, the hyperparameter optimization, to the final evaluation of the best model. The input data used in this study, the Building Data Genome Project dataset [11,12], is also publicly available.

2.3. Measurement Data Analysis

The data consists of building characteristics, hourly values of electricity consumption measurements, and information on weather conditions at the time of the data collection. Attributes divided into identifying, numerical, and qualitative will be presented in histograms and frequency graphs for the individual classes. Outliers of electricity consumption were identified using the interquartile range statistical method.

2.4. Building Characteristics

The list of all the attributes contained in the data files, together with the information on the percentage of missing values, contains the building identifier (uid) and the building nickname. The building nickname (nickname) is the name assigned to the building, e.g., Abbey. The building identifier (uid) is a short name that denotes a primary use of the space and the building nickname (nickname), e.g., Office_Abbey. The weather file name (newweatherfilename) refers to the CSV file with the weather data over time. The date of the first measurement (datestart) and the date of the last measurement (da-teend) are attributes that were included in the electricity consumption measurements themselves, so they were not included in the machine learning as separate attributes. However, they provide information on the times when the electricity consumption measurements were taken. The measurements in the dataset included 44.4% in 2015 and 41.6% in 2014–2015. The remaining measurements were taken in the years 2010–2013. Energy efficiency is measured using the Energy Star index, an indicator used in the United States and Canada [21].
An indicator value of 50 means average efficiency, while 75 denotes very good energy efficiency, which allows you to receive a certificate from Energy Star. Yet only 5% of the buildings have had their Energy Star index value determined (Figure 1). The type of heating has been determined for 25% of the buildings; in 90% of the buildings, it is gas, and in 3%, electricity. The buildings in the dataset were from two sectors: educational institutions (Education, 91.5%) and commercial facilities (Commercial Property).
Office space was indicated as the main use of the buildings (primaryspaceusage), with a score of 30.8% (Figure 2). Next were primary and secondary school classrooms, college laboratories, and college classrooms, with shares of 20.7%, 18.7%, and 16%, respectively. The last category was student dormitories, in 13.8% of the buildings.
The energy efficiency class (rating) is, in this project, expressed as the Building Energy Rating (BER) indicator on a scale from A (the most energy efficient) to G [22]. For the buildings examined, the low energy efficiency classes D, C and E prevailed (Figure 3). Buildings with a usable area from 399 m2 to 8163 m2 were the most prevalent.
The number of floors (numberoffloors) is also related to the usable area. In this study, 64.5% of the buildings were up to 3 floors (Figure 4); still, the number of floors is missing for 75% of the buildings.
The number of users (occupants) is missing for 79% of the cases, though 59% have up to 414 users. More than 2/3 of the buildings surveyed (68.4%) are in the United States and 28.2% are located in Europe.
Figure 5 shows a good distribution of climates, from cold/dry (New York, United States), cold/wet (Chicago, United States), and mild/wet (London, United Kingdom and Los Angeles, United States), to hot and dry (Phoenix, United States) and hot/wet (Singapore, Singapore).
Most of the buildings were constructed in the second half of the 20th century and in the 21st century. However, there are also cases of buildings constructed in the 19th and even 17th centuries (Figure 6).
Hourly electricity consumption measurements, taken for 365 consecutive days for each building, were divided into separate CSV files for each building. Each file contains a column with the timestamp of the measurement and the value of electricity consumption during the last hour expressed in kWh. As a part of the data preparation and analysis, the measurement data was read from the individual files together with the appropriate identifier. In the graph showing the course of electricity consumption of a smaller data sample covering 2 weeks (Figure 7), one can observe daily fluctuations in electricity consumption.
There are 4,442,544 measurements for all the buildings, approximately 8762 for each of the 507 buildings. The histogram of electricity consumption indicates that as many as 91.3% of all the measurements are in the first 3 intervals of the histogram—range [0; 315.01), and 95.9% of the measurements are in the first 5 intervals of the histogram—range [0; 525.01).
The box plot (Figure 8) comparing the range of electricity consumption values for the first 35 buildings in the set shows significant differences between the mean values and the interquartile ranges for the individual buildings.
To identify the buildings containing outliers in electricity consumption, the measurements were grouped by building, and the following descriptive statistics were calculated for each building: arithmetic mean (1), median (2), and standard deviation (3).
x _ = i = 1 n x i n
M e = { X n + 1 2 , w h e n   n   i s   a n   o d d   n u m b e r   X n 2 + X n 2 + 1 2 , w h e n   n   i s   a n   e v e n   n u m b e r  
σ = i = 1 n ( x i x _ ) 2 n
where
x i —value of electricity consumption;
n —number of electricity consumption values.
Then, the interquartile range was calculated for each of these statistics to identify outliers according to the following formulas:
I Q R = Q 3 Q 1
X o u t [ x m i n , Q 1 1.5 I Q R ) ( Q 3 + 1.5 I Q R ,   x m a x ]
where
Q 1 —first order quartile;
Q 3 —third order quartile;
X o u t —a set of outliers;
x m i n —minimum value;
x m a x —maximum value.
The buildings for which any of the computed statistics ( x _ , M e , σ ) fell within the outlier range as defined by Equation (5) were excluded from the dataset prior to the model training. In this way, 64 buildings (12.6% of all the buildings) were identified as having outliers. After removing the outliers, the set contained 3,881,832 measurements, and the histogram of electricity consumption measurements is as follows (Figure 9).
Figure 9 shows a much smaller data range [0; 461.5]; still, one may observe the concentration of values close to 0.
Separate files named weatherX.csv, where X are consecutive numbers starting at 0, contain data on the weather conditions over time. The files are assigned to the appropriate buildings based on their location using the attribute newweatherfilename, which contains the name of the appropriate CSV file. The following characteristics (attributes) contained in the weather files are used: Timestamp, TemperatureC, Dew PointC, Sea Level, Humidity, PressurehPa, VisibilityKm, Wind Direction, SpeedKm/h, Gust, Precipitationmm, Events, Conditions, WindDirDegrees, and Time zone.
The distribution of the temperature (temperature) (Figure 10) and the dew point follow a normal distribution, with most of the values accumulated in the range from 3.84 °C to 20.16 °C for the temperature and from −4.4 °C to 17.84 °C for the dew point. Both of the attributes have small missing values around 0.1%.
The values of air humidity are distributed uniformly across the whole range from 4% to 100%; however, values higher than 76% dominate, indicating a humid climate. The frequency of occurrence of individual wind directions (winddirection) is also uniform, with no wind (Calm) and westerly wind (West) as the most numerous classes.
The most common atmospheric conditions that prevailed during measurement collection were clear sky (Clear) and cloud cover of varying intensity (Mostly Cloudy, Overcast, Partly Cloudy, Scattered Clouds).

2.5. Preparation of Data for the Evaluation

Predicting energy consumption can be addressed only with statistically valid data. By excluding buildings with outlier electricity consumption, the range was reduced from 3150 kWh to 461 kWh. Furthermore, some of the attributes showed missing value percentages as high as 70%, and it was necessary to supplement them with values appropriate for the attribute type.
The data on electricity consumption did not have missing values, but the connection to the weather condition was made by connecting to the closest possible measurement of the weather condition using the timestamp.
For the weather attributes, the missing values were supplemented with the last known value of the parameter within a given building. Some of the attributes were removed, e.g., precipitation.
After the removal of identifying attributes (uid, nickname, newweatherfilename), time-related attributes already embedded in the measurement timestamps (datestart, dateend), and attributes with excessive missing values or insufficient predictive relevance (e.g., precipitation in mm), the following groups of attributes were retained as model inputs. Building characteristics included: primary space usage, energy efficiency rating, usable area, number of floors, number of occupants, year of construction, heating type, sector, and time zone. Weather characteristics included: temperature (°C), dew point (°C), sea level pressure (hPa), humidity (%), visibility (km), wind direction, wind speed (km/h), gust speed, atmospheric events, and weather conditions. The selection was based on the data completeness—those attributes with more than 70% missing values were excluded unless they could be reliably supplemented—and on their expected physical relevance to hourly electricity consumption patterns.
The qualitative (categorical) attributes were transformed using one-hot encoding. In this method, each categorical attribute with k distinct classes is replaced by k binary columns, where exactly one column takes the value 1 and the remaining columns take the value 0 for each observation. As a result of this encoding, each categorical attribute generated as many additional columns as the number of its distinct classes. For example, the attribute “primary space usage” with 5 categories (Office, Primary/Secondary Classroom, College Classroom, College Laboratory, College Dormitory) was expanded into 5 binary columns. The complete composition of the 133 input attributes after preprocessing and one-hot encoding is presented in Table 1.
The following attributes from the original Building Data Genome Project dataset [11,12] were excluded during preprocessing. Identifying attributes (uid, nickname, newweatherfilename) carried no predictive information. Temporal boundary attributes (datastart, dataend) were redundant with the measurement timestamps. The attribute mainheatingtype was removed due to near-complete overlap with heatingtype. The abbreviated usage label (primaryspaceuse_abbrev) duplicated primaryspaceusage. The annual schedule attribute (annualschedule) was excluded due to insufficient coverage (only 25 of 507 buildings). The precipitation attribute was removed from the weather data due to an excessive proportion of missing values (over 91% of observations). The remaining attributes were retained on the basis of data completeness—the missing values in the categorical attributes were imputed with the most frequent value (mode), while the missing values in the numerical attributes were imputed with the column mean—and their expected physical relevance to hourly electricity consumption patterns.
The data prepared in this way was divided into training, validation and test sets by buildings so that all the measurements from a given building were in one set, which ensured independence between the sets. The training set was used to train the neural networks, the validation set was used to evaluate the network in individual machine learning epochs, and the test set was used to evaluate the model after the machine learning process was complete. The training set contained the measurement data for 60% of the buildings, i.e., 2,357,112 time measurements for 303 buildings. The validation set contained measurement data for 20% of the buildings, i.e., 771,096 time measurements for 102 buildings. The test set contained measurement data for the remaining 20% of the buildings, i.e., 753,624 time measurements for 102 buildings.
Then, the data contained in the sets were scaled. The scaling operation transformed the values of the input attributes to the range from 0 to 1. The data prepared in this way were transformed into a form acceptable for the LSTM network. For this purpose, for each value of the output attribute (electricity consumption), the last 6 rows of input attributes were assigned within a given building. It was also necessary to remove the first 5 measurements of electricity consumption. The resulting dimensionality of the input data of the neural network for the training, validation and test sets was (2,347,011, 6, 133), (761,900, 6, 133) and (744,438, 6, 133), respectively.
The input sequence length of 6 hourly measurements was selected as a trade-off between capturing short-term temporal dependencies in electricity consumption and limiting the computational cost of model training. A window of 6 h covers one quarter of the daily cycle and is expected to encompass most intra-day transitions—for instance, the transition from off-peak to peak occupancy periods in non-residential buildings typically occurs within this time span. Shorter windows (e.g., 4 h) may not provide sufficient context for the model to distinguish between rising and falling consumption phases, while substantially longer windows (e.g., 12 or 24 h) would increase memory requirements and training time without necessarily improving the short-term prediction accuracy, given that the model predicts a single hourly value rather than a multi-step forecast. The systematic evaluation of alternative sequence lengths (e.g., 4, 8, 12, 24 h) remains a direction for future work and could further refine the balance between temporal context and model complexity.
To evaluate the precision and stability of the models, the mean squared error (formula above), mean absolute error (MAE), error (E) and absolute error (AE) were used, the formulas of which are presented below.
M A E = i = 1 n | y i y ^ i | n
E i = y i y ^ i
A E i = E i
where
y i —real value of observation;
y ^ i —predicted value of observation;
n —number of observations.

3. Results

3.1. Learning Process and Evaluation of Neural Network Models

The learning stage employed a Sequential neural network architecture consisting of a single LSTM layer followed by a Dense output layer with one neuron for regression. The model was compiled with mean squared error (MSE) as the loss function and the Adam optimizer with default learning rate. The Mean absolute error (MAE) and the mean absolute percentage error (MAPE) were additionally monitored during training. Each input sample was formed as a sliding window of 6 consecutive hourly time steps over the 133 input attributes, yielding an input tensor of shape (samples, 6, 133) and a corresponding scalar target value of hourly electricity consumption.
All the models were trained for a maximum of 100 epochs with a batch size of 1024. To preserve the temporal structure of the sequential input data, shuffling between epochs was disabled. Early stopping was applied by monitoring the validation loss with a patience of 10 epochs; when triggered, the model weights were restored to those of the epoch with the lowest validation loss. After training, each model variant was evaluated on the held-out test set using the same metrics.
The optimization of the neural network model was carried out in two stages. In the first stage, the optimal number of cells in the LSTM layer was selected by training networks with 2, 4, 8, 16, 32, 64, 128 and 256 cells. In the second stage, the hyperparameters of the best-performing architecture (32 cells) were optimized, including activation functions, dropout rates, and kernel and recursive regularization functions. The prediction errors of the selected model were presented in histograms divided into training, validation and test sets.

3.2. Optimization of the Neural Network Structure

The parameter that significantly determines the time needed to train and evaluate a neural network is its size. Networks with 2, 4, 8, 16, 32, 64, 128 and 256 cells in the LSTM layer were trained and validated five times to study the stability of the network and the impact of the initial weight values on the learning process. Each network had the same hyperparameter settings for each number of cells in the LSTM layer. Appendix A presents the architecture of the LSTM network structure.
A previously prepared training set was used for training. A previously prepared validation set was also provided for the data validation. The dropout and recursive dropout of the LSTM layer were set to 0.1. The mean squared error (MSE) was selected as the loss function, and the mean absolute error (MAE) was also calculated. The Adam algorithm was responsible for training the neural network.
The size of the data packet was set to 1024. To limit the training time, the number of epochs was limited to 15. Training was also stopped if the loss function did not change in the next five epochs. Comparing the mean squared error values of individual network structures for the training set showed that networks with 32 and more cells were promising.
The analysis on the test set indicates smaller differences, though noticeable, and the networks with 16, 32 and 128 cells seem to be the most promising with respect to the mean values and the interquartile range. Figure 11 shows the box plot of the mean absolute error for the validation tests, and again, the networks with the number of LSTM layer cells equal to 16 and 32 are characterized by the best stability and accuracy. Figure 11 shows the interquartile range of the mean absolute error of the obtained models under test conditions.
Figure 12 shows the graph of the interquartile range of the mean absolute error.
Effectively, all the studied cases of training, validation, and testing indicate the network with the number of LSTM layer cells equal to 32 is characterized by the best stability and prediction accuracy, and such a structure was therefore used for the optimization of hyperparameters.

3.3. Hyperparameter Optimization

The hyperparameter optimization of the model containing 32 cells in the LSTM layer was performed in two stages. In the first stage, the activation function, recursive activation function, dropout, and recursive dropout were selected. The configuration of the models is shown in the table below (Table 2).
The number of training epochs was increased to 100. The number of epochs to stop after no improvement in the loss function was increased to 10. Each model was trained once. The evaluation of the test models is shown in Figure 13, below.
In terms of the mean squared error value for the test set, the smallest error was shown by the models numbered 11, 8, 13 and 12 (Figure 13). Of these models, only model number 12 is in the top four best models evaluated for the validation set. The remaining models are characterized by larger errors.
The smallest error for the test was shown by the models numbered 12, 15, 10 and 11 (Figure 14). Of these models, the top four best models evaluated for the validation set included the models numbered 12 and 10. The remaining models have larger errors. Based on the analysis, model number 11 was selected as the best model, due to its having the smallest mean squared error and one of the smallest mean absolute errors for the test set. The model, with a sigmoid activation function, hyperbolic tangent as a recursive activation function, dropout equal to 0.2 and recursive dropout equal to 0.1, was used in the next stage of hyperparameter optimization.
In the second stage of hyperparameter optimization, the kernel and recursive regularization functions were selected. The model configuration is shown in the table below (Table 3).
The number of 100 training epochs was maintained, as well as the number of 10 epochs after which training is stopped due to the lack of improvement in the loss function value for the validation set. Each of the given models was trained once. The evaluation of the test models is shown below.
Figure 15 shows the comparison of the mean absolute error values of models obtained for the validation set, and Figure 16 shows the comparison of the mean absolute error values of models obtained for the test set.
Based on the analysis of the results of the 2nd stage of optimization, the best model turned out to be model number 5, which has an L1 kernel regularization function and a recursive one.

3.4. Evaluation of the Best Neural Network Model

As a result of the optimization of the structure and hyperparameters of the recurrent LSTM neural network, a model containing 32 cells in the hidden layer, a sigmoid activation function, a hyperbolic tangent as the recursive activation function, a dropout of 0.2, a recursive dropout of 0.1, and L1 as the kernel regularization function and the recursive regularization function was selected. Below is the analysis of the learning process and the error values for the individual observations from the validation and testing sets.
From the course of the learning process (Figure 17 and Figure 18), it can be concluded that the model started the overfitting phase in epoch 18. From this epoch, the value of the loss function for the validation set started to increase despite the decreasing value for the training set. The stop function detected this dependence and ended the learning process after 27 epochs, and the model weights were restored to the values from epoch 16 (the lowest value of the loss function for the validation set).
The histogram of the observation error (Figure 18) indicates an even distribution of errors between the training, validation and test sets. The concentration of the error value around value 0 is also visible; 73.4% of all the measurements are in the range [−34.4; 41.7). However, the entire range of the errors is from −364.6 to 143.3, with a tendency to underestimate the measurement values. A further analysis showed that 99% of the measurements in the range from percentile 0.5 to 99.5 are in the range from −203.3 to 81.7. In turn, 95% of the measurements in the range from percentile 2.5 to 97.5 are in the range from −132.3 to 61 (Figure 19).
Then, the absolute error was analyzed using a similar method. A one-sided interval was evaluated.
The histograms of the absolute error value (Figure 20, Figure 21 and Figure 22) confirm a correct distribution of errors between the training, validation and test sets. A one-sided distribution of the error value is also visible—close to the value of 0. In the range of up to 36.5 kWh of the error, 72.8% of all the hourly measurements of electricity consumption are found. A further analysis showed that 99% of the measurements have an error of less than 173.5 kWh of hourly electricity consumption (Figure 21). On the other hand, 95% of the measurements have an error of less than 104.169 kWh of hourly electricity consumption (Figure 22). The optimization of the structure of the neural network with one LSTM layer showed that the network with 32 cells in the LSTM layer is the most optimal size of the neural network among the tested sizes from 2 to 256 cells. This indicates that, depending on the complexity of the problem being studied, both a too simple and too complex neural network will not be characterized by the best prediction accuracy. A further optimization of the hyperparameters allowed for the selection of model parameters that are characterized by the lack of overfitting to the training set.

4. Discussion

In the learning stage, AI builds relationships and carries them to any new situation, assuming that they are similar to those encountered in the learning stage. Thus, the precision of the AI evaluation depends on how well the input file is prepared and whether all the impact factors are included in the analyzed matrix. A more complex LSTM network, with two, three or more LSTM layers, could have higher precision; however, this comes at the expense of the training speed. We have decided to use one LSTM layer because our objective was not related to the model precision but to the question of whether or not one may construct a universal, weather dependent energy model for space heating and cooling.
Such a model had to include all variables, tall and small buildings, hot and cold climates, important and not important characteristics for measured energy, and building and weather data. The input data did not include the airtightness of the building, because this critical building characteristic is only used in North America and Germany. Furthermore, the data were scaled (normalized) to the range (0, 1), modifying the impact of all factors. For this reason, the precision shown in the absolute error characterization (Figure 21 and Figure 22) can only be considered as a measure of dataset consistency and does not characterize the buildings. The results shown in this paper indicate that a universal energy model for different climates and diverse building characteristics can be developed for any defined type of building.
The mean absolute error (MAE) of approximately 30 kWh on the test set, when compared with the average hourly electricity consumption of approximately 77 kWh, yields a relative error of roughly 40%. This error level is largely attributable to the deliberate generalization approach adopted in this study—a single LSTM architecture was trained simultaneously on five distinct building usage types located across three continents and eight time zones, with buildings ranging from approximately 400 m2 to over 155,000 m2 in usable area. Furthermore, a substantial proportion of the building characteristic attributes contained missing values (up to 95% for the Energy Star index, approximately 79% for the number of occupants, and approximately 76% for the number of floors and heating type), which were imputed using column means and modes and may not reflect the true characteristics of individual buildings. The MAPE metric is additionally inflated by off-peak observations where actual consumption approaches zero, causing even small absolute errors to produce disproportionately large percentage values.
Several directions could be pursued to reduce the prediction error. Training separate models or incorporating building-type-specific layers for each primary space usage category would allow the network to learn usage-specific consumption patterns. Extending the input sequence length beyond 6 h could enable the model to capture full daily consumption cycles, while incorporating explicit temporal features—such as hour of day, day of week, and month—could improve the distinction between peak and off-peak periods. Applying attention mechanisms or Transformer-based architectures could further improve the selective weighting of the relevant time steps.
It should be noted, however, that the elevated error rate is an expected consequence of the research objective, which was to evaluate the feasibility of a single generalized model applicable across heterogeneous building types and geographic locations. Building-specific models would be expected to achieve substantially lower error rates but would not address the generalization question that motivated this study.

5. Future Research

As the Conclusion of this work indicates an energy solution though universal energy modeling, we may now define what the final energy model will look like. It will contain three sub-models, each with a different precision that may be integrated or not, depending on the quality of the monitoring results that can now be precisely defined. Monitoring must be included in the design of any new or retrofitted building. The future energy model will include three parts:
Part one is identical to what we do now, except for using hourly data for the transmission of heat through the whole building enclosure system (opaque and glazed together).
Part two relates to air flow through the building enclosure. At a minimum, it requires whole building airtightness characterization. We recommend that for each dwelling evaluated, we also collect hourly measurements of the air pressure difference in between the selected indoor and outdoor locations. Those measurements must be performed at the same height above ground. Furthermore, the information about the exterior wall orientation, the prevailing wind orientation, the height of the dwelling and the total building height must be included in the monitoring data.
Part three relates to the solar gains for the evaluated dwelling. We do not specify at this stage, because there is not enough practical experience, but it is likely that the hourly measurement of the total solar radiation on the horizontal planes (e.g., the roof) will be required in addition to some characterization of the ambient conditions.

6. Conclusions

Using the hourly data from diverse, non-residential buildings and a review of the literature led us to construct a globalized, universal AI model. The preparation of the data removed 64 buildings classified as outliers. Hourly measurements of electrical use, weather and building characteristics were presented, for which unidirectional and recurrent neural networks were constucted. The measurement data are divided into training, validation and learning sets and prepared for a long-term system and short-term memory (LSTM) model. The optimization of the ANN gave 32 cells in one LSTM layer. This model was further optimized for hyperparameters to find the smallest mean square and mean absolute error for the test set.
The best LSTM model was a neural network with a sigmoid activation function and hyperbolic tangent as a recursive activation function. The dropout coefficient is 0.2, and the recursive dropout is 0.1. The L1 function (lasso regression) was determined to be the best function of kernel regularization and recursive regularization. A generalized model for predicting the hourly electricity consumption for non-residential buildings based on weather conditions was created, and the analysis results confirm that an AI model may be created for the heating and cooling of any universal, climate modified technology for new or retrofitted buildings.
Nevertheless, the same data analysis revealed significant differences in the variation of the efficiency values for different buildings. The prediction error of the observations ranges from −134.3 kWh to 61 kWh for 95% of the measurements. The maximum absolute error for 95% of the measurements is 104.2 kWh (Figure 22). The mean absolute error was 32.4 kWh, which, in comparison to the mean hourly electrical consumption of 77 kWh (see Figure 9), is 40%, indicating a need for much more precise building categorization.

Author Contributions

Conceptualization, A.R., M.D. and P.D.; methodology, A.R., M.D. and P.D.; software, P.D., M.D., M.G. and A.R.; validation, P.D. and M.G.; formal analysis, P.D., M.D. and A.R.; investigation, P.D.; resources, P.D., A.R. and S.K.; data curation, P.D. and M.G.; writing—original draft preparation, P.D. and M.D.; writing, P.D., M.D., A.R., M.B. and S.K.; review and editing, A.R. and M.B.; visualization, P.D. and M.G.; supervision, A.R., M.D. and P.D.; project administration, A.R., M.D. and P.D. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

No new data were created in this study. The data used for the analysis can be found at: https://www.kaggle.com/datasets/claytonmiller/building-data-genome-project-v1, accessed on 26 August 2022. All the code used for the analysis is available in a public repository on the Piotr Dudek GitHub account: https://github.com/pdudekdev/Generalized-AI-based-model-for-non-residential-buildings, accessed on 20 February 2026.

Conflicts of Interest

Piotr Dudek and Mariusz Gorny was employed by the AI4Smart SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A

Figure A1. A standard LSTM memory block [34].
Figure A1. A standard LSTM memory block [34].
Energies 19 02446 g0a1

References

  1. Romanska-Zapala, A.; Bomberg, M. Can Artificial Neuron Networks be Used for Control of HVAC in Environmental Quality Management Systems? In MATEC Web of Conferences, Prague, Czech Republic, 3 July 2019; EDP Sciences: Les Ulis, France, 2019. [Google Scholar]
  2. Romanska-Zapala, A.; Dudek, P.; Górny, M.; Dudzik, M. Modular statistical system for an integrated environmental control. In E3S Web of Conferences, Tallinn, Estonia, 6–9 September 2020; EDP Sciences: Les Ulis, France, 2020; p. 621. [Google Scholar]
  3. Dudzik, M.; Romanska-Zapala, A.; Bomberg, M. A neural network for monitoring and characterization of buildings with Environmental Quality Management, Part 1: Verification under steady state conditions. Energies 2020, 13, 3469. [Google Scholar] [CrossRef]
  4. Dudzik, M. Towards Characterization of Indoor Environment in Smart Buildings: Modelling PMV Index Using Neural Network with One Hidden Layer. Sustainability 2020, 12, 6749. [Google Scholar] [CrossRef]
  5. Bomberg, M.; Yarbrough, D.W.; Saber, H. Retrofitting, Energy Efficency and Indoor Envirornment in Buildings; De Gruyter: Berlin, Germany, 2025. [Google Scholar] [CrossRef]
  6. Salehinejad, H.; Sankar, S.; Barfett, J.; Colak, E.; Valaee, S. Recent Advances in Recurrent Neural Networks. arXiv 2018, arXiv:1801.01078. [Google Scholar] [CrossRef]
  7. Bushkovskyi, O. How Business Can Benefit from Recurrent Neural Networks: 8 Major Applications. Available online: https://theappsolutions.com/blog/development/recurrent-neural-networks/ (accessed on 3 September 2022).
  8. Brownlee, J. How to Use Standard Scaler and MinMaxScaler Transforms in Python. Available online: https://machinelearningmastery.com/standardscaler-and-minmaxscaler-transforms-in-python/2020 (accessed on 3 September 2022).
  9. Olah, C. Understanding LSTM Networks. 2015. Available online: https://colah.github.io/posts/2015-08-Understanding-LSTMs/ (accessed on 4 September 2022).
  10. Calzone, O. An Intuitive Explanation of LSTM. 2021. Available online: https://medium.com/@ottaviocalzone/an-intuitive-explanation-of-lstm-a035eb6ab42c (accessed on 4 September 2022).
  11. Clayton, M.; Forrest, M. The Building Data Genome Project: An open, public data set from non-residential building electrical meters. Energy Procedia 2017, 122, 439–444. [Google Scholar] [CrossRef]
  12. Clayton, M.; Tian, J. Building Data Genome Project 1. 2017. Available online: https://www.kaggle.com/datasets/claytonmiller/building-data-genome-project-v1 (accessed on 26 August 2022).
  13. Clayton, M. Screening Meter Data: Characterization of Temporal Energy Data from Large Groups of Non-Residential Buildings. Ph.D. Thesis, ETH, Zürich, Switzerland, 2017. [Google Scholar]
  14. Clayton, M.; Forrest, M. Mining electrical meter data to predict principal building use, performance class, and operations strategy for hundreds of non-residential building. Energy Build. 2017, 156, 360–373. [Google Scholar] [CrossRef]
  15. Clayton, M. What’s in the box?! Towards explainable machine learning applied to non-residential building smart meter classification. Energy Build. 2019, 199, 523–536. [Google Scholar]
  16. Koste, K. Exploration, Clustering, and Day-Ahead Forecasting. 2019. Available online: https://www.kaggle.com/code/kevinkoste/exploration-clustering-and-day-ahead-forecasting (accessed on 26 August 2022).
  17. Fu, C. Timeseries FDD Using an Autoencoder [Meters]. 2020. Available online: https://www.kaggle.com/code/patrick0302/timeseries-fdd-using-an-autoencoder-meters (accessed on 26 August 2022).
  18. Fu, C. Prediction Results in New York. 2020. Available online: https://www.kaggle.com/code/patrick0302/prediction-rsults-in-new-york/comments (accessed on 26 August 2022).
  19. Bohao, X. Classify the Target Offices in Client-Group1. 2020. Available online: https://www.kaggle.com/code/xibohao/classify-the-target-offices-in-client-group1 (accessed on 26 August 2022).
  20. Zhenyu, D. Models Accuracy Comparison for Phoenix. 2021. Available online: https://www.kaggle.com/code/douzhenyu/models-accuracy-comparison-for-phoenix (accessed on 26 August 2022).
  21. How the 1-100 ENERGY STAR Score is Calculated. Available online: https://www.energystar.gov/buildings/benchmark/understand-metrics/how-score-calculated (accessed on 29 August 2022).
  22. Find Out What a Building Energy Rating (BER) Certificate Means for a Property’s Energy Efficiency and How It Is Calculated. Available online: https://www.seai.ie/home-energy/building-energy-rating-ber/understand-a-ber-rating/ (accessed on 29 August 2022).
  23. What Is the Interquartile Range Rule? How to Detect the Presence of Outliers. Available online: https://www.thoughtco.com/what-is-the-interquartile-range-rule-3126244 (accessed on 29 August 2022).
  24. Hancock, J.T.; Khoshgoftaar, T.M. Survey on categorical data for neural networks. J. Big Data 2020, 7, 28. [Google Scholar] [CrossRef]
  25. Sazlı, M.H. A brief review of feed-forward neural networks. Commun. Fac. Sci. Univ. Ank. Ser. A2-A3 Phys. Sci. Eng. 2006, 50, 1–7. [Google Scholar] [CrossRef]
  26. Feng, W. 19. Neural Network. 2017. Available online: https://runawayhorse001.github.io/LearningApacheSpark/fnn.html (accessed on 3 September 2022).
  27. Melcher, K. A Friendly Introduction to [Deep] Neural Networks. 2021. Available online: https://www.knime.com/blog/a-friendly-introduction-to-deep-neural-networks (accessed on 3 September 2022).
  28. Brownlee, J. Gentle Introduction to the Adam Optimization Algorithm for Deep Learning. 2017. Available online: https://machinelearningmastery.com/adam-optimization-algorithm-for-deep-learning/ (accessed on 3 September 2022).
  29. GeeksforGeeks. What Is Adam Optimizer? 2025. Available online: https://www.geeksforgeeks.org/deep-learning/adam-optimizer/ (accessed on 20 March 2026).
  30. IBM Cloud Education. Overfitting. Learn How to Avoid Overfitting, So That You Can Generalize Data Outside of Your Model Accurately. 2021. Available online: https://www.ibm.com/cloud/learn/overfitting (accessed on 3 September 2022).
  31. Lunartech. Mastering L1 and L2 Regularization: The Ultimate Guide to Preventing Overfitting in Neural Networks. 2025. Available online: https://www.lunartech.ai/directory/artificial-intelligence-horizons (accessed on 20 March 2026).
  32. Brownlee, J. A Gentle Introduction to Dropout for Regularizing Deep Neural Networks. 2018. Available online: https://machinelearningmastery.com/dropout-for-regularizing-deep-neural-networks/ (accessed on 3 September 2022).
  33. Dudek, P.; Górny, M.; Romańska-Zapała, A.; Dudzik, M. Generalized AI-Based Model for Non-Residential Buildings—Source Code. 2025. Available online: https://github.com/pdudekdev/Generalized-AI-based-model-for-non-residential-buildings (accessed on 12 March 2026).
  34. Staudemeyer, R.C.; Morris, E.R. Understanding LSTM—A Tutorial into Long Short-Term Memory Recurrent Neural Networks. arXiv 2019, arXiv:1909.09586. [Google Scholar]
Figure 1. Energy efficiency histogram. The x-axis represents Energy Star index values, while the y-axis indicates the number of buildings (count) within each index interval.
Figure 1. Energy efficiency histogram. The x-axis represents Energy Star index values, while the y-axis indicates the number of buildings (count) within each index interval.
Energies 19 02446 g001
Figure 2. Frequency of occurrence of the building’s usable area. The x-axis represents categories of primary space usage, and the y-axis indicates the number of buildings (count) corresponding to each usage category.
Figure 2. Frequency of occurrence of the building’s usable area. The x-axis represents categories of primary space usage, and the y-axis indicates the number of buildings (count) corresponding to each usage category.
Energies 19 02446 g002
Figure 3. Frequency of occurrence of individual energy efficiency rating (6 classes). The x-axis represents Building Energy Rating (BER) classes from B (most efficient) to G, and the y-axis indicates the number of buildings (count) assigned to each class.
Figure 3. Frequency of occurrence of individual energy efficiency rating (6 classes). The x-axis represents Building Energy Rating (BER) classes from B (most efficient) to G, and the y-axis indicates the number of buildings (count) assigned to each class.
Energies 19 02446 g003
Figure 4. Histogram of the number of floors. The x-axis represents the number of floors, and the y-axis indicates the number of buildings (count) with the corresponding floor count.
Figure 4. Histogram of the number of floors. The x-axis represents the number of floors, and the y-axis indicates the number of buildings (count) with the corresponding floor count.
Energies 19 02446 g004
Figure 5. Time zone frequency. The x-axis represents individual time zones (corresponding to building locations), and the y-axis indicates the number of buildings (count) located within each time zone.
Figure 5. Time zone frequency. The x-axis represents individual time zones (corresponding to building locations), and the y-axis indicates the number of buildings (count) located within each time zone.
Energies 19 02446 g005
Figure 6. Histogram of year of construction. The x-axis represents year-of-construction intervals, and the y-axis indicates the number of buildings (count) constructed within each period.
Figure 6. Histogram of year of construction. The x-axis represents year-of-construction intervals, and the y-axis indicates the number of buildings (count) constructed within each period.
Energies 19 02446 g006
Figure 7. Electricity consumption during the first 2 weeks of collecting electricity consumption measurements. The x-axis represents consecutive hourly timestamps, and the y-axis indicates hourly electricity consumption expressed in kilowatt-hours (kWh).
Figure 7. Electricity consumption during the first 2 weeks of collecting electricity consumption measurements. The x-axis represents consecutive hourly timestamps, and the y-axis indicates hourly electricity consumption expressed in kilowatt-hours (kWh).
Energies 19 02446 g007
Figure 8. Comparison of the range of hourly electricity consumption values (kWh) for the first 35 buildings from the dataset. Each box plot position along the x-axis corresponds to one building, numbered sequentially from 1 to 35 (left to right) according to their order in the dataset. The y-axis represents hourly electricity consumption (kWh).
Figure 8. Comparison of the range of hourly electricity consumption values (kWh) for the first 35 buildings from the dataset. Each box plot position along the x-axis corresponds to one building, numbered sequentially from 1 to 35 (left to right) according to their order in the dataset. The y-axis represents hourly electricity consumption (kWh).
Energies 19 02446 g008
Figure 9. Histogram of electricity consumption for buildings without outliers. The x-axis represents electricity consumption intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of hourly measurements (count) falling within each interval.
Figure 9. Histogram of electricity consumption for buildings without outliers. The x-axis represents electricity consumption intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of hourly measurements (count) falling within each interval.
Energies 19 02446 g009
Figure 10. Histogram for temperature. The x-axis represents temperature intervals expressed in degrees Celsius (°C), and the y-axis indicates the number of hourly observations (count) recorded within each temperature range.
Figure 10. Histogram for temperature. The x-axis represents temperature intervals expressed in degrees Celsius (°C), and the y-axis indicates the number of hourly observations (count) recorded within each temperature range.
Energies 19 02446 g010
Figure 11. Box plot of mean absolute error (MAE, expressed in kWh) after 15 epochs (5 approaches) [29] on the validation set for models with different numbers of cells in a single LSTM layer. The x-axis represents the number of LSTM cells, and the y-axis indicates the MAE value (kWh).
Figure 11. Box plot of mean absolute error (MAE, expressed in kWh) after 15 epochs (5 approaches) [29] on the validation set for models with different numbers of cells in a single LSTM layer. The x-axis represents the number of LSTM cells, and the y-axis indicates the MAE value (kWh).
Energies 19 02446 g011
Figure 12. Graph of the interquartile range of the mean absolute error (MAE, expressed in kWh) of the obtained models after 15 epochs (5 approaches) [29] for the test set due to the different number of cells in a single LSTM layer. The y-axis represents the number of LSTM cells, and the x-axis indicates the MAE value (kWh).
Figure 12. Graph of the interquartile range of the mean absolute error (MAE, expressed in kWh) of the obtained models after 15 epochs (5 approaches) [29] for the test set due to the different number of cells in a single LSTM layer. The y-axis represents the number of LSTM cells, and the x-axis indicates the MAE value (kWh).
Energies 19 02446 g012
Figure 13. Comparison of the mean squared error (MSE, expressed in kWh2) values of the obtained models in the first stage of hyperparameter optimization for the validation set. The y-axis represents model numbers (as defined in Table 2), and the x-axis indicates the MSE value (kWh2).
Figure 13. Comparison of the mean squared error (MSE, expressed in kWh2) values of the obtained models in the first stage of hyperparameter optimization for the validation set. The y-axis represents model numbers (as defined in Table 2), and the x-axis indicates the MSE value (kWh2).
Energies 19 02446 g013
Figure 14. Comparison of the mean absolute error (MAE, expressed in kWh) values of the obtained models in the first stage of hyperparameter optimization for the test set. The y-axis represents model numbers (as defined in Table 2), and the x-axis indicates the MAE value (kWh).
Figure 14. Comparison of the mean absolute error (MAE, expressed in kWh) values of the obtained models in the first stage of hyperparameter optimization for the test set. The y-axis represents model numbers (as defined in Table 2), and the x-axis indicates the MAE value (kWh).
Energies 19 02446 g014
Figure 15. Comparison of the mean squared error (MSE, expressed in kWh2) values of the obtained models in the second stage of hyperparameter optimization for the test set. The y-axis represents model numbers (as defined in Table 3), and the x-axis indicates the MSE value (kWh2).
Figure 15. Comparison of the mean squared error (MSE, expressed in kWh2) values of the obtained models in the second stage of hyperparameter optimization for the test set. The y-axis represents model numbers (as defined in Table 3), and the x-axis indicates the MSE value (kWh2).
Energies 19 02446 g015
Figure 16. Comparison of the mean absolute error (MAE, expressed in kWh) values of the obtained models in the second stage of hyperparameter optimization for the test set. The y-axis represents model numbers (as defined in Table 3), and the x-axis indicates the MAE value (kWh).
Figure 16. Comparison of the mean absolute error (MAE, expressed in kWh) values of the obtained models in the second stage of hyperparameter optimization for the test set. The y-axis represents model numbers (as defined in Table 3), and the x-axis indicates the MAE value (kWh).
Energies 19 02446 g016
Figure 17. The value of the mean absolute error (MAE, expressed in kWh) for the training and validation sets in each epoch of model training. The x-axis represents the training epoch number, and the y-axis indicates the MAE value (kWh). Separate curves are shown for the training and validation sets.
Figure 17. The value of the mean absolute error (MAE, expressed in kWh) for the training and validation sets in each epoch of model training. The x-axis represents the training epoch number, and the y-axis indicates the MAE value (kWh). Separate curves are shown for the training and validation sets.
Energies 19 02446 g017
Figure 18. Histogram of the prediction error of individual observations for all sets. The x-axis represents prediction error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each error interval. Separate series are shown for the training, validation, and test sets.
Figure 18. Histogram of the prediction error of individual observations for all sets. The x-axis represents prediction error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each error interval. Separate series are shown for the training, validation, and test sets.
Energies 19 02446 g018
Figure 19. Histogram of the prediction error of 95% of observations between the 2.5% and 97.5% for all datasets. The x-axis represents prediction error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each interval. Separate series are shown for the training, validation, and test sets.
Figure 19. Histogram of the prediction error of 95% of observations between the 2.5% and 97.5% for all datasets. The x-axis represents prediction error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each interval. Separate series are shown for the training, validation, and test sets.
Energies 19 02446 g019
Figure 20. Histogram of the absolute prediction error of individual observations for all sets. The x-axis represents absolute error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each interval. Separate series are shown for the training, validation, and test sets.
Figure 20. Histogram of the absolute prediction error of individual observations for all sets. The x-axis represents absolute error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each interval. Separate series are shown for the training, validation, and test sets.
Energies 19 02446 g020
Figure 21. Histogram of the absolute prediction error of 99% of the observations falling within the 99th percentile for all datasets. The x-axis represents absolute error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each interval.
Figure 21. Histogram of the absolute prediction error of 99% of the observations falling within the 99th percentile for all datasets. The x-axis represents absolute error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each interval.
Energies 19 02446 g021
Figure 22. Histogram of the absolute prediction error of 95% of the observations up to the 95th percentile for all datasets. The x-axis represents absolute error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each interval.
Figure 22. Histogram of the absolute prediction error of 95% of the observations up to the 95th percentile for all datasets. The x-axis represents absolute error intervals expressed in kilowatt-hours (kWh), and the y-axis indicates the number of observations (count) within each interval.
Energies 19 02446 g022
Table 1. Complete list of input attributes after preprocessing and one-hot encoding. Attributes marked as “identifier” or “target” were excluded from the model input. Categorical attributes were removed from the dataset and replaced by their corresponding one-hot encoded binary columns. Numerical attributes were retained as single columns.
Table 1. Complete list of input attributes after preprocessing and one-hot encoding. Attributes marked as “identifier” or “target” were excluded from the model input. Categorical attributes were removed from the dataset and replaced by their corresponding one-hot encoded binary columns. Numerical attributes were retained as single columns.
Attribute NumberAttribute NameSourceTypeDistinct ClassesColumns After Encoding
1Energy Star indexBuildingNumerical-1
2Number of floorsBuildingNumerical-1
3Number of occupantsBuildingNumerical-1
4Usable area (sqft)BuildingNumerical-1
5Usable area (sqm)BuildingNumerical-1
6Year of constructionBuildingNumerical-1
7Temperature (°C)WeatherNumerical-1
8Dew point (°C)WeatherNumerical-1
9Humidity (%)WeatherNumerical-1
10Sea level pressure (hPa)WeatherNumerical-1
11Visibility (km)WeatherNumerical-1
12Wind speed (km/h)WeatherNumerical-1
13Gust speedWeatherNumerical-1
14Wind direction degreesWeatherNumerical-1
15Heating typeBuildingCategorical77
16SectorBuildingCategorical33
17Primary space usageBuildingCategorical55
18Energy efficiency ratingBuildingCategorical66
19Sub-sectorBuildingCategorical99
20Time zoneBuildingCategorical88
21Wind directionWeatherCategorical1818
22EventsWeatherCategorical1111
23ConditionsWeatherCategorical5252
Table 2. Configuration of activation function, recursive activation function, dropout and recursive dropout hyperparameter optimization models.
Table 2. Configuration of activation function, recursive activation function, dropout and recursive dropout hyperparameter optimization models.
Model Number Activation FunctionRecursive Activation FunctionDropoutRecursive
Dropout
1hyperbolic tangenthyperbolic tangent0.10.1
2hyperbolic tangenthyperbolic tangent0.10.2
3hyperbolic tangenthyperbolic tangent0.20.1
4hyperbolic tangenthyperbolic tangent0.20.2
5hyperbolic tangentsigmoidal0.10.1
6hyperbolic tangentsigmoidal0.10.2
7hyperbolic tangentsigmoidal0.20.1
8hyperbolic tangentsigmoidal0.20.2
9sigmoidalhyperbolic tangent0.10.1
10sigmoidalhyperbolic tangent0.10.2
11sigmoidalhyperbolic tangent0.20.1
12sigmoidalhyperbolic tangent0.20.2
13sigmoidalsigmoidal0.10.1
14sigmoidalsigmoidal0.10.2
15sigmoidalsigmoidal0.20.1
16sigmoidalsigmoidal0.20.2
Table 3. Configuration of hyperparameter optimization models of kernel and recursive regularization functions.
Table 3. Configuration of hyperparameter optimization models of kernel and recursive regularization functions.
Model NumberKernel Regularization FunctionRecursive Regularization Function
1NoneL1
2NoneL2
3NoneL1L2
4L1None
5L1L1
6L1L2
7L1L1L2
8L2None
9L2L1
10L2L2
11L2L1L2
12L1L2None
13L1L2L1
14L1L2L2
15L1L2L1L2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Romańska, A.; Dudzik, M.; Dudek, P.; Górny, M.; Kuc, S.; Bomberg, M. Perspective for Improving Energy Efficiency and Indoor Climate Towards Prediction of Energy Use: A Generalized LSTM-Based Model for Non-Residential Buildings. Energies 2026, 19, 2446. https://doi.org/10.3390/en19102446

AMA Style

Romańska A, Dudzik M, Dudek P, Górny M, Kuc S, Bomberg M. Perspective for Improving Energy Efficiency and Indoor Climate Towards Prediction of Energy Use: A Generalized LSTM-Based Model for Non-Residential Buildings. Energies. 2026; 19(10):2446. https://doi.org/10.3390/en19102446

Chicago/Turabian Style

Romańska, Anna, Marek Dudzik, Piotr Dudek, Mariusz Górny, Sabina Kuc, and Mark Bomberg. 2026. "Perspective for Improving Energy Efficiency and Indoor Climate Towards Prediction of Energy Use: A Generalized LSTM-Based Model for Non-Residential Buildings" Energies 19, no. 10: 2446. https://doi.org/10.3390/en19102446

APA Style

Romańska, A., Dudzik, M., Dudek, P., Górny, M., Kuc, S., & Bomberg, M. (2026). Perspective for Improving Energy Efficiency and Indoor Climate Towards Prediction of Energy Use: A Generalized LSTM-Based Model for Non-Residential Buildings. Energies, 19(10), 2446. https://doi.org/10.3390/en19102446

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop