## 3 Results
### Classification Using Machine Learning  
After conducting a comprehensive data visualization analysis, the automatic comparison module was fed with input data. This step aimed to assess the behavior and performance characteristics of the different models. The data were split into training data (80%) and testing data (20%) to ensure a robust evaluation of each model's performance. The purpose of using artificial intelligence algorithms was to check the feasibility of a real-world application. Based on the source data, three new input sets were defined:  
1. Input set 1 contained accelerations x, y, and z from the accelerometer, q0, q1, q2, and q3 from the orientation sensor, gx, gy, and gz from the gyroscope, the heart rate monitor value, and the activity type;
2. Input set 2 contained the acceleration vector magnitude, the heart rate monitor value, Euler's angles (the pitch, yaw, and roll from the orientation sensor), and the activity type;
3. Input set 3 contained the acceleration vector magnitude, q0, q1, q2, and q3 from the orientation sensor, and the activity type. The reason for defining new input data was to compare how the models performed when they were given fewer inputs and to determine whether they were sufficiently able to analyze lighter datasets in order to compute and predict activity types. The seven chosen models were trained and tested in order to determine the following metrics: accuracy, i.e., the proportion of correctly classified sets out of the total number of used sets; precision, i.e., how many instances were correctly classified as positive out of the total number of positive instances predicted by the model; recall, i.e., the ratio between the number of correctly classified positive instances and the number of actual positive instances; and the F1 score, i.e., the harmonic mean of the precision and the recall, which helps to assess the overall performance of the model. The performance metrics for each input set are presented in Table 2. As can be observed in Figure 6, where the performance for input set 1 is visually represented, all seven models have a median accuracy over 0.89, with the gradient boosting model reaching  
Figure 5: Euler’s angles (based on orientation sensor). 0.96. The working mechanisms of this model, which is more robust to overfitting, result in a more accurate prediction. The same result can be observed for the decision tree and random forest models, which, like the gradient boosting model, use tree-based models for their predictions. Overall, the gradient boosting model outperformed the other models in all metrics, making it the most suitable model for activity type recognition. Because the datasets are time series, meaning that they are recorded one after the other, the other models can be adjusted in order to detect false positive results and correct them during prediction. Comparing the three input sets, the gradient boosting and random forest classifiers demonstrated remarkable consistency in their performance metrics across diversified datasets. This demonstrates the ability of the models to adapt to data variations. Both classifiers consistently ranked among the highest performers in terms of accuracy, precision, recall, and F1 score metrics. While the k-nearest neighbors classifier achieved decent performance, it fell behind the tree-based models when lighter datasets were provided.