et al.. Machine learning to detect behavioural anomalies in dairy cows under subacute ruminal acidosis.
A B S T R A C TSickness behaviour is characterised by a lethargic state during which the animal reduces its activity, sleeps more and at times when normally awake, reduces its feed and water intake, and interacts less with its environment. Subtle modifications in behaviour can materialise just before clinical signs of a disease. Recent sensor developments enable continuous monitoring of animal behaviour, but the shift to abnormal animal activity remains difficult to detect. We explored the use of Machine Learning (ML) to detect abnormal behaviour from continuous monitoring. We submitted 14 cows (Bos taurus) to Sub-Acute Ruminal Acidosis (SARA), a disease known to induce changes in behaviour. Another 14 control cows were not submitted to SARA. We used a ruminal bolus to monitor pH and detect when a cow experienced SARA. We used a positioning system to infer an animal's activity based on its position in relation to specific elements in the barn (feeder, resting area, and alleys). We tested several ML algorithms: K Nearest Neighbours for Regression (KNNR); Decision Tree for Regression (DTR); MultiLayer Perceptron (MLP); Long Short-Term Memory (LSTM); and an algorithm where activity is assumed to be similar from one day to the next. First, we developed ML models to predict activity on a given day from the previous 24 h, considering all cows together. Then, we calculated the error between observed and predicted values for a given cow. Finally, we compared the error to a threshold chosen to optimise the distinction between normal and abnormal values. KNNR performed best, detecting 83% of SARA cases (true-positives), but it also produced 66% of false-positives, which limits its use in practice. In conclusion, ML can help detect anomalies in behaviour. Further improvements could probably be obtained by applying ML on very large datasets at animal rather than group level.