Content area

Abstract

Assessing cattle behaviors provides insights into animal health, welfare, and productivity to support on-farm management decisions. Wearable accelerometers offer an alternative approach to traditional human evaluation, providing a more objective and efficient method for predicting cattle behavior. Random cross-validation (CV) is commonly used to evaluate behavior prediction by splitting data into training and testing sets, but it can yield inflated results when records from the same animal are included in both sets. Block CV splits data by block effects, offering a more realistic evaluation but remains underexplored for predicting multi-class imbalanced cattle behavior. Additionally, deep learning (DL) models have not been fully explored for behavior prediction compared to machine learning (ML) models. The objectives of this study were to examine the impact of CV designs on multi-class imbalanced cattle behavior prediction and to compare the performance of ML and DL models. Three ML and two DL models were used to predict the four behaviors of six beef cows from a public tri-axial accelerometer dataset, with model performance evaluated using both hold-out and leave-cow-out CV designs representing random and block CV, respectively. In hold-out CV, ML models achieved accuracies of 0.94 to 0.96 and F1 scores of 0.93 to 0.95, while DL models achieved accuracies of 0.9 to 0.92 and F1 scores of 0.89 to 0.91. In the leave-cow-out CV, ML models obtained accuracies of 0.72 to 0.82 and F1 scores of 0.64 to 0.82, whereas DL models obtained accuracies of 0.76 to 0.82 and F1 scores of 0.64 to 0.76. Generally, ML models outperformed DL models in the hold-out CV, but the multi-layer perceptron DL model demonstrated comparable or superior performance in the leave-cow-out CV. All models performed better with hold-out CV than leave-cow-out CV. Our results suggest that CV designs can affect behavior prediction performance. While a random CV produces seemingly good predictions, these results can be artificially inflated by the data partition. A block CV that strategically partitions data could be a more appropriate design.

Competing Interest Statement

The authors have declared no competing interest.

Details

1009240
Business indexing term
Title
Impact of cross-validation designs on cattle behavior prediction using machine learning and deep learning models with tri-axial accelerometer data
Publication title
bioRxiv; Cold Spring Harbor
Publication year
2025
Publication date
Jan 23, 2025
Section
New Results
Publisher
Cold Spring Harbor Laboratory Press
Source
BioRxiv
Place of publication
Cold Spring Harbor
Country of publication
United States
University/institution
Cold Spring Harbor Laboratory Press
Publication subject
ISSN
2692-8205
Source type
Working Paper
Language of publication
English
Document type
Working Paper
ProQuest document ID
3158976040
Document URL
https://www.proquest.com/working-papers/impact-cross-validation-designs-on-cattle/docview/3158976040/se-2?accountid=208611
Copyright
© 2025. This article is published under http://creativecommons.org/licenses/by/4.0/ (“the License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Last updated
2025-01-24
Database
ProQuest One Academic