University Of Tasmania

File(s) under permanent embargo

Variable segmentation and ensemble classifiers for predicting dairy cow behaviour

journal contribution
posted on 2023-05-20, 07:29 authored by Williams, ML, James, WP, Michael RoseMichael Rose
Automatically classifying cattle behaviour using high frequency data usually involves segmentation of data with fixed window sizes for feature extraction. Machine learning algorithms can then be used for supervised modelling of the most biologically important behaviours using these segments. In this work, variable segmentation was applied to GPS data gathered from 30 dairy cows at pasture. Using these segments, the performance of 13 machine learning algorithms (base learners) implemented in WEKA were compared using default parameters in classifying grazing, resting and walking. Two Stacking ensembles (WEKA implementation of Super Learner) were then derived. The first ensemble contained the best performing base learners. The second was an optimised version derived using a manual ensemble selection method. Both versions of the ensemble were evaluated on an independent test set derived from 10 cows. Overall, the variable segmentation strategy identified 90.2% of changepoints. On the training set, all base learners achieved classification accuracies and F-measures ≥0.90. Optimising the Stacking ensemble led to no further improvement in F-measure (full ensemble = 0.93; optimised ensemble = 0.92) on the test set. The ensembles performed well but base learners utilising boosting algorithms (e.g. simple logistic; logistic model trees) performed as well as the more computationally expensive ensembles. Variable segmentation and ensemble classifiers are promising strategies for classifying the behaviour of dairy cows. However, more work is needed to fully explore and evaluate the potential of ensembles because some base learners may perform equally if not better in some contexts.


Publication title

Biosystems Engineering








Tasmanian Institute of Agriculture (TIA)


Academic Press Inc Elsevier Science

Place of publication

525 B St, Ste 1900, San Diego, USA, Ca, 92101-4495

Rights statement

Copyright 2018 IAgrE

Repository Status

  • Restricted

Socio-economic Objectives

Dairy cattle