## 2 Anomaly Detection in Building's Consumption: A Brief Overview of the State of the Art  
Nowadays, the development of intelligent platforms hardly exists without the use of ML algorithms [13; 14]. Before proceeding to describe the methodology used in the detection of anomalous consumption levels (Section 3), this section presents an introduction to the anomaly detection problem and an analysis of the state of the art at the algorithmic level. An anomaly detection problem can be defined by finding points or patterns in the data that are very distinct from the rest [15]. Anomaly detection is an area of broad scope that can be used in many fields of knowledge, such as fraud detection [16; 17; 18], image processing [19], healthcare [20; 21], equipment failure detection [22; 23], or consumption [9; 24]. Anomaly detection problems are generally divided into three main categories [15; 25]: (i) Supervised; (ii) Semi-supervised; or (iii) Unsupervised detection. Supervised detection is characterized by problems wherein data are classified, i.e., anomalies and normal data are previously known. Detection approaches are usually based on algorithms that compare the new data with the classified one [26]. Semi-supervised detection is considered when only data regarding the normality of the system are known. Typically, detection algorithms train with these data and are tested with unseen datasets in order to assess the presence of anomalies [27; 28]. Finally, unsupervised detection, unlike supervised and semi-supervised solutions, is supported on unlabeled data. These algorithms usually assume that few anomalies exist in the dataset and they have different characteristics from the rest [29; 30]. Bearing in mind the challenge of the detection of consumption anomalies, it was understood that we should fit our anomaly detection problem in the category of unsupervised detection algorithms, since the data available for conducting the study were unclassified, as will later be seen in Section 4. Furthermore, the system requirements demand a solution applicable to different hotels and meters, with the possibility of dynamically adding new ones to be analyzed on the fly. As already mentioned, different algorithms exist for different types of anomaly detection problems. For example, [PERSON] et al. [31] proposed a data anomaly detection method that combines an IF and an AE algorithm. The IF algorithm computes the anomaly score of energy data, and then the lower anomaly score data are chosen for model training. Then, new data pass through the AE, trained with \"normal\" data, and records whose reconstruction error was larger than a predefined value are identified as anomalies. Experimental results of the combined method, on the electricity consumption dataset, achieved an F1 score of 0.981. [PERSON] et al. [32] presented an end-to-end solution of an anomaly detection system. The system uses the concept of a Long Short-Term Memory-based AE as an unsupervised learning model. [PERSON] et al. [33] proposed an anomalous energy consumption detection system at the appliance level, using an AE and micro-moments. In their work, the energy usage history of household appliances and occupancy patterns are used for the building of a normal energy consumption behavior model. Energy micro-moments are fixed when consumers turn an appliance on or off, change the energy consumption of a specific appliance, or enter (or leave) a given site. The energy micro-moments are associated with users' daily tasks and their patterns are fed into an AE model. The model included the detection of two kinds of anomalous energy consumption, namely: \"excessive consumption\" and \"consumption while outside\". [PERSON] et al. [34] presented a rule-based decision system for anomaly detection in multivariate time series using change point detection. Their solution automatically manages to identify anomalies and remove the false positives originated by change points. They also propose a metric based on the record to be an anomaly or a change point.