key: cord-283907-ev1ghlwl authors: Cao, Lingyan; Li, Yongkui; Zhang, Jiansong; Jiang, Yi; Han, Yilong; Wei, Jianjun title: Electrical load prediction of healthcare buildings through single and ensemble learning date: 2020-11-30 journal: Energy Reports DOI: 10.1016/j.egyr.2020.10.005 sha: doc_id: 283907 cord_uid: ev1ghlwl Healthcare buildings are characterized by complex energy systems and high energy usage, therefore serving as the key areas for achieving energy conservation goals in the building sector. An accurate load prediction of hospital energy consumption is of paramount importance to a successful healthcare building energy management. In this study, eight machine learning models of single learning and ensemble learning were developed for predicting healthcare facilities’ energy consumption. To validate the performance of the proposed model, an experiment was conducted on a general hospital in Shanghai, China. It was found that the two ensemble models, Extreme Gradient Boosting (XGBoost) model and Random Forest (RF) model, outperformed single models in daily electrical load prediction. A further comparison between models trained with daily and weekly temporal resolution electrical data shows that it is more likely to achieve higher accuracy with finer time granularity. Through feature importance analysis, the most influential features under the daily and weekly electrical load prediction were identified. Based on the prediction results, it is expected that hospital facility managers will be able to conveniently assess the expected energy usage of their hospitals with the machine learning models. The building sector accounts for 30% of global energy consumption and more than 55% of global electricity consumption, generating 28% of energy-related CO 2 emissions worldwide (OECD/IEA, 2017) . Driven by the increasing floor area and rapidly growing demand for energy-consumption equipment and services in buildings, the energy use in the building sector has shown a continuous growth trend, with an annual average growth of 1.1% since 2000 (OECD/IEA, 2017). Currently, the energy consumption of the building sector mainly comes from commercial and residential buildings. Large-scale commercial buildings are reported to have a high energy consumption, which can be up to 300 kW h/m 2 , 5 to 15 times of that in residential buildings (Liang et al., 2016) . In the commercial sector, healthcare buildings are particularly energy-intensive due to their constant need for power supply and strict requirements for air quality and disease control (García-Sanz-Calcedo et al., 2019; Bawaneh * Corresponding author. E-mail addresses: cly900601@tongji.edu.cn (L. Cao), lyk@tongji.edu.cn (Y. Li), zhan3062@purdue.edu (J. Zhang), jiang2@purdue.edu (Y. Jiang), yilong.han@tongji.edu.cn (Y. Han), 1510322@tongji.edu.cn (J. Wei). et al., 2019a) . A report released by the Energy Information Administration (EIA) (EIA, 2012) indicated that large hospitals were responsible for 6.6% of major fuel consumption in commercial buildings, even though they only constitute 2.2% of the total commercial building area. In addition, the healthcare industry market is expected to continuously increase in the future due to factors such as a higher number of chronic diseases, overpopulation, an increase of elderly population, and the lack of healthy lifestyle choices (Gonzalez, 2019) . Thus, healthcare buildings play an important role in overall energy consumption worldwide. In response to this increasing trend of building energy demand, much research has been conducted in the prediction of building energy consumption, especially the prediction of electrical loads. Previous studies have shown that building energy prediction is helpful for implementing a series of energy conservation tasks, such as benchmarking building energy performance (Zhao and Magoulès, 2012) , detecting system fault , measuring building energy savings (Heo and Zavala, 2012) , and controlling demand response (Pedersen et al., 2017) . The main functions of healthcare buildings include providing medical services and carrying out scientific research. Compared to other commercial buildings, healthcare buildings are distinguished by overloaded schedules, increased electricity usage, diversified electricity forms, and higher electricity consumption per gross floor area. For example, in the hospital context, a large amount of electricity has to be provided to make sure the normal operation of cold-chain equipment for vaccine storage, pumps for clean water supply, lighting, and other life-saving medical equipment for night-time and emergency care (Dholakia, 2018) . Therefore, schemes to reduce the use of energy in complex healthcare buildings are important to understand. Through literature review, it was found that numerous energy demand studies have been conducted on diverse building types, such as commercial buildings (Yildiz et al., 2017) , office buildings (Ding et al., 2017) , hotel buildings (Shao et al., 2020) , and residential buildings (Gao et al., 2019) . However, there is a paucity of research that focused on healthcare buildings due to the complexity of their energy consumption patterns. Even though the amount of electrical load information related to diagnostic and medical treatment has been increased with the advancement of metering and sensing technologies, the detailed analysis based on the measured information remains scarce. Therefore, in this paper, the authors propose a one day-ahead electrical load forecasting model based on single and ensemble machine learning algorithms. To validate the performance of the proposed model, an experiment was conducted on Shanghai Tenth people's hospital, a general hospital under the jurisdiction of the Shanghai Hospital Development Center (SHDC) . Daily electrical load consumption information was collected through an intelligent-Building Energy Support System (i-BESS). Because energy consumption patterns in buildings can vary greatly depending on the use of buildings (Park et al., 2016) , the ignorance of function related variables will result in a discrepancy between the predicted values and real values. To fill this gap, in this study, three types of patient occupants were taken into consideration, namely, the inpatient, outpatient, and emergency patients. In the present study, electrical load forecasting models of healthcare buildings are developed based on single and ensemble machine learning algorithms by taking account multi-factors simultaneously. 10 features that are classified into four categories (weather parameters, occupancy data, day type information, and Operation & Maintenance measure) are specified as input to the forecasting models. The daily electrical load forecasting models are trained with a database of a general hospital in Shanghai, containing 700 instances with complete data. To test the impact of time granularity on the prediction performance, these models are also trained with a weekly load dataset. The performance of the prediction models is evaluated by statistical metrics such as the mean absolute percentage error (MAPE), coefficient of variation of the root mean square error (CVRMSE), normalized root mean square error (NRMSE). Finally, a feature importance analysis is also presented to identify the critical attributes. The rest of this paper is organized as follows. In Section 2, we discuss the relevant literature in the load prediction of buildings. Section 3 shows our proposed methodology. Section 4 introduces the experiment, ground truth, and evaluation metrics. Section 5 and Section 6 show the results and discussion of electrical load prediction, respectively. Finally, in the last three Section 7 to 9, the contributions, limitations, and conclusions are presented, respectively. In the past decade, extensive research has been carried out to predict the load demand of buildings and various models have been proposed for real-world applications. These models can be broadly classified into two categories, namely physical models and data-driven models (Amasyali and El-Gohary, 2018) (see Fig. 1 ). In Physical models, physical principles are used to calculate the thermal dynamics and energy behaviors of buildings by taking temperature, humidity, and other physical variables into consideration (Wang et al., 2018a; Li, 2020) . Several building energy modeling tools, such as EnergyPlus, Transient System Simulation Tool (TRNSYS), Environmental Systems Performance-Research (ESP-r), and the Quick Energy Simulation Tool (eQuest), have been widely used in this area (Bui et al., 2020) . However, the performance of physical models depends on a large number of building parameters, such as building envelope structure, lighting system setup, pump water distribution, etc., making it more suitable for buildings at the design stage rather than for as-built (Shao et al., 2020) . To this end, data-driven models using machine learning algorithms to construct mapping functions between input and output data have gained immense popularity due to their ease of use, adaptability and high forecasting performance (Wang et al., 2018a; Wang and Srinivasan, 2017; Somu et al., 2020) . In addition, data-driven models are more practical than physical models since the data used are more available from buildings, such as energy consumption, climatic, temporal, and occupancy, which can be collected via sensing and communication technologies (Wang et al., 2018a) . Furthermore, data-driven prediction models can be categorized into single models and ensemble models based on the modeling structure and the number of prediction models (Wang and Srinivasan, 2017) . Single prediction models were created by applying one prediction algorithm (Wang and Srinivasan, 2017) . Examples of single prediction models include multiple linear regression (Ji and Xu, 2015) , Artificial Neural Network (Platon et al., 2015) , Support Vector Machines (Wang et al., 2016b) , and long short term memory (LSTM) algorithm (Zhou et al., 2019; Wang et al., 2019) . In ensemble learning prediction, instead of using one algorithm to build the forecasting model, multiple learning algorithms are needed to train its base models (Wang and Srinivasan, 2017) . The commonly used ensemble techniques are bagging (Tuysuzoglu and Birant, 2020) , boosting (Kadkhodaei et al., 2020) , voting (Tsai, 2019) , and stacking (Mahendran et al., 2020) . Among them, bagging and boosting are two of the most widely-used ensemble learning methods because of their theoretical superiority and strong experimental performance (Oza, 2005) , with Random Forest (RF) and Extreme Gradient Boosting (XGBoost) as the representative algorithms for each, respectively. The main difference between RF and XGBoost is that RF combines multiple predictors in a parallel way whereas XGBoost combines them sequentially (Wang et al., 2020a) . Based on the literature review, the prediction performance of single and ensemble prediction models in healthcare buildings context has been underinvestigated. Since XGBoost and RF are more advanced algorithms that could be used for electrical load consumption in buildings, these two algorithms are described in detail as follows. (1) XGBoost algorithm based on boosting The core idea of boosting is to start training a base learner from the initial training dataset, during which each sample (i.e., data point in the training dataset) has the same weight. Then the weights of training samples are constantly adjusted in the subsequent iterations according to the performance of the base learner. A heavier weight will be given to the training samples that failed the training. This process is repeated until the number of base learners reaches a value specified in advance. Finally, a strong model will be constructed by combining these base learners by their trained weights. In boosting, the data drawn for training the base learners depends directly on the previous steps (Kadkhodaei et al., 2020) . XGBoost is one of the boosting algorithms widely used in the field of machine learning and Kaggle competitions for structured or tabular data in recent years (Silvestro et al., 2017; Kadkhodaei et al., 2020). XGBoost can be used to solve both classification and regression problems. The mechanism of XGBoost is to first train a decision tree by using the training dataset and then use this tree to obtain the corresponding predicted value. A residual can be obtained by subtracting predicted value from the corresponding real value. Then, by inputting the new training sample and residual, a second tree is trained to optimize the previous residual. The iteration stops when the predefined threshold of parameters, such as max_depth, min_child_weight, are arrived at. The final predicted value is the sum of the predicted values of the previous predictors. After adding a base learner, the value of its objective function is calculated to ensure that the value of the objective function gradually decreases during the iteration process. XGBoost can obtain much better performance than a single prediction algorithm due to the process of correcting the prediction errors of preceding models in the iterative process. (2) Random Forest based on bagging Bagging is the most famous representative of ensemble learning. The core idea of bagging is to obtain an aggregated predictor by using a combination rule (Tuysuzoglu and Birant, 2020) . In bagging, given a data set containing m samples, one sample is randomly picked into the sampling set for processing and then put back into the original dataset, so that the sample still has the possibility to be selected in the next sampling round. After m round of random sampling operations, a sampling set containing m samples is formed. In repeating this sampling T times, T datasets each containing m data can be generated. A base learner is then trained based on each sample set and all base learners are combined in the end. Random forest (RF), one of the most popular machine learning algorithms, is an improvement of bagging methods. Different from bagging where all features are considered for splitting a node, RF only selects a subset of features at random and uses the best splitting feature from the subset to split each node in a tree. A problem with bagging is that decision trees can have a lot of structural similarities since they choose which variable to split on using a greedy algorithm that minimizes errors, resulting in a high correlation in their predictions. RF addresses this problem by generating sub-trees in a way that the resulting predictions from all of the subtrees have fewer correlations. RF contains several weak predictors that are trained through bagging and random variable selection. Therefore, RF has good anti-noise and generalization capabilities. Previous research has shown that RF can perform well in the field of load forecasting (Wang et al., 2018a; Morgenstern et al., 2016) . For data-driven models, parameters optimization plays an important role in improving the prediction accuracy of the proposed model. There are a variety of parameter tuning methods available. For example, a series of relevant work have been done by Chen et al. (2020) 's team. They proposed an improved ant colony optimization for feature selection to identify the optimal subsets (Zhao et al., 2014) . In addition, several methods such as enhanced moth-flame optimizer , improved whale optimization algorithm , enhanced bacterial foraging optimization , the chaos enhanced gray wolf optimization (Zhao et al., 2019) have been developed and validated in different contexts such as medical diagnosis. Based on the application context, following Wang et al. (2020a) 's method, GridsearchCV provided by scikit-learn (Pedregosa et al., 2011) was used for hyper-parameter tuning in this study. Understanding the drivers of building electrical load consumption is critical to the advancement of building energy systems and their management. According to the project report of International Energy Agency (IEA) on total energy use in buildings, there are six types of factors that are influencing the total energy consumption of buildings, including climate, building envelope, building equipment, operation and maintenance, occupant behavior, and indoor environmental conditions (Yoshino et al., 0000) . In addition to the general characteristics of the public buildings' energy consumption, healthcare buildings have important distinctions from other commercial buildings, including their continuous operation, a high percentage of included space types with special indoor environment requirements and a set of extremely energy-hungry diagnostic equipment, such as Xray, computed tomography (CT) and magnetic resonance imaging (MRI) (Koulamas et al., 2017) . Energy systems show different complexity even from hospital to hospital, depending on several factors such as the type and volume of the buildings, health care services offered, geographical location, and technological plants (Silvestro et al., 2017) . In general, the electricity consumption in hospitals consists of air conditioning systems, lighting, electromedical devices, safety systems, Information and communications technology (ICT) systems, and treatment equipment (Silvestro et al., 2017) . Furthermore, each department of a hospital also may have different energy use patterns. Taking the outpatient and inpatient departments as an example, the main function of the outpatient department is to receive patients and diagnose patients who do not need to be admitted to hospital stay (Morgenstern et al., 2016) . Therefore, the main energy systems or equipment of the outpatient departments are HVAC systems, lighting systems, and medical equipment. While for the inpatient department, whose main function is to provide a place for patients who need to be hospitalized, the main energy consumption is related to the HVAC system, lighting system, domestic hot water system, catering, and cooking appliances. However, the majority of research in healthcare buildings on energy prediction pays more attention to the useful floor area and number of beds, without taking healthcare occupancy types into consideration. Similar to the research conducted in general buildings, electrical load prediction models for healthcare buildings can also be classified into physical and data-driven models. For example, by using dynamic thermal simulation and computational fluid dynamics, Adamu et al. (2012) explored the alternative effects of four strategies on the performance of thermal comfort and heating load using a new ward of the Great Ormond Street Hospital London as a case study. Ascione et al. (2013) investigated the energy, environmental and economic effects of rehabilitation of building envelope for healthcare facilities in Mediterranean climates via EnergyPlus and the DesignBuilder interface. Due to the complexity and time-consuming nature of collecting buildings' detailed information needed by physical models, several data-driven models have been found to predict the energy consumption of healthcare buildings. For example, Chen et al. (2005) used ANN to predict a hospital's air-conditioning system's energy use by taking into account temperature, relative humidity, the previous-hour electricity, the time of a day, and some uncontrolled variables. Bagnasco et al. (2015) performed electrical load forecasting for the Cellini medical clinic of Turin by proposing a multi-layer perception ANN model with (1) the type of the day, (2) time of the day, and (3) weather, as the input data. Thinate et al. (2017b) built a multiple linear regression model for the load prediction of 45 large-scale hospital buildings in Thailand by taking six affecting factors into account, including airconditioning area, non-air-conditioning area, in-patient department, out-patient department, staff number, and temperature. In Ruiz et al.'s (2017) study, three machine learning techniques (i.e., Multilayer perceptron, M5Rules algorithm, and Tree ensemble learner algorithm) were used to predict electrical energy consumption in a hospital of Granada. In spite of the several different aspects of energy use in healthcare facilities explored in previous studies, the main gap of extant research is the lack of consideration of healthcare occupancy variables. To address this gap, this study takes into account the occupancy of outpatients, emergency patients, and inpatients and employs single and ensemble machine learning algorithms to predict the electric load demand of healthcare buildings. The research methodology consists of Module 1 and Module 2, which are for independent machine learning model development with different temporal granularity -daily and weekly, respectively as shown in Fig. 2 . It can be seen that the electric load prediction for the healthcare buildings includes three steps: (1) Identify the relevant features and gather data, (2) Train single and ensemble learning models with prepared dataset, and (3) Compare the prediction performance of different models. The electricity data of Modules 1 and 2 are first randomly divided into two parts, 80% for training and 20% for testing. The generated training dataset is then used to train the machine learning models and the testing dataset is used to evaluate the performance of the trained models. Machine learning is increasingly adopted in the big data era to enable data-driven decision making. Empirical evidence shows that companies who adopt data-driven decision making will increase their efficiency and profitability significantly (Bohanec et al., 2017) . Data mining and machine learning methods are capable of addressing variable issues such as normality, correlation, missing value, and dependency. Therefore, they can produce better prediction accuracies by mapping the nonlinear relationship between input and output more comprehensively. Electrical load forecasting is naturally considered to be a regression problem in machine learning, aiming to accurately predict the energy demand of buildings based on its relationship with a given set of independent input variables. Although machine learning techniques have provided good results in electrical load prediction of many types of buildings, electrical load prediction of healthcare buildings based on machine learning algorithms has been under-investigated, leading to a gap in knowledge on the most appropriate method to predict electrical load of healthcare facilities. To test the forecasting performance of different models, three performance measures are used including MAPE, CVRMSE, and NRMSE. The equations for calculating MAPE, CVRMSE, and NRMSE are defined as follows (Kadkhodaei et al., 2020) : In which: (1) N represents the number of instances in training or testing data; (2)ŷ i and y i represent the forecasted and real values, respectively, and (3) y max and y min represent the maximum and minimum of the real values, respectively. For all the three indicators, a smaller value indicates a better prediction performance of the forecasting model. The method was applied to predicting the energy consumption of Shanghai Tenth People's Hospital (STPH), a general hospital located in Jing'an District of Shanghai, China. Established in 1910, STPH provides healthcare across broad areas of general and specialty care. Like other hospitals located in megacities of China, STPH is extremely busy providing medical services for patients not only from local areas but also from the surrounding regions due to urban agglomeration (Wang et al., 2016a) . As a result, STPH has experienced capacity strain over recent years. In 2018, it had 3.06 million person-times of outpatients and emergency patients, 100 thousand person-times of hospital discharge. The total floor area of STPH is 168,575 m 2 (Fig. 3) , consisting of various departments, such as operation theaters, intensive care units, examination and treatment rooms, and large-scale medical equipment, resulting in an annual electricity expenditure of 19 million Chinese Yuan. Electric power consumed in STPH consists of space heating and cooling, ventilation, lighting, office equipment, and medical diagnostic facilities such as CT and MRI. Generally, hospital buildings can be seen as an integration of general-purpose building space and healthcare-specific building space. Therefore, factors influencing energy consumption consist of common factors related to weather parameters (i.e., outdoor temperature, relative humidity, wind speed, barometric pressure, and precipitation) (Wang et al., 2018a) and some special factors relevant to occupancy, time and Operation &Maintenance (O&M). For occupancy, three types of patients are considered, including the number of outpatients, emergency patients, and inpatients. Because hospitals usually have different schedules according to day type, a parameter representing Weekday or Weekend/Holiday was also considered as an input to the forecasting model. In addition, different O&M measures related to the operational status of the central air-conditioning system are included to accommodate the changing indoor climate condition. The central air conditioning system will be turned on for heating or cooling and turned off at transition seasons, such as spring or autumn. Finally, a total of 10 parameters need to be considered to build a load forecasting model, as listed in Table 1 . Due to different conditions such as geographic latitude and topography, the climate of China varies greatly from one location to another. To analyze the buildings according to local climate conditions, the Chinese building climate is divided into Severe Cold Area, Cold Area, Hot-Summer & Warm-Winter Area, and Temperate Area (Wei et al., 2018) . Shanghai, a typical city in the Hot-Summer & Cold-Winter Area, has a long summer and a short winter, resulting in high energy usage for cooling and heating. As illustrated in Fig. 4 , a U-shaped relationship exists between outdoor temperature and daily electricity consumption in Shanghai. In this study, the weather data was collected from a weather station in the Baoshan District, whose Latitude and longitude are close to that of STPH. The weather station consists of a complete set of weather sensors, including temperature, humidity, wind speed, air pressure, and precipitation. In this study, the weather data was downloaded on a daily average basis from the department web server. Generally, healthcare facilities can be classified into different categories based on management and ownership types, type of care provided, facility size and patient type, etc. Ahmed et al. (2015) . For healthcare buildings in Chinese hospitals, the main classification is according to the type of patients, such as outpatient buildings and inpatient buildings. For example, the main components of inpatient buildings are patient bedrooms and the supporting spaces, e.g., nurses' rooms, storage space, and possible food heating facilities (Morgenstern et al., 2016) . Therefore, the occupancy of hospitals mainly consists of three types of patients, i.e., outpatients, emergency patients, and inpatients. In order to ensure careful control of the indoor climate, healthcare buildings consume more energy than other types of commercial buildings, to achieve a comfortable indoor environment since occupants in hospitals are more sensitive to the physical environment . Occupancy fluctuations complicate decisions concerning the need for a variety of auxiliary facilities, including physical therapy, laboratory tests, surgical services, pharmacy, and housekeeping, and may ultimately impact the energy consumption (Littig and Isken, 2007) . These daily occupancy data were collected from the Healthcare Information System (HIS) of Shanghai. Fig. 5 shows the normalized value of occupants and load relationship of STPH for 1 month. It can be seen that the number of inpatients and emergency patients is small compared to that of outpatients. In addition, it can be seen that both the number of outpatients and electricity consumption have the lowest levels on Sundays. According to Lusis et al. (2017) , the prediction performance of electrical load consumption can be improved by taking into account calendar effects because they can capture the change of energy consumption patterns in different calendar periods, such as daily or weekly energy consumption. To investigate the impact of the interaction between the healthcare buildings and calendar variables on the electrical load prediction, a dummy variable was added to distinguish between weekdays and weekends/holidays. For STPH, weekday usually refers to Monday to Saturday while only Sunday is the weekend. In addition, the calendar from the hospital's official website was used to determine the holiday schedule. All holidays and Sundays were combined. In this study, the relationship between the day type and daily electrical load was statistically analyzed, and the violin plot is shown in Fig. 6 . As depicted in this plot, weekdays have higher load levels than the weekends/holidays. One possible explanation is that for weekdays, all departments will be under normal operations whereas, for weekends/holidays, only a small part of the departments will be open, e.g., the inpatient department. Currently, there are four types of air conditioning terminals in STPH, namely, central air-conditioning system, Variable Refrigerant Volume (VRV) unit systems, Large-sized Test Device for Air-cooled Heat Pump Unit, and Split air-conditioning systems. Only the split air-conditioning system can be kept in operation as wish. The other three types of air conditioning systems would not operate unless the outdoor temperature is higher or lower than an established threshold. According to the schedule of STPH (Table 2) , the central air conditioning system will not operate unless the outdoor temperature is higher than 30 • C in summer or lower than 8 • C in winter, which means that the electricity consumption is not linear with regard to the outdoor temperature and it depends on the Operation & Maintenance policy. Generally, there are two working patterns for these central air conditioning systems -cooling and heating. Otherwise, they will be turned off when it is a transition season (i.e., Spring or Autumn). During transition seasons, the central air conditioning system does not operate. In this study, a categorical variable that represents the operational status of air conditioning systems is introduced (Fig. 7) . As Fig. 7 shows, the electrical load consumption of the whole hospital is highest when the central air conditioning system was in operation for cooling, followed by heating and turned off. In this experiment, the building electrical load data were acquired every hour from intelligent-Building Energy Support System (i-BESS) developed by the Shanghai Hospital Development Center (SHDC) , the administrative agency for the investment, management, and operation of 38 municipal public hospitals in Shanghai, including STPH. Building electrical load data from January 1, 2017, to December 31, 2018 (a total of 730 days) were collected and used for training and testing. The time series of building electrical load in this experiment is shown in Fig. 8 . In this section, the prediction performance of different single and ensemble machine learning algorithms is compared. Within the single machine learning category, Linear Regression, Lasso Regression, Ridge Regression, Elastic Net, Support Vector Regression (SVR), and Gaussian Process Regression are selected. Linear Regression is a statistical method used for analyzing the linear relationship of multiple variables, and the simplest single machine learning algorithm (Shine et al., 2018) . Regularization technique is applied which can be used to prevent overfitting problems by adding a regularization term to the loss term. The regression model which uses l 1 regularization term (i.e., the sum of absolute values) is Lasso Regression and the model which uses l 2 regularization term (i.e., the sum of squared coefficients) is Ridge Regression. Elastic Net further combines the regularization terms of Lasso and Ridge regression to overcome their dependency on data and the resulting instability, to get the best of both models. SVR is a powerful and versatile machine learning algorithm that has the ability to perform regression tasks. Gaussian Process is a generalization of nonlinear multivariate regression (Heo and Zavala, 2012) . In the ensemble machine learning category, XG-Boost and Random Forest, are popular energy prediction models which builds a decision tree in a sequential and parallel way, respectively. Besides, the optimal parameters via GridSearchCV function of these above-mentioned algorithms are presented in the Appendix. The MAPE, CVRMSE, and NRMSE of the tested hospital for different forecast models over the entire training and testing period are summarized in Table 3 . Because the models' rankings in all the three performance indicators are the same, MAPE will be used as an example to illustrate the comparison results of different models. For single learning models, SVR was the most accurate model with a MAPE of 10.67%, followed by Gaussian Process regression and the remaining four models (i.e., linear regression, lasso regression, ridge regression, and elastic net) with a similar MAPE. For ensemble learning models, RF performed slightly better than XGBoost RF with a MAPE of 9.64% and MAPE of 9.81%, respectively. However, when comparing single models with ensemble models, the prediction performance of ensemble models was consistently better than that of single models, which could be ascribed to the way how ensemble models were developed. To investigate the prediction performance of the proposed model on longer timespans, weekly electrical load prediction was also tested corresponding to Module 2 of the methodology. In healthcare facilities management practice, it is very likely for facility managers to create weekly operation schedules for power systems. As was presented in Section 4, there were four types of input variables and one type of output variable used in daily electrical load prediction (i.e., Module 1). When it comes to weekly data, the day type variable is not needed. Therefore, in the weekly electrical load prediction, these models were trained with three types of input variables, namely, weather, occupancy, and O&M related variables. For the weather variables, such as outdoor temperature, relative humidity, wind speed, pressure, and precipitation, data were derived by averaging the daily data during the whole week. For occupancy variables, namely, the number of outpatient visits, emergency visits, and inpatients visits, the data were derived by summing the daily data during an entire week. As for the O&M variables, values were identified according to the operation schedule (Table 2) . For the output variable, weekly load prediction of STPH, a sum of each week was used (Fig. 9) . The comparison results of weekly electrical load prediction through single and ensemble machine learning algorithms are shown in Table 4 . It can be observed that in single machine learning categories, SVR outperformed the remaining five models with a MAPE of 10.77% by a large margin. For ensemble learning models, the MAPE of XGBoost and RF was 11.12% and 10.69%, respectively, indicating that RF is slightly better than XGBoost. When comparing the results of single and ensemble machine learning models, it appeared that the best single model (i.e., SVR) performed close to the best ensemble model (i.e., RF), with the ensemble model still outperforming the single model. Traditionally, it is recognized that ensemble models always outperform single models. However, the performance of a prediction model depends on several factors, such as input variables, selected models, and model parameters. The results of Module 2 showed that in certain situations, a single model may get similar performance as ensemble models. Due to the relatively high performance of SVR, XGBoost, and RF, they were selected as the base model for the subsequent analysis. By comparing the results of Module 1 and Module 2 in terms of SVR, XGBoost, and RF, it appears that prediction models trained with daily data have better performance than models trained with weekly data. The comparison shows that by dividing the data at a finer level of time granularity, the prediction performance of the machine learning model can be improved. Therefore, the authors suggest that if there are different operating patterns in different periods, the data collected at a finer level of time granularity will be necessary to improve the prediction accuracy of building energy consumption. By comparing all machine learning models, including single and ensemble models, RF was found to be the model with the highest prediction accuracy, so RF was used for the subsequent feature importance analysis. Figs. 10 and 11 depict the feature importance results for Module 1 and Module 2, respectively. It can be seen from Figs. 10 and 11 that the top 3 most influential features for Modules 1 and 2 were the same (i.e., outdoor temperature, pressure, and operation status of the central air conditioning system), indicating that the daily and weekly electrical load consumption are highly correlated with the same factors. Due to the high energy use related to space heating, cooling and ventilation loads, it was expected that outdoor temperature was the most contributing factor of energy consumption in hospital buildings. The operation status of the central air conditioning system (i.e., Ope), with its importance ranked the third, depends on the specific O&M measures in the tested hospital. Given the same weather condition, hospitals taking different O&M measures will consume different levels of energy. For example, some hospitals decided to open the central air condition system based on the outdoor temperature while others based that decision on the day of the year solely. As to the remaining features, they followed a different importance pattern in daily and weekly load prediction. In Fig. 10 , the result shows that in the case of hospital buildings, day type was the least influential feature mainly due to the around-the-clock operations of hospitals. In this experiment, eight machine learning models were compared for load prediction, including six single learning models and two ensemble learning models. The scope of single prediction methods covers several AI-based prediction models, i.e., linear regression, ridge regression, lasso regression, elastic net, SVR, and Gaussian Process. When it comes to ensemble machine learning, two of the most well-known models, XGBoost and RF were selected to construct the load prediction model of the tested hospital. Empirical results indicated that the most accurate model in the single and ensemble learning categories was SVR and RF, respectively. The prediction result for SVR, XGBoost, and RF are shown in Figs. 12 and 13 . While ensemble models outperformed single models in load prediction of the tested hospital in daily load prediction, demonstrating its ability to improve the prediction performance of single models by training with data of finer granularity. The energy consumption patterns of healthcare buildings are characterized by uninterrupted operation and high energy usage intensity. The input variables in our study are accessible to healthcare facility managers, such as weather, occupancy, day type, and O&M variables. It is feasible for them to conduct daily electrical load forecasting by adopting the machine learning algorithms in this study, especially ensemble models, such as XGBoost and RF. Besides, SVR is also an excellent alternative single machine learning algorithm which has been recommended by various previous studies (Thinate et al., 2017b; Shao et al., 2020) . As illustrated in Section 2, there has been a large number of researches focused on building load forecasting over the past decades. However, few of them focused on healthcare buildings and the number is much less when it comes to electrical load forecasting of healthcare buildings via machine learning algorithms. However, healthcare buildings are characterized by energy-intensiveness due to the constant need for available power supply for medical equipment and stringent requirements for air quality, making them the key area of achieving the energy conservation goals in the building domain. In this study, the best prediction performance was 9.64% of MAPE (Table 3) . CVRMSE can be useful to indicate how much variation or randomness there is between the data and the model. For hourly and monthly load prediction, the CVRMSE recommended by the American Society of Heating, Refrigerating, and Air-Conditioning Engineers (ASHRAE) is within 30% and 15%, respectively (Landsberg et al., 2014) . On a daily basis, the CVRMSE value results of ensemble models in our experiment were within 15%, indicating that the accuracy of our model is acceptable. In particular, considering the occupancy and O&M variables of the proposed procedure the CVRMSE of XGBoost in daily load prediction on the training set and the testing set was 10.11% and 12.81%, appeared to be improved with respect to the XGBoost as exploited in Wang et al. (2020a) , in which the CVRMSE on the training set and the testing set was 14.2% and 21.1%, respectively. Even though the electrical load of healthcare buildings is affected by a large number of factors, such as climate conditions, building envelope, energy system, and occupancy behavior, etc. It is obvious that these factors impact the electrical load with different weights. In this paper, the outdoor temperature seems to be the most important feature in both Module 1 and Module 2, which is consistent with many previous studies (e.g., Thinate et al., 2017b) . Since in complex buildings such as a hospital, the energy consumption of the air conditioning system can account for 67% of total energy consumption, whose main function is to keep a comfortable and constant indoor climate against the outdoor climate. Pressure came after temperature, which also has a great impact on energy performance. While for the third important feature, O&M related variable, the importance result is arguable. In most situations, the operation status of the air conditioning system has not been able to keep up with the change in the climate condition, that is it will operate on heating when the outdoor temperature is low and on cooling when the outdoor temperature is high. However, for the majority of public hospitals in China, there is an operation schedule for the central air conditioning system with a flexible period for heating and cooling. In addition, three types of patients were taken into consideration and they also had relatively high importance on electrical load consumption. With respect to the day type, it seems that the differentiation between weekdays and weekends/holidays is not sensitive to the prediction performance of these models. However, the rankings of these features are different in daily and weekly load predictions. One possible explanation is that these variables have different patterns in daily and weekly operations. For example, the number of outpatients is high on weekdays and is low on Sundays since the outpatient department will close on Sundays, which resulted in a significant increase in emergency patients on Sundays. The experiments were performed on a machine with Intel i7-8550U 2.0 GHz CPU and 8GB memory. The operating system was Windows 10. All the algorithms were implemented in Python. Table 5 lists the data size and computation time of different algorithms used in module 1 and module 2. Notably, module 1 used daily load dataset and module 2 used weekly load dataset. The results showed that the computation time of ensemble learning algorithms were considerably greater than those of most single learning algorithms except for Gaussian Regression. The potential reason for the long computation time of Gaussian Regression was its working process in inferring a probability distribution over all possible values. As ensemble learning algorithms, both XGBoost and RF had to operate by combining the results of several base learners, resulting in a relatively longer computation time. According to Wang et al. (2018b) , the prediction accuracy should be given the first priority when solving such problems. Overall, the computation time of the ensemble algorithms were acceptable. By comparing the computation time of module 1 and module 2, the influence of data size on computation time can be investigated. It can be observed that the computation time of all models trained with daily dataset were greater than those of weekly dataset, indicating that the increase of data size will result in an increment of computation time. However, the difference of computation time of XGBoost and RF between module 1 and module 2 was acceptable and it is reasonable to infer that the ensemble learning algorithms would still be practically efficient when using large volume of data (e.g., big data). In recent years, various research focused on the energy analysis and consumption optimization in hospitals worldwide have been conducted, such as in the U.S. (Bawaneh et al., 2019) , China (Ji and Qu, 2019) , German (González et al., 2018) , etc. However, limited by the availability of reliable and fine-granularity data, most of them were descriptive analysis at a macro level. This paper makes several contributions in model design. Focusing specifically in hospital modeling, the authors developed an electrical load prediction model for healthcare buildings via single and ensemble models. Even though it is widely believed that ensemble models can deliver higher prediction performance than single models by combining multiple individual models together, it is not guaranteed and needs to be tested context-by-context. However, few empirical studies have been conducted to test it in the healthcare facility energy prediction context. Using the data of a general hospital in Shanghai, the experimental results of this paper confirmed that ensemble models indeed outperform single models in terms of almost all measurements. In addition, the scope of the involved independent variables of the models employed in this study is broader than the majority of previous studies. Not only the well-known energy variables were included, such as weather and day type, but also explored is the impact of occupancy and O&M variables on the performance of the prediction model, making the model context closer to the actual operation situation of hospital buildings. Furthermore, this study identified the most important features affecting energy consumption in the experimented hospital which can give insights to healthcare facility managers in how to create the O&M schedule more appropriately. By training the electrical load prediction with daily and weekly models, it shows that it is more accurate to conduct load prediction with finer time granularity. This research can have two direct practical applications. The first and most important application is that the proposed model can provide accurate forecasting results and will assist healthcare facility managers to conduct better planning of hospital activities and energy sources in a timely manner. It can also serve as the basis of some other relevant jobs, such as fault diagnosis, energy benchmarking, etc. With the aim of supporting administrators or facility managers of hospitals to make decisions when they are trying to achieve energy conservation goals, the prediction models are developed at the hospital level rather than building or floor level. In addition, this paper illustrates one possible way to improve the energy management performance by taking advantage of multi-sourced, heterogeneous data. For example, data of four types of independent variables and dependent variables involved in this study are gathered through different methods/tools, such as weather station, Healthcare Information System (HIS), and smart meter. With the increasing popularity of big data and artificial intelligence, more efforts will be devoted to collect data in the area of healthcare facility operations by using multiple technologies. From this perspective, the methodology used in this paper can achieve its effective applications not only in the energy management systems but also in other fields of healthcare facilities management in the future. In this study, eight algorithms from two load prediction approaches (single and ensemble machine learning) were compared, which has seldom been systematically conducted in previous studies. The ensemble models outperformed single models in electric load prediction of the tested hospital, demonstrating its ability to support the decision-making process of facility managers of hospitals. In addition, both general characteristics (e.g., weather parameters) and function-specific characteristics (e.g., the number of patients) were considered when building the prediction model, making the model context closer to the actual operation situation of hospital buildings. Although the proposed model has satisfactory predictive performance, the following limitations are acknowledged. The nature of the proposed method is data-driven, meaning the prediction performance highly depends on the quality of data. Even rigorous data preprocessing has been conducted before the formal experiment, there may still exist some data noise. Thus, the characteristics of data collected from a specific hospital may affect its accuracy. It would be better to test the performance of the proposed procedure in several hospitals. Besides, the occupancy in the hospital consists of several types of people, including doctors, nurses, patients, and their visitors, facilities managers, etc. In this study, due to the accessibility of data, only three types of patients were included. Further research can be conducted for a deeper analysis of the effect of occupancy by taking all of them into consideration. Healthcare facilities are a vital part of social and medical organizations providing the society with needed healthcare. In addition, they are also the main battlefield of the public health emergency system fighting a pandemic like coronavirus disease 2019 . Serving as the lifeline for all activities, energy consumption plays an important role in ensuring the efficient operations of healthcare facilities. Predicting the electrical load of healthcare buildings accurately can support the decision-making processes of healthcare facility managers to improve building energy performance. This study compared the precision of eight machine learning models trained with daily and weekly datasets from a general hospital in Shanghai. It was found that for daily electrical load prediction, RF, XGBoost, and SVR were the most accurate ensemble and single learning models, with a MAPE on the test dataset of 9.64%, 9.81%, and 10.67%, respectively. These can be considered as reliable intelligent prediction models for facility/energy managers to conduct daily electrical load prediction in the future. In addition, based on the same dataset, the impact of forecasting granularity on prediction performance was tested. By comparing the results of daily and weekly load prediction, it was found that the performance would improve by using more granular or detailed energy usage data. One possible explanation is that a detailed load profile can decrease the uncertainty in computing. In terms of the feature importance, outdoor temperature, air pressure, and operation status of the central air conditioning system were found to be the top 3 contributing factors. The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. This study was supported by the International Exchange Program for Graduate Students of Tongji University, China (No. 201902024) , the Support Program for Young and Middle-Tech Leading Talents of Tongji University ''Operation Management of Complex and Mega Projects'', China. Shanghai Hospital Development Center, China and Shanghai Tenth People's Hospital, China were sincerely acknowledged for providing the original data. The number of features to consider when looking for the best split (1,11,1) 5 The number of features to consider when looking for the best split (1,11,1) 3 Performance evaluation of natural ventilation strategies for hospital wards -a case study of great ormond street hospital A classification of healthcare facilities: Toward the development of energy performance benchmarks for day surgery centers in Australia A review of data-driven building energy consumption prediction studies Rehabilitation of the building envelope of hospitals: Achievable energy savings and microclimatic control on varying the HVAC systems in mediterranean climates Electrical consumption forecasting in hospital facilities: An application case Energy consumption analysis and characterization of healthcare facilities in the United States Energy consumption analysis and characterization of healthcare facilities in the United States Explaining machine learning models in sales predictions Enhancing building energy efficiency by adaptive façade: A computational optimization approach Short-term electricity forecasting of airconditioners of hospital using artificial neural networks An enhanced bacterial foraging optimization and its application for training kernel extreme learning machine Solar powered healthcare in developing countries Research on short-term and ultra-shortterm cooling load prediction models for office buildings Commercial buildings energy consumption survey: Energy usage summary Dilution effect of the building area on energy intensity in urban residential buildings Electrical and thermal energy in private hospitals: Consumption indicators focused on healthcare activity Improving customer satisfaction of a healthcare facility: reading the customers Evaluation of energy consumption in german hospitals: Benchmarking in the public sector Gaussian process modeling for measurement and verification of building energy savings Investigation and evaluation of energy consumption performance for hospital buildings in China A bottom-up and procedural calibration method for building energy simulation models based on hourly electricity submetering data HBoost: A heterogeneous ensemble classifier based on the boosting method and entropy measurement Choosing measures for energy efficient hospital buildings Measurement of energy, demand, and water savings Designing a short-term load forecasting model in the urban smart grid system Development of a conceptual benchmarking framework for healthcare facilities management: Case study of shanghai municipal hospitals A data-driven strategy for detection and diagnosis of building chiller faults using linear discriminant analysis Occupancy data analytics and prediction: A case study Short term hospital occupancy prediction Short-term residential load forecasting: Impact of calendar effects and forecast granularity Realizing a stacking generalization model to improve the prediction accuracy of major depressive disorder in adults Benchmarking acute hospitals: Composite electricity targets based on departmental consumption intensities? Energy Build World Energy Balances : Overview Online bagging and boosting Development of a new energy benchmark for improving the operational rating system of office buildings using various data-mining techniques Space heating demand response potential of retrofitted residential apartment blocks Scikit-learn: Machine learning in python Hourly prediction of a building's electricity consumption using case-based reasoning, artificial neural networks and principal component analysis Energy consumption modeling by machine learning from daily activity metering in a hospital Prediction of energy consumption in hotel buildings via support vector machines Machine-learning algorithms for predicting on-farm direct water and electricity consumption on pasture based dairy farms Energy efficient policy and real time energy monitoring in a large hospital facility: A case study A hybrid model for building energy consumption forecasting using long short term memory networks Sciencedirect sciencedirect sciencedirect sciencedirect energy performance study in thailand hospital building energy performance study in thailand hospital building nattanee the thinate, wongkot of assessing feasibility using the heat thailand demand fo New feature selection and voting scheme to improve classification accuracy Enhanced bagging (eBagging): A novel approach for ensemble learning Chaotic multi-swarm whale optimizer boosted support vector machine for medical diagnosis Building thermal load prediction through shallow machine learning and deep learning Forecasting district-scale energy dynamics through integrating building network and long short-term memory learning algorithm Building energy efficiency for public hospitals and healthcare facilities in China: Barriers and drivers A review of artificial intelligence based building energy use prediction: Contrasting the capabilities of single and ensemble prediction models Artificial intelligent models for improved prediction of residential space heating Random forest based hourly building energy prediction Random forest based hourly building energy prediction A study of city-level building energy efficiency benchmarking system for China Enhanced moth-flame optimizer with mutation strategy for global optimization A review and analysis of regression and machine learning models on commercial building electricity load forecasting Total energy use in buildings Analysis and evaluation methods -Final Report of IEA EBC Annex Feature selection based on improved ant colony optimization for online detection of foreign fiber in cotton A review on the prediction of building energy consumption Chaos enhanced grey wolf optimization wrapped ELM for diagnosis of paraquat-poisoned patients Using long short-term memory networks to predict energy consumption of air-conditioning systems See Tables A.1-A.3. See Tables B.1-B.3.