# Development of a Device and Algorithm Research for Akhal-Teke Activity Level Analysis
## 3 Results  
### Model Training Results  
Figure 8 presents confusion matrices for the predicted results obtained from Stage 1, Stage 2, Stage 3, and the threshold analysis of combined acceleration, respectively. Analyzing the activity level classification results using the Stage 1 interval counting method (Figure 8a), Stage 2 variance analysis method (Figure 8b), and Stage 3 variance-based proximity classification method (Figure 8c), the interval counting method demonstrated high accuracy in identifying low activity (93.91%), the variance analysis method performed well in distinguishing medium activity (94.62%), and the variance-based proximity classification method excelled in identifying high activity (91.53%). Combining the strengths of the three former methods, the combined acceleration threshold analysis (Figure 8d) exhibited improved performance in identifying low-activity and high-activity behaviors, with accuracy  
rates reaching 95.03% and 91.09%, respectively, though the accuracy for medium activity slightly decreased to 92.55%.  
The total number of samples in this experiment is 61,649, consisting of 12,564 samples for category 0, 35,991 samples for category 1, and 13,094 samples for category 2. Figure 8d shows the confusion matrix for the threshold analysis of combined acceleration, including the calculations for the number of true positives, true negatives, false positives, and false negatives. The values for sensitivity, accuracy, F-measure, and their confidence intervals were calculated, respectively.  
* Using Equation (13), the sensitivity for low activity was calculated as 95.03%, for medium activity as 92.55%, and for high activity as 91.09%. \[\text{Sensitivity}=\frac{\text{True\ Positives\ (TP)}}{\text{True\ Positives\ (TP)}+\text{False\ Negatives\ (FN)}}\] (13)
* Using Equation (14), the accuracy was calculated to be 92.74%. \[\text{True\ Positives\ (TP)}+\text{True\ Negatives\ (TN)}\] (14) \[\text{True\ Positives\ (TP)}+\text{True\ Negatives\ (TN)}+\text{False\ Positives\ (FN)}\] (15)  
Figure 8: Comparing the confusion matrices of the three methods: (**a**) Stage 1: combined acceleration interval counting method, (**b**) Stage 2: combined acceleration variance analysis method, (**c**) Stage 3: variance-based proximity classification method, and (**d**) Stages 1, 2, and 3 together: threshold analysis of combined acceleration.  
* Using Equation (15), the F-measure for low activity was 0.9248, for medium activity was 0.9440, and for high activity was 0.9041. \[F_{1}=2*\frac{\text{Precision}\cdot\text{Recall}}{\text{Precision}+\text{Recall}}\] (15)
* In Equation (16), \(n\) represents the number of samples in the dataset; z represents the z-value corresponding to the chosen confidence level, which is 1.96 for a 95% confidence level. The calculated confidence interval (CI) boundaries are [91.70, 93.7]. \[\text{CI}=\text{Accuracy}\pm\text{z}\times\sqrt{\frac{\text{Accuracy}\times (1-\text{Accuracy})}{n}}\] (16)  
These values illustrate that the model performs effectively and reliably in predicting activity levels. Overall, this method significantly enhances the identification of horse activity levels.  
Figure 9 illustrates the relationship between the data collection window (\(n\)) and the classification accuracy. In the interval counting method (Figure 9a), the accuracy gradually improves as \(n\) increases, reaching its peak at the data collection window of 25 (87.55%) and then stabilizing after that. In the variance analysis method (Figure 9b), the accuracy demonstrates an increasing trend with the increase in \(n\), reaching its peak at \(n\) = 26 (90.87%). Therefore, with \(n\) = 26, a more precise analysis of activity levels is achieved. Threshold analysis of combined acceleration attains its highest overall recognition accuracy at \(n\) = 26, reaching 92.74%.