Feature selection and comparison of machine learning algorithms in classification of grazing and rumination behaviour in sheep

Nicola Mansbridge, Jurgen Mitsch, Nicola Bollard, Keith Ellis, Giuliana G. Miguel-Pacheco, Tania Dottorini, Jasmeet Kaler

Research output: Journal PublicationArticlepeer-review

89 Citations (Scopus)


Grazing and ruminating are the most important behaviours for ruminants, as they spend most of their daily time budget performing these. Continuous surveillance of eating behaviour is an important means for monitoring ruminant health, productivity and welfare. However, surveillance performed by human operators is prone to human variance, time-consuming and costly, especially on animals kept at pasture or free-ranging. The use of sensors to automatically acquire data, and software to classify and identify behaviours, offers significant potential in addressing such issues. In this work, data collected from sheep by means of an accelerometer/gyroscope sensor attached to the ear and collar, sampled at 16 Hz, were used to develop classifiers for grazing and ruminating behaviour using various machine learning algorithms: random forest (RF), support vector machine (SVM), k nearest neighbour (kNN) and adaptive boosting (Adaboost). Multiple features extracted from the signals were ranked on their importance for classification. Several performance indicators were considered when comparing classifiers as a function of algorithm used, sensor localisation and number of used features. Random forest yielded the highest overall accuracies: 92% for collar and 91% for ear. Gyroscope-based features were shown to have the greatest relative importance for eating behaviours. The optimum number of feature characteristics to be incorporated into the model was 39, from both ear and collar data. The findings suggest that one can successfully classify eating behaviours in sheep with very high accuracy; this could be used to develop a device for automatic monitoring of feed intake in the sheep sector to monitor health and welfare.

Original languageEnglish
Article number3532
Issue number10
Publication statusPublished - 19 Oct 2018
Externally publishedYes


  • Accelerometer and gyroscope
  • Classification algorithm
  • Grazing
  • Machine learning
  • Precision livestock monitoring
  • Rumination behaviour
  • Sensor
  • Sheep behaviour

ASJC Scopus subject areas

  • Analytical Chemistry
  • Biochemistry
  • Atomic and Molecular Physics, and Optics
  • Instrumentation
  • Electrical and Electronic Engineering


Dive into the research topics of 'Feature selection and comparison of machine learning algorithms in classification of grazing and rumination behaviour in sheep'. Together they form a unique fingerprint.

Cite this