## 1 Introduction
Other problems that may arise in the development of these solutions are related to the need for a reliable data collection system or the need for a solution adaptable to different meters and hotels, creating a problem of generalization of the algorithms. To provide effective answers to the above-identified problems, general requirements were defined for the development of the intelligent system in this study, namely: (1) Integrate data from multiple sensors, which collected data at the premises of the hotel (or other) services; (2) Make use of data science methodologies to process and extract knowledge from available data; and (3) Detect anomalies associated with consumption (e.g., energy, gas, or water) in a hotel environment. The intelligent system proposed here intends to be different from others in the sense of (a) allowing an easy adaptation to different data with distinct behaviors; (b) being compliant and easily adaptable to the different availability and combinations of variables; and (c) being computationally scalable by supporting the analysis of hundreds of data streams on a limited computational environment. In terms of (a), some appliances, such as air conditioning, are mainly used when the temperature increases above the comfort level or decreases significantly, while water heater systems require higher consumption when the temperature is low (possibly being part of the year disconnected, when supported on solar water heaters). Another example is water consumption, which has variations but is always present, with peaks dependent on the season and hour of the day. In terms of (b), distinct hotels have different sets of meters, information concerning occupancy, or meteorological data. Thus, the implemented system must be capable of adapting to whatever variables are available. Finally, related to (c), the system is expected to make predictions (anomaly detection) but also ML/DL model updates (fitting of new data) while supported in limited computer resources and multiple data streams. Thus, as a study case, the work can be summarized as follows. (i) Data from a hotel were used as the main driver for the study of two anomaly detection algorithms. (ii) As can be expected from real scenarios, the developed EDA revealed data problems (e.g., readings are missing and erratic reading peaks) which led to the investigation and adoption of methods to repair those data, before it was presented to the anomaly detection algorithms. At this level, the interquartile range was used to detect possible outliers and a linear weighted moving average was used to repair missing data. (iii) A metric to measure the accuracy and tardiness of the anomaly detection algorithms was proposed. (iv) A comparison between the isolation forest algorithm and a variational autoencoder was made, allowing us to validate that, for a system with limited computational resources and expected to look for anomalies in many meters of different hotels, the former is probably the best solution as an anomaly detection method. Finally, (v) the architecture for an anomaly detection intelligent system is proposed. With the system requirements established, the study was organized in the following way. A brief state-of-the-art analysis of anomaly detection in buildings consumption is presented in Section 2. The section starts by introducing the anomaly detection problem and then analyzes some developments and case studies in the building consumption anomaly detection field. Then, in Section 3, the theoretical background behind the algorithms studied here is explained and a newly proposed metric to compare the performances of the algorithms in unsupervised time series is presented. Section 4 provides an exploratory data analysis, introducing the procedures performed to analyze the data and the methods used to correct the identified readings problems. Section 5 describes the solutions that support the module for data treatment. Section 6 presents the comparison study between the IF and VAE algorithms.