Cattle behavior classification using Hidden Markov Models
The increasing demand for meat production necessitates more sustainable and data-driven livestock management practices. Precision Livestock Farming (PLF) leverages sensor technologies and computational methods to monitor individual animals, enhancing productivity and welfare. In this study, we use Hidden Markov Models (HMMs) to classify free-range cattle behavior using GPS and tri-axial accelerometer data collected from 22 Angus-based cows over a nine-week winter period in western Montana, USA. Following model validation, HMM-predicted behavioral states were used to examine large-scale behavioral patterns across the entire dataset. The analysis revealed pronounced diurnal activity cycles, temperature-dependent shifts in behavior, and significantly greater nighttime grazing activity during full moon periods. Generalized Linear Mixed Models (GLMMs) further demonstrated significant interactions between temperature and time of day, showing that cattle increasingly shifted grazing activity toward cooler periods as temperatures increased. These findings provide insight into how environmental conditions influence free-range cattle behavior and demonstrate the value of sensor-based monitoring for precision grazing management. To enable this analysis, we engineered four features; step size, turning angle, and the mean and variance of Signal Vector Magnitude (SVM), and used these in a three-state HMM to classify grazing, resting, and traveling behaviors. Model development was conducted using leave-one-out cross-validation to assess generalizability across individuals, achieving an average classification accuracy of 92.72%. Our findings demonstrate the utility of HMMs as robust, transparent, and computationally efficient tools for cattle behavior classification in extensive rangeland settings. The approach holds promise for real-time PLF applications such as early anomaly detection, resource allocation, and adaptive grazing management.
Authors
- Timothy DelCurto (ORCID: https://orcid.org/0000-0002-2247-9855)
- Ali Yalçin (ORCID: https://orcid.org/0000-0002-9543-0681)
- Thomas Lipinski
- Samuel A. Wyffels
- Noah G. Davis
Institutions
- Montana State University (US)
Publication Details
- Journal
- Computers and Electronics in Agriculture
- Published
- 2026-06-30
- DOI
- https://doi.org/10.1016/j.compag.2026.112113
- Primary Topic
- Food Supply Chain Traceability
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Montana State University