## 2 Related Work
The Gap-BIDE algorithm is combined with collaborative clustering to extract flexible daily routines by considering variations in terms of activities sequence and timespan in [28]. The routine is defined based on the time spent by the person in each room in [20]. The time is estimated with a Bluetooth-based location system and supervised machine learning algorithms. Routine detection is performed with the affinity propagation algorithm using as input the time vectors of each of the monitored days and grouping them into clusters from which different routines are extracted. The main drawback is that the routine is extracted using only a single feature, namely the time spent by the person in each room. [PERSON] et al. [18] learn the routine of older persons by extracting features such as activities' duration and frequency from sensors' data. However, this approach does not consider contextual information that could reduce the false positives in the identified routines. Genetic algorithms have proved to be useful for various domains that resemble daily living activities identification and classification such as disassembly sequence planning, a combinatorial optimization problem [29]. Heuristics such as red deer and whale optimization can be considered alone or hybridized with a genetic algorithm and simulated annealing to obtain more accurate results [30]. An approach based on spatiotemporal fusion adaptive resonance theory (ART) neural network to learn the person's daily routine is proposed in [6]. The spatiotemporal information is encoded as input features of the neural network. It allows learning for each activity the time interval, the duration, the day of the week, and the location in which is carried. A limitation is that there is no meaningful symbolic representation of the learned patterns, and the interpretation of the learned routine is done manually. The complexity of home healthcare under pandemic situations such as COVID-19 has been addressed in [31,32]. Routing and scheduling caregivers to visit patients' homes considering economic, environmental, and social criteria is rather difficult. Multi-objective optimization heuristic has been proposed on top of the IoT monitoring further improving the home care processes. The statistical and model-based approaches are aiming to construct a deterministic model of the frequent behavioral patterns and use the model to detect the person's routines. [PERSON] et al. [17] determine the daily routine based on the data provided by the smartphone and environmental sensors. The person's daily behaviors are created using hidden Markov models and include sequences of performed activities and their location. To extract the daily routine, the maximum probability transitions and the Viterbi algorithm are used. One limitation of this approach is that it considers the logical relationship of the behavior occurrence without interpreting their time rule. The daily routine is detected based on the data collected with Beacon technology in [16]. The person's daily routine is extracted using a Markov-based model and includes sequences of performed activities and their duration. The main drawback of this approach is that it can identify only a single rigid routine. [PERSON] et al. [21] propose an approach based on activity probability maps, where the sensors data are used to identify the daily routine. Activity maps are created for each room of the house where the person lives and contain the probability that a sensor is activated. Similarly, in [33], a model-based approach is described in which activity maps are used to encode the information (i.e., activity, intensity, and spatial distribution) about the daily life activities collected from binary sensors. A set of activity maps is created. Each map is modeled one hour from the considered days. The smallest bounding circle is identified as part of the routine. The approach does not consider the time when the monitored person is not at home, and more experiments need to choose the best timeframe to build the activity maps.