## 2 Materials and Methods
### Feature Selection for Physical Activity Detection
This process depends on a variable called folds of cross-validation (cv), which defines the number of how many subsets are created from a set. For example, if a set has X values, the data are divided into the number of folds defined subsets used in the cross-validation process. The cross-validation process involves training and iterating the model on different subsets of data for performance evaluation. In Figure 8, the graphs that show the learning curve for the three chosen models are illustrated. The vertical axis shows the accuracy of the model, while the horizontal axis displays training datasets (80% of the dataset). The red line, representing the training score, shows how the model performs on the training data as the training data size increases. The learning curve displays an accuracy starting from 10% of total training data with an increasing size of 10% until it reaches 100%, with a number of 10 trainings for each model. For each dataset (for example, the first 10% of data), the model is trained in an iterative way for cv (folds number) times and is validated on the same data. For a better understanding, the data are divided into cv subsets, the model is trained on cv-1 sets (the number of folds used is 5, meaning that the data are divided into 5 sets), and the accuracy is tested on the same cv-1 (the initial 10% of data, which was divided into 5 folds, is used to train and validate the model five times, each time with different 4 folds). Using the green line, the accuracy illustrated is the median value of cross-validation scores. The process is like the one for the red line, but the validation is conducted on the remaining set (for a better understanding, for the case of 10% data, they are divided into five folds, where 4 are used for training and the remaining one for validation). This process is performed 5 times for each subset of the entire data. The lighter red and green areas illustrate the other accuracy values for the same subset, while the points represent its mean values. Figure 8 shows the learning curves for the gradient boosting classifier, decision tree classifier, and random forest classifier in terms of the accuracy performance metric across variable attribute set sizes. All three plots highlight how both training and validation scores converge as the number of training attribute sets increases. While DTC and RFC start from 0 on the horizontal axis, the gradient boosting classifier starts from the third subset, because of its nature of training (it has an initialization and iterative fitting to the errors phase, compared to the other two models). While all three classifiers show a strong performance, the random forest classifier appears to be the most balanced in terms of learning from the training data and generalizing to unseen data. The decision tree classifier is the least robust, showing signs of overfitting. The gradient boosting classifier offers a middle ground solution that performs well, but with room for improvement in generalization. In short, the models are already performing well with the data provided, and adding more is unlikely to make any significant difference. Another important analysis of the models' performance is the loss curve, which is a graphical representation showing how the error evolves during iterations, with each iteration representing a new weak learner (with GBC) or a new tree to the forest (with RFC). Because of its non-iterative training process, it is not possible to compute the loss curve. In Figure 9, where the curve loss during 100 iterations is displayed, it can be observed that both models gradually learn as the number of iterations increases. Gradient boosting classifier has both training and testing loss starting high, decreasing gradually, with no signs of overfitting (both curves stay relatively close to each other).