Evaluating machine learning algorithms to predict lameness in dairy cattle.
Authors: Neupane Rajesh, Aryal Ashrant, Haeussermann Angelika, Hartung Eberhard, Pinedo Pablo, Paudyal Sushil
Journal: PloS one
Summary
# Editorial Summary Lameness in dairy cattle causes significant welfare and productivity losses on commercial farms, yet early detection remains challenging despite the availability of wearable monitoring technologies. Neupane and colleagues evaluated four machine learning algorithms (random forest, Naive Bayes, logistic regression, and ROCKET time series classification) trained on accelerometer data—specifically lying time, daily step count, and rate of change—collected from 310 Holstein cows over four months, with lameness status determined by whether cows required corrective or therapeutic claw trimming. The ROCKET classifier outperformed other models substantially, achieving over 90% accuracy and 74% ROC-AUC when distinguishing between cows needing corrective trimming and those with clinical lameness, whilst also performing well (85% accuracy) at differentiating moderate from severe lameness; notably, incorporating slope features (rate of change over time) improved model performance across the board. However, the algorithms struggled to classify lameness aetiology (infectious versus non-infectious conditions), suggesting current accelerometer datasets lack sufficient granularity for disease-specific diagnosis. For practitioners, this research validates accelerometer-based monitoring as a viable early warning system for lameness detection on larger herds, though users should recognise current limitations in pinpointing the underlying cause and understand that algorithmic refinement and larger, more diverse datasets will be needed before these tools can reliably guide targeted intervention strategies.
Read the full abstract on PubMed
Practical Takeaways
- •Leg-based accelerometers combined with machine learning can effectively identify lame cattle requiring intervention with >90% accuracy, enabling earlier detection and treatment.
- •Changes in lying time, daily steps, and activity trends (slope features) are more predictive than single-point measurements, suggesting monitoring changes over time is crucial for lameness detection.
- •While ML algorithms successfully identify lame versus non-lame cattle, they cannot yet distinguish disease types—veterinary expertise remains essential for determining underlying causes and appropriate treatment.
Key Findings
- •ROCKET machine learning classifier achieved >90% accuracy and >74% ROC-AUC for identifying cows requiring corrective versus therapeutic claw trimming using accelerometer data.
- •Slope features derived from accelerometer variables improved model performance compared to conventional features alone.
- •ROCKET classifier demonstrated >0.85 accuracy and >0.68 ROC-AUC for classifying severely versus moderately lame cattle.
- •Machine learning models failed to reliably distinguish infectious from non-infectious claw diseases, indicating need for additional data sources.