## 5 Discussion  
To identify the impact of the control parameters on the performance of the genetic algorithm and to fine-tune their values we have performed sensitivity analysis. We have determined how the target variables reflecting the performance of our proposed solution (i.e., fitness value and execution time) are affected by the changes in input parameters such as population size (\(popSize\)) and number of generations (\(noGenerations\)). The objective was to finetune them to the best variant so that the genetic algorithm determines the person's daily routine with the greatest accuracy. The ranges in which the input parameters are varied are [20,120] for number of generations and [20,70] for population size. Figures 12 and 13 show the evolution of the fitness value and execution time when the proposed genetic algorithm is used to detect the routine of a person. First, we maintained the population size at a constant value and varied the number of generations between 20 and 120. Then, we repeated this experiment for a population size varying between 20 and 70. For each considered configuration, 30 runs were made to compute the average values for fitness and execution time. As shown in Figure 12, with the increase in the population size, an improvement in the fitness value is achieved but also increases the execution time (see Figure 13). The trend is similar when the size of the population is maintained constant and the number of generations is increased (i.e., the  
Figure 12: The average fitness variation when generations number is changed, and population size is constant. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Reference** & **Description** & **Detection Accuracy** \\ \hline
[27] & Reweighted genetic heuristics combined & 85.4\% \\  & with classification & \\ Our solution & Genetic heuristics with dynamic selection & \\  & of operator and probability-based fitness & 80–86\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Routine detection comparative results. value of the fitness and the execution time increase). In the case of fitness evolution, at some point, the increase in the value of fitness stabilizes and does not change for many generations, while in the case of the execution time, the growth is proportional to the number of generations. As we aim to identify a routine that reflects as faithfully as possible the frequent patterns of activities that the person performs during the day, thus we focus on solutions with a fitness value as high as possible even if it involves a higher execution time. Table 4 presents the configurations that have provided the best results in terms of fitness values for routine detection. The best average fitness value is obtained for a population size of 70 and 110 generations with a minimum impact on the execution time which is kept below 1.5 s.  
We have performed multiple regression studies to analyze how the size of the population and the number of generations affect the value of the fitness in the GA approach. We investigated various regression coefficients, the ANOVA table, and the regression analysis table. For the correlation coefficient, multiple R takes values in the range \([-1,1]\) and indicates a linear relation strength between the independent and dependent variables. In the case of our algorithm, the multiple R-value is 0.92 showing a positive relation between the fitness value (dependent variable) and the population size and the number of generations (independent variables. The coefficient of determination, R square measures how much of the variation in the fitness value can be explained by the variation in population size and number of generations. In our case, the R-square value of 0.85 indicates that 85% of the