## 3 Results
### Prediction of Physical Activity Through Machine Learning Models
F_Adverse indicates the presence of a glycemic event by considering all glucose values, while E_hypo denotes the episodes of hypoglycemia during the evening (\(E_{int}\)). N_Median, N_Var, and A_Var are statistics from the time series that point out the variance and median of glucose values in the interval \(N_{int}\) and \(A_{int}\). Data extracted from time series were split into training and test subsets, with 70% and 30% of samples, respectively. The train subset was used for training the ML methods, \begin{table}
\begin{tabular}{l l l} \hline
**Feature** & **Identifier** & **Description** \\ \hline Sum & Sum & Sum of the observed glucose concentration values. \\ \hline Median & Median & \begin{tabular}{l} Value lying at the midpoint of the frequency distribution of \\ observed glucose concentration values. \\ \end{tabular} \\ \hline Variance & Var & \begin{tabular}{l} Measure of dispersion of the observed glucose \\ concentration values. \\ \end{tabular} \\ \hline Entropy & Entropy & \begin{tabular}{l} Measure of amount of uncertainty within the observed \\ glucose values. \\ \end{tabular} \\ \hline Hyperglycemic events & Hyper & \
\begin{tabular}{l} Total number of observed glucose concentration values \\ within the hyperglycemic range. \\ \end{tabular} \\ \hline Hypoglycemic events & Hypo &
\begin{tabular}{l} Total number of observed glucose concentrations values \\ within the hypoglycemic range. \\ \end{tabular} \\ \hline Adverse events & Adverse & Sum of hypoglycemic and hyperglycemic events. \\ \hline \end{tabular}
\end{table} 
Table 1: Description of the variables extracted from glucose measurements. Figure 6: Voting results of eight FS methods by indicating the frequency of selection of each feature for each BG monitoring device. whereas the test subset was only used to assess the performance of the trained models. Both subsets were balanced to ensure the same number of samples for each class (PA and NDA). To avoid bias, we used five independent partitions, each of which has a training and test subset. To find the best hyperparameters, we considered a leave-one-out cross-validation approach, a special case of k-fold cross-validation, in which the number of folds equals the number of samples. This method is adopted to obtain reliable predictive results when the number of samples of a dataset is scarce. Several hyperparameters were explored for the supervised models, which are shown in Table 2.  
To study the impact of PA during the day, we consider the four time intervals defined in the previous section (\(M_{int}\), \(A_{int}\), \(E_{int}\), and \(N_{int}\)). In this way, the features mentioned previously are extracted independently for the whole glucose values \(F_{int}\) as well as for each of the four time intervals. In the remainder of this paper, the feature names will include a prefix to denote what time interval each mentioned feature represents. For instance, \(A\_Var\) refers to the variance in \(A_{int}\). By summarizing, the extraction process results in a total of 35 features (7 features for each time interval and 7 considering the full day). The classification results using the three glucose monitoring devices are presented in Table 3, showing the mean and standard deviation obtained over five test partitions. As shown, the highest predictive results are achieved using the ML models KNN, LR, SVM, TabPFN, and XGB, reaching accuracy mean values over 0.88. The best predictive results are reached using Eversense, with LR and XGB obtaining an F1-score of 0.91 \(\pm\) 0.05 and 0.92 \(\pm\) 0.04, respectively. Although it was seen in the previous section that the deviation metrics by Eversense and FSL are higher in PA than NDA, these differences could potentially aid in the identification of high-intensity PA.