Predicting Livestock Activity Patterns with Machine Learning
Year: 2026
Type: conference-paper
Abstract: Activity recognition using wearable accelerometers allows for continuous monitoring of dairy cows without constant manual observation. A publicly available dataset of a three-axis accelerometer with segment-level behavior labels was utilized. The raw data underwent integrity checks, gap filling, and normalization before being segmented into fixed-length overlapping windows. Three classifiers were trained to distinguish between chewing, standing, lying, and moving: Random Forest and XGBoost ensembles based on features, as well as a 1D CNN operating directly on raw windows. The 1D CNN showed the best results, achieving a macro-F1 of 0.939 and a weighted F1 of 0.940. For the difficult “lying down” category, it achieved a recall of 0.855 and an F1 of 0.869. XGBoost achieved a macro-F1 of 0.877, and Random Forest achieved a macro-F1 of 0.829. Most errors occurred during the transition from lying to moving, but rumination activity was reliably identified with an F1 of 0.955. These outcomes indicate that automated activity assessments can support monitoring changes in dairy cattle behavior.
Language: English
Topic: Smart Agriculture and AI
Subfield: Plant Science
Domain: Life Sciences
SDG: Zero hunger
Open Access status: hybrid
OpenAlex ID: W7168297588
