## 2 Related Work  
Most state-of-the-art approaches to detecting frequent activity patterns of persons and daily routines can be classified as machine learning-based supervised and unsupervised approaches [7; 18; 20] and statistical or model-based approaches [17; 21; 22]. Many authors are addressing the detection of frequent daily activity patterns and routines of a person using unsupervised or supervised machine learning-based solutions. [PERSON] et al. [13] propose an unsupervised approach consisting of two steps for extracting the daily routine. In the first step, the activity data corresponding to each day are segmented into groups of locations with homogeneous distribution using the superpixels extracted via energy-driven sampling, while the second step groups the activity segments using the hierarchical graph-based region growth algorithm. In the clustering process, each activity segment is represented by the activity start and end time, the activity duration, the activity location distribution, and the location of previous activities. Even though the approach can capture the gradual change of the routine, there are some disadvantages such as the high number of parameters that need to be fine-tuned and the fact that it relies only on the person's movement data. Combined with IoT devices ML techniques are proven to be very useful for classification problems in the healthcare domain [23]. Adaptive neuro-fuzzy inference system provides good results on coagulation and flocculation problems classification. [PERSON] et al. [24] propose the use of topic models to extract daily routines in the case of patients who are in the hemiparetic rehabilitation period. The time and frequency domain-related features are extracted from sensors' data and preprocessed in activity words that are used as a vocabulary for the topic model. The activity vocabulary is built using either the K-mean algorithm to cluster the feature vectors or using rules to extract characteristics of activity routine. The main disadvantage of the approach is that, in the case of some patients, the accuracy of the results obtained is quite low (about 56% in the case of the clustered approach and 66% in the case of the rule-based approach). The hierarchical density-based spatial clustering of applications with noise (HDBSCAN) algorithm is used in [25] to cluster sleep events and extract sleep patterns. The sleep event is represented as a vector of features that stores information about the sleep start and end time, the sleep duration, the number of sleep interruptions, and the interruption category (i.e., toss and turns, awakenings, breaks). The HDBSCAN algorithm groups sleep events into nocturnal and daytime sleep patterns, from which the corresponding sleep routines will then be extracted. Even if the approach is promising, there is no relevant qualitative evaluation of the obtained results provided. Similarly, the DBSCAN algorithm is used to group instances of each activity type based on duration and start time in [26]. The clustering results are used to extract the average start time and the duration of each activity. The daily routine is defined as a sequence of activities ordered according to the activities' start time. [PERSON] et al. [27] propose a reweighted genetic algorithm-based feature selection and classification algorithm that can be used for human behavior recognition. Accelerometer signal data gathered from wearable devices are encoded into chromosomes, and a genetic algorithm is used to identify and select the classification parameters. The authors report an 85.4% accuracy, better than the compared classical techniques. [PERSON] et al. [7] use the partition around medoids clustering to identify partitions of daily routines. Two vectors, one for active sensors and one for daily activities, are submitted to the clustering algorithm. The similarity between vectors is determined using the generalized Hamming distance and the Levenshtein distance, but no qualitative evaluation of the obtained results is provided.