## 4 Content Analysis and Data Mining
### Group 3: Energy Management and Artificial Intelligence
#### 4.3.2 Artificial Intelligence and Indoor Systems
The proposed system works based on the following steps: (1) The home gateways include agents, which are installed on them and mounted on the users' properties. (2) The behavior of local smart devices and the gateway is monitored by the mentioned agents. So, data of the different interfaces of the home area network is gathered by agents. (3) The gathered data is then examined in order to identify any attack. (4) If an anomaly is detected, it will be annotated with extra information about the home area network devices, which are connected to the detected packet flow. The performance of the proposed method is evaluated by simulation. In the first step, the traffic, which is sent by the end nodes, is simulated, and the performance of local anomaly detection is tested by that data. Secondly, annotated anomalies are used to link strange events. The findings of the simulation indicate that local anomalies can be useful in terms of signs of potential attacks for identification of the strange act of the endpoints. Figure 11 shows a typical smart home plan based on the relevant papers of the theme discussed in this section. The plan includes five smart systems: to recognize objects and activities to identify pattern behavior [81]; to control the activities performed in a smart home [82]; to rack objects for non-GPS environments [83]; to select music automatically according to users' emotions and moods [64]. As shown in Figure 11, [PERSON], [PERSON] and [PERSON] [81] proposed a framework to detect indoor occupancy and pattern behavior of the elderly based on already existing environmental monitoring systems in smart homes. The system consists of the physical environment (temperature sensors, CO\({}_{2}\) sensors, relative humidity (RH) sensors), WSN, central node, cloud-based data warehouse, machine learning models (supervised linear and non-linear techniques), and Linux-based Security Manager Protocol (SMP) server. The environmental data is acquired by sensors. A central node for acquiring such data and uploading it to a database in the cloud is used. The level of CO\({}_{2}\) is a key factor in determining the occupancy. Data analysis for relations between variables and the occupancy is done using several classification models, which have been trained after pre-processing the data. For the evaluation of the framework, a model primarily designed for HVAC control that does not require high sampling frequencies is used. The data used for the experiment includes an entire year entry, with one entry every ten minutes. The data is for the monitoring of five different rooms with thirteen residents. The results showed that the most accurate models achieved with the set of trained classifiers have an accuracy of 80%. The accuracy obtained by the model gives confidence in the identification of binary occupancy in the rooms. Building context, real building interconnections, and the airflow through adjoining rooms, windows, openings, ventilation ducts, which may change the level of humidity or CO\({}_{2}\), are suggested for future researches. [PERSON], [PERSON], [PERSON] and [PERSON] [82] tended to manage and control the activities performed in a smart home by means of smart devices or an introduced prototype. The proposed system includes a brain-computer interface (BCI) for disabled people; normal user interface like a smartphone, tablet, or computer for normal people; Radio-frequency identification (RFID) tags attached to the foods in the fridge; door/window sensors; temperature and humidity sensors; luminosity sensors; wearable sensors, GPS, fall detectors; and web service (WS) gateway. Following come a number of features about the system that are worth mentioning: An architecture in the context of the European smart home projects for All (SM4 ALL) with emphasis on service composition is implemented in this paper, and the architecture is based on Service-Oriented Architectures (SOA) principles and supports the performance of runtime service composition.