bioRxivAnimal Behavior & Cognition
Evaluating machine learning algorithms to predict lameness in dairy cattle
Rajesh Neupane, Ashrant AryaliD, Angelika HaeussermanniD, Eberhard HartungiD, Pablo PinedoiD, Sushil PaudyaliD
Abstract
Dairy cattle lameness represents one of the common concerns in intensive and commercial dairy farms. Lameness is characterized by gait-related behavioral changes in cows and multiple approaches are being utilized to associate these changes with lameness conditions including data from accelerometers, and other precision technologies. The objective was to evaluate the use of machine learning algorithms for the identification of lameness conditions in dairy cattle. In this study, 310 multiparous Holstein dairy cows from a herd in Northern Colorado were affixed with a leg-based accelerometer (Icerobotics(R) Inc, Edinburg, Scotland) to obtain the lying time (min/d), daily steps count (n/d), and daily change (n/d). Subsequently, study cows were monitored for 4 months and cows submitted for claw trimming (CT) were differentiated as receiving corrective claw trimming (CCT) or as being diagnosed with a lameness disorder and consequent therapeutic claw trimming (TCT) by a certified hoof trimmer. Cows not submitted to CT were considered healthy controls. A median filter was applied to smoothen the data by reducing inherent variability. Three different machine learning (ML) models were defined to fit each algorithm which included the conventional features (containing daily lying, daily steps, and daily change derived from the accelerometer), slope features (containing features extracted from each variable in Conventional feature), or all features (3 simple features and 3 slope features). Random forest (RF), Naive Bayes (NB), Logistic Regression (LR), and Time series (ROCKET) were used as ML predictive approaches. For the classification of cows requiring CCT and TCT, ROCKET classifier performed better with accuracy (> 90%), ROC-AUC (> 74%), and F1 score (> 0.61) as compared to other algorithms. Slope features derived in this study increased the efficiency of algorithms as the better-performing models included All features explored. However, further classification of diseases into infectious and non-infectious events was not effective because none of the algorithms presented satisfactory model accuracy parameters. For the classification of observed cow locomotion scores into severely lame and moderately lame conditions, the ROCKET classifier demonstrated satisfactory accuracy (> 0.85), ROC-AUC (> 0.68), and F1 scores (> 0.44). We conclude that ML models using accelerometer data are helpful in the identification of lameness in cows but need further research to increase the granularity and accuracy of classification.
- organism: chicken / avian
- assay: imaging
- research focus: differential expression
- approach: machine learning (classical)
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Impact of cross-validation designs on cattle behavior prediction using machine learning and deep learning models with tri-axial accelerometer data
Jin Wang, Ziwen Yu, … Haipeng Yu·Smart Agricultural TechnologyPeer-reviewed·Oct 10, 2025
- Leveraging machine learning and accelerometry to classify animal behaviours with uncertainty
Medha Agarwal, Kasim Rafiq, … Zaïd Harchaoui·Methods in Ecology and EvolutionPeer-reviewed·Dec 8, 2025
- Integrating diverse data sources to predict disease risk in dairy cattle
Jana Lasser, Caspar Matzhold, … Peter Klimek·bioRxiv·Mar 25, 2021
- CNN and transfer learning-based classification model for automated cows feeding behaviour recognition from accelerometer data
V. Bloch, L. Frondelius, … M. Pastell·bioRxiv·Jul 3, 2022
- Daylong Acoustic Recordings of Grazing and Rumination Activities in Dairy Cows
L. S. Martinez Rau, J. O. Chelotti, … H. L. Rufiner·bioRxiv·Oct 18, 2023
- Deep learning classification of canine behavior using a single collar-mounted accelerometer: Real-world validation
R. D. Chambers, N. C. Yoder, … S. Lyle·bioRxiv·Dec 14, 2020