## 3 Results
### Prediction of Physical Activity Through Machine Learning Models  
In this subsection, we present the results obtained using several ML-based models for identifying when a T1D patient has performed high-intensity PA. In particular, DT, KNN, LR, MLP, RF, SVM, TabPFN, and XGB were considered in this study. The source code for the reproducibility of results is available at [[https://github.com/cdchushig/exercise-cgm](https://github.com/cdchushig/exercise-cgm)]([https://github.com/cdchushig/exercise-cgm](https://github.com/cdchushig/exercise-cgm)) (accessed on 21 October 2024). Before applying ML models, information from glucose time series was extracted using a feature extraction approach based on statistics and the number of hypoglycemic and hyperglycemic episodes. As stated, glucose measurements were represented by time series; however, since these data were scarce and irregularly sampled, we performed a feature extraction process based on statistics. In particular, four statistics were used, including  
Figure 3: Proportion of glucose concentrations in zone A of CEG by considering different glucose ranges (hypoglycemia, euglycemia, hyperglycemia) and PA and NDA for (**a**) Eversense and (**b**) FSL. * indicates statistically significant differences in the impact of physical activity (PA versus NDA) according to the two-proportion z-test (with level of significance of 0.05). sum, median, variance, and entropy. We also considered the number of hypoglycemic and hyperglycemic episodes and the total number of adverse events (sum of hypoglycemic and hyperglycemic episodes). A brief description of these features is shown in Table 1.  
Figure 4: MAD and MARD values during PA and NDA for different time intervals for (**a,b**) Eversense against FSLcstrip and (**c,d**) FSL against FSLcstrip. MAD and MARD were calculated based on the differences between glucose values recorded by the CGM device and FSLcstrip for PA and NDA, respectively. The comparison highlights whether there are significant differences between the PA and NDA conditions across glucose ranges. * indicates statistically significant differences in the impact of physical activity according to the two-proportion z-test (with level of significance of 0.05). Figure 5: Proportion of glucose concentrations in zone A of CEG by considering different time intervals (\(M_{int}\), \(A_{int}\), \(E_{int}\), \(N_{int}\)) and the periods PA and NDA for (**a**) Eversense and (**b**) FSL. * indicates statistically significant differences in the impact of physical activity (PA versus NDA) according to the two-proportion test (with level of significance of 0.05). The extraction process results in a total of 35 features, 7 features for each time interval (\(M_{int}\), \(A_{int}\), \(E_{int}\), \(N_{int}\)), and 7 considering glucose data during all day. We also conducted a correlation analysis using the Pearson correlation coefficient (PCC), aiming to discard those features highly correlated (with a PCC over 0.7). As a result, 15 features were kept for FSLCstrip, 16 for Eversense, and 15 for FSL. Then, we used several filter, wrapper, and embedded FS methods to select the most important features. Given that several FS methods were considered, a voting strategy was conducted for selecting the most representative features, keeping those features chosen by at least three of the eight FS methods. Figure 6 shows the voting results of the eight FS methods, which indicates the frequency of selection of each feature for different BG monitoring devices studied in the paper. A total of 11 features were selected for FSLCstrip (F_Adverse, N_Median, N_Sum, N_Var, E_Median, A_Var, E_Hyper, N_Hypo, M_Entropy, M_Hypo, E_Hypo), 14 for Eversense (F_Adverse, N_Median, N_Var, N_Adverse, M_Var, M_Entropy, E_SumValues, E_Var, F_SumValues, A_Var, M_Hypo, E_Hypo, M_Median, E_Median), and 10 for FSL (M_SumValues, A_Var, F_Adverse, M_Var, N_Var, A_Hypo, N_Hyper, N_Median, E_Hypo, N_Entropy). As shown in Figure 6, F_Adverse, N_Median, N_Var, A_Var, and E_Hypo are the features most voted for.