Development of a Device and Algorithm Research for Akhal-Teke Activity Level Analysis
Abstract
:Featured Application
Abstract
1. Introduction
2. Materials and Methods
2.1. System Architecture
2.2. Data Acquisition
2.3. Data Processing
2.4. Algorithm Design
2.4.1. Stage 1: Combined Acceleration Interval Counting Method
2.4.2. Stage 2: Combined Acceleration Variance Analysis Method
- When the horse is in a low-activity state, it ranges from 0 to 1.2.
- During the slow, medium activity, it ranges from 1.2 to 29.
- When the horse is moving rapidly in a high activity state, it exceeds 29.
- Periodically collecting combined accelerometer data via a timer.
- Equation (4) calculates the variance with a data collection window size of n. represents the variance, and stands for the mean, calculated as .
- Equation (5) determines the activity levels of the horse based on the variance of the combined acceleration data.
2.4.3. Stage 3: Variance-Based Proximity Classification
- Equation (6) calculates the Euclidean distance between a test point and each training point :
- Equation (7) sorts the distances and identifies the closest k training points, forming the set .
- Equation (8) counts the occurrences of each label among the k-nearest neighbor labels. The label with the highest frequency is selected as the prediction.
2.4.4. Threshold Analysis of Combined Acceleration
- Equation (9) represents the combined acceleration set with a data collection window size of n.
- Equation (10) is used to calculate the data volume for low-activity behavior; is the indicator function.
- Equation (11) is used to calculate the variance within the interval.
- Equation (12) returns the final activity level, using Stage 1 methods to determine low activity, Stage 2 methods to determine medium activity, and Stage 3 methods to determine high activity.
3. Results
3.1. Model Training Results
- 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%.
- Using Equation (14), the accuracy was calculated to be 92.74%.
- 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.
- 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].
3.2. Validation of the Trained Models
3.3. Statistical Time
4. Discussion
4.1. Device Positions and Frequencies
4.2. Data Collection Window
4.3. Classification Algorithm
4.4. Limitations and Future Work
- Hardware resource limitations:
- 2.
- Sample limitations:
- 3.
- Algorithm simplification:
- 4.
- Activity level evaluation model accuracy:
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Appendix A
Algorithm A1: Combined Acceleration Threshold Analysis |
acc_data: Array of combined accelerations |
samplingQuantity: Data collection window |
function main() { |
if (Interval_notation (acc_data) == 0) { //Interval counting method for analysis |
return 0 // low activity |
} |
mean = calculate_mean(acc_data, samplingQuantity) |
variance = calculate_variance(acc_data, samplingQuantity, mean) |
return determine_behavior(variance) |
} |
// Variance analysis method for analysis |
function determine_behavior(variance) { |
if (variance <= 1.2) { |
return 0 // low activity |
} else if (variance <= 29) { |
return 1 // medium activity |
} else |
return 2 // high activity |
} |
//Variance-Based Proximity Classification |
int* high_activity_predict (float X_train[][], int y_train[], int train_size, float X_test[], int test_size, int k, int p) |
{ |
int* y_pred = malloc (test_size * sizeof(int)); |
for (int i = 0; i < test_size; i++) { |
float distances[train_size]; |
for (int j = 0; j < train_size; j++) { |
distances[j] = minkowski_distance(X_test[i], X_train[j], p); |
} |
// Sort distances and select the k nearest labels |
int* k_nearest_labels = find_k_nearest_labels(distances, y_train, k); |
y_pred[i] = most_common_label(k_nearest_labels, k); |
free(k_nearest_labels); |
} |
return y_pred; |
} |
Threshold Analysis Model | Interval Counting Model | Proximity Classification Model |
---|---|---|
represents a set containing the interval counting model and the variance analysis model. | , where represents the data point. | Assumption: represents the actual data, represents the trained data, k represents the number of neighbors, and p represents the distance. |
represents the calculation of the op-timal analysis model, where denotes evaluating the model’s performance through experimentation. | N represents the number of data points that meet the condition. | is the Euclidean distance between the actual data and the test data. |
represents the threshold adjusted based on the scaling factor. | Nk represents the k-nearest training points. | |
The predicted result is the label with the highest frequency among the k-nearest neighbor labels. |
References
- Takahashi, Y.; Mukai, K.; Matsui, A.; Ohmura, H.; Takahashi, T. Electromyographic Changes in Hind Limbs of Thoroughbreds with Fatigue Induced by Treadmill Exercise. Am. J. Vet. Res. 2018, 79, 828–835. [Google Scholar] [CrossRef]
- Crecan, C.M.; Peștean, C.P. Inertial Sensor Technologies—Their Role in Equine Gait Analysis, a Review. Sensors 2023, 23, 6301. [Google Scholar] [CrossRef]
- Casella, E.; Khamesi, A.R.; Silvestri, S. Smartwatch Application for Horse Gaits Activity Recognition. In Proceedings of the 2019 IEEE International Conference on Smart Computing (SMARTCOMP), Washington, DC, USA, 12–15 June 2019; pp. 409–416. [Google Scholar]
- Tran, D.-N.; Nguyen, T.N.; Khanh, P.C.P.; Tran, D.-T. An IoT-Based Design Using Accelerometers in Animal Behavior Recognition Systems. IEEE Sens. J. 2022, 22, 17515–17528. [Google Scholar] [CrossRef]
- Giannetto, C.; Giudice, E.; Acri, G.; Fazio, F.; Piccione, G. Interspecies Comparison of Daily Total Locomotor Activity Monitoring in Different Management Conditions. J. Vet. Behav. 2018, 23, 97–100. [Google Scholar] [CrossRef]
- McLennan, K.M.; Skillings, E.A.; Rebelo, C.J.B.; Corke, M.J.; Pires Moreira, M.A.; Morton, A.J.; Constantino-Casas, F. Technical Note: Validation of an Automatic Recording System to Assess Behavioural Activity Level in Sheep (Ovis aries). Small Rumin. Res. 2015, 127, 92–96. [Google Scholar] [CrossRef]
- Fogarty, E.S.; Swain, D.L.; Cronin, G.M.; Moraes, L.E.; Trotter, M. Behaviour Classification of Extensively Grazed Sheep Using Machine Learning. Comput. Electron. Agric. 2020, 169, 105175. [Google Scholar] [CrossRef]
- Jin, Z.; Guo, L.; Shu, H.; Qi, J.; Li, Y.; Xu, B.; Zhang, W.; Wang, K.; Wang, W. Behavior Classification and Analysis of Grazing Sheep on Pasture with Different Sward Surface Heights Using Machine Learning. Animals 2022, 12, 1744. [Google Scholar] [CrossRef]
- Ren, K.; Karlsson, J.; Liuska, M.; Hartikainen, M.; Hansen, I.; Jørgensen, G.H. A Sensor-Fusion-System for Tracking Sheep Location and Behaviour. Int. J. Distrib. Sens. Netw. 2020, 16, 1550147720921776. [Google Scholar] [CrossRef]
- Benaissa, S.; Tuyttens, F.A.M.; Plets, D.; de Pessemier, T.; Trogh, J.; Tanghe, E.; Martens, L.; Vandaele, L.; Van Nuffel, A.; Joseph, W.; et al. On the Use of On-Cow Accelerometers for the Classification of Behaviours in Dairy Barns. Res. Vet. Sci. 2019, 125, 425–433. [Google Scholar] [CrossRef]
- Li, Y.; Shu, H.; Bindelle, J.; Xu, B.; Zhang, W.; Jin, Z.; Guo, L.; Wang, W. Classification and Analysis of Multiple Cattle Unitary Behaviors and Movements Based on Machine Learning Methods. Animals 2022, 12, 1060. [Google Scholar] [CrossRef]
- Wang, J.; He, Z.; Ji, J.; Zhao, K.; Zhang, H. IoT-Based Measurement System for Classifying Cow Behavior from Tri-Axial Accelerometer. Cienc. Rural. 2019, 49, e20180627. [Google Scholar] [CrossRef]
- Lesimple, C. Indicators of Horse Welfare: State-of-the-Art. Animals 2020, 10, 294. [Google Scholar] [CrossRef]
- König von Borstel, U.; Pasing, S.; Gauly, M. Towards a More Objective Assessment of Equine Personality Using Behavioural and Physiological Observations from Performance Test Training. Appl. Anim. Behav. Sci. 2011, 135, 277–285. [Google Scholar] [CrossRef]
- Eerdekens, A.; Deruyck, M.; Fontaine, J.; Martens, L.; Poorter, E.D.; Joseph, W. Automatic Equine Activity Detection by Convolutional Neural Networks Using Accelerometer Data. Comput. Electron. Agric. 2020, 168, 105139. [Google Scholar] [CrossRef]
- Nauwelaerts, S.; Zarski, L.; Aerts, P.; Clayton, H. Effects of Acceleration on Gait Measures in Three Horse Gaits. J. Exp. Biol. 2015, 218, 1453–1460. [Google Scholar] [CrossRef]
- Serra Bragança, F.M.; Broomé, S.; Rhodin, M.; Björnsdóttir, S.; Gunnarsson, V.; Voskamp, J.P.; Persson-Sjodin, E.; Back, W.; Lindgren, G.; Novoa-Bravo, M.; et al. Improving Gait Classification in Horses by Using Inertial Measurement Unit (IMU) Generated Data and Machine Learning. Sci. Rep. 2020, 10, 17785. [Google Scholar] [CrossRef]
- Thompson, C.J.; Luck, L.M.; Keshwani, J.; Pitla, S.K.; Karr, L.K. Location on the Body of a Wearable Accelerometer Affects Accuracy of Data for Identifying Equine Gaits. J. Equine Vet. Sci. 2018, 63, 1–7. [Google Scholar] [CrossRef]
- Wu, Z.; Zhou, C. Equestrian Sports Posture Information Detection and Information Service Resource Aggregation System Based on Mobile Edge Computing. Mob. Inf. Syst. 2021, 2021, e4741912. [Google Scholar] [CrossRef]
- Jiang, C.; Qi, J.; Hu, T.; Wang, X.; Bai, T.; Guo, L.; Yan, R. Research on Six-Axis Sensor-Based Step-Counting Algorithm for Grazing Sheep. Sensors 2023, 23, 5831. [Google Scholar] [CrossRef]
- Scheidegger, M.D.; Gerber, V.; Dolf, G.; Burger, D.; Flammer, S.A.; Ramseyer, A. Quantitative Gait Analysis Before and After a Cross-Country Test in a Population of Elite Eventing Horses. J. Equine Vet. Sci. 2022, 117, 104077. [Google Scholar] [CrossRef]
- Barwick, J.; Lamb, D.W.; Dobos, R.; Welch, M.; Schneider, D.; Trotter, M. Identifying Sheep Activity from Tri-Axial Acceleration Signals Using a Moving Window Classification Model. Remote Sens. 2020, 12, 646. [Google Scholar] [CrossRef]
- Cervantes, I.; Gutiérrez, J.P.; García-Ballesteros, S.; Varona, L. Combining Threshold, Thurstonian and Classical Linear Models in Horse Genetic Evaluations for Endurance Competitions. Animals 2020, 10, 1075. [Google Scholar] [CrossRef]
- Cerioli, M.R.; de Oliveira, F.S.; Szwarcfiter, J.L. The Interval Count of Interval Graphs and Orders: A Short Survey. J. Braz. Comput. Soc. 2012, 18, 103–112. [Google Scholar] [CrossRef]
- Larson, M.G. Analysis of Variance. Circulation 2008, 117, 115–121. [Google Scholar] [CrossRef]
- Walton, E.; Casey, C.; Mitsch, J.; Vázquez-Diosdado, J.A.; Yan, J.; Dottorini, T.; Ellis, K.A.; Winterlich, A.; Kaler, J. Evaluation of Sampling Frequency, Window Size and Sensor Position for Classification of Sheep Behaviour. R. Soc. Open Sci. 2018, 5, 171442. [Google Scholar] [CrossRef]
- Mansbridge, N.; Mitsch, J.; Bollard, N.; Ellis, K.; Miguel-Pacheco, G.G.; Dottorini, T.; Kaler, J. Feature Selection and Comparison of Machine Learning Algorithms in Classification of Grazing and Rumination Behaviour in Sheep. Sensors 2018, 18, 3532. [Google Scholar] [CrossRef]
- Mills, D.S.; Nankervis, K.J. Equine Behaviour: Principles and Practice; John Wiley & Sons: Hoboken, NJ, USA, 2013; ISBN 978-1-118-70814-9. [Google Scholar]
- Barrey, E.; Hermelin, M.; Vaudelin, J.L.; Poirel, D.; Valette, J.P. Utilisation of an Accelerometric Device in Equine Gait Analysis. Equine Vet. J. 1994, 26, 7–12. [Google Scholar] [CrossRef]
- Waele, T.; Shahid, A.; Peralta, D.; Tuyttens, F.; Poorter, E. Towards Unsupervised Animal Activity Recognition: A Deep Learning Based Clustering Algorithm for Equine Gait Classification. Research Square 2024. [Google Scholar] [CrossRef]
- Neethirajan, S. Transforming the Adaptation Physiology of Farm Animals through Sensors. Animals 2020, 10, 1512. [Google Scholar] [CrossRef]
- Di Tocco, J.; Raiano, L.; Sabbadini, R.; Massaroni, C.; Formica, D.; Schena, E. A Wearable System with Embedded Conductive Textiles and an IMU for Unobtrusive Cardio-Respiratory Monitoring. Sensors 2021, 21, 3018. [Google Scholar] [CrossRef]
- Ressi, D.; Romanello, R.; Piazza, C.; Rossi, S. AI-Enhanced Blockchain Technology: A Review of Advancements and Opportunities. J. Netw. Comput. Appl. 2024, 225, 103858. [Google Scholar] [CrossRef]
Breed | Time | Activity Levels | ||
---|---|---|---|---|
Low Activity | Medium Activity | High Activity | ||
Akhal-Teke horses | 10:38–10:43 | √ | ||
10:43–10:46 | √ | |||
10:46–11:10 | √ | |||
⋮ | ⋮ | ⋮ | ⋮ | |
12:11–12:19 | √ |
Activity Levels | X-Axis | Y-Axis | Z-Axis | ACC |
---|---|---|---|---|
low activity | −5.89 | 6.8 | −4.5 | 10.05 |
−4.85 | 7.43 | −5.55 | 10.46 | |
⋮ | ⋮ | ⋮ | ⋮ | |
−4.92 | 7.51 | −4.22 | 9.92 | |
−4.93 | 5.99 | −5.3 | 9.39 | |
medium activity | 8.98 | 9.58 | −5.84 | 14.37 |
−1.09 | 11.57 | −5.41 | 12.81 | |
⋮ | ⋮ | ⋮ | ⋮ | |
−3.45 | 4.9 | −5.41 | 8.07 | |
4.67 | −2.01 | −6.09 | 7.93 | |
high activity | −23.8 | −19.83 | 10.23 | 32.62 |
−22.64 | 16.25 | 12.59 | 30.58 | |
⋮ | ⋮ | ⋮ | ⋮ | |
3.6 | −13.36 | −2.86 | 14.12 | |
−3.3 | 0.68 | 2.09 | 3.96 |
Interval Analysis Threshold | Accuracy |
---|---|
86.92% | |
87.19% | |
78.92% | |
74.13% |
Variance Boundary Value | Classification Accuracy |
---|---|
1.0 | 90.56% |
1.1 | 90.68% |
1.2 | 90.72% |
1.3 | 90.52% |
1.4 | 90.64% |
1.5 | 90.44% |
1.6 | 90.41% |
Variance Boundary Value | Classification Accuracy |
---|---|
20 | 87.23% |
25 | 89.83% |
27 | 90.37% |
28 | 90.79% |
29 | 90.87% |
30 | 90.72% |
31 | 90.68% |
32 | 90.60% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chen, X.; Li, F.; Li, J.; Fan, Q.; Kwan, P.; Zheng, W.; Guo, L. Development of a Device and Algorithm Research for Akhal-Teke Activity Level Analysis. Appl. Sci. 2024, 14, 5424. https://doi.org/10.3390/app14135424
Chen X, Li F, Li J, Fan Q, Kwan P, Zheng W, Guo L. Development of a Device and Algorithm Research for Akhal-Teke Activity Level Analysis. Applied Sciences. 2024; 14(13):5424. https://doi.org/10.3390/app14135424
Chicago/Turabian StyleChen, Xuan, Fuzhong Li, Jinxing Li, Qijie Fan, Paul Kwan, Wenxin Zheng, and Leifeng Guo. 2024. "Development of a Device and Algorithm Research for Akhal-Teke Activity Level Analysis" Applied Sciences 14, no. 13: 5424. https://doi.org/10.3390/app14135424
APA StyleChen, X., Li, F., Li, J., Fan, Q., Kwan, P., Zheng, W., & Guo, L. (2024). Development of a Device and Algorithm Research for Akhal-Teke Activity Level Analysis. Applied Sciences, 14(13), 5424. https://doi.org/10.3390/app14135424