The aim of the present study was to develop a model to identify posture and behavior from data collected by a triaxial accelerometer located on the left flank of dairy cows and evaluate its accuracy and precision. Twelve Italian Red‐and‐White lactating cows were equipped with an accelerometer and observed on average for 136 ± 29 min per cow by two trained operators as a reference. The acceleration data were grouped in time windows of 8 s overlapping by 33.0%, for a total of 35133 rows. For each row, 32 different features were extracted and used by machine learning algorithms for the classification of posture and behavior. To build up a predictive model, the dataset was split in training and testing datasets, characterized by 75.0 and 25.0% of the observations, respectively. Four algorithms were tested: Random Forest, K Nearest Neighbors, Extreme Boosting Algorithm (XGB), and Support Vector Machine. The XGB model showed the best accuracy (0.99) and Cohen’s kappa (0.99) in predicting posture, whereas the Random Forest model had the highest overall accuracy in predicting behaviors (0.76), showing a balanced accuracy from 0.96 for resting to 0.77 for moving. Overall, very accurate detection of the posture and resting behavior were achieved.

Machine learning to detect posture and behavior in dairy cows: Information from an accelerometer on the animal’s left flank

Balasso P.;Marchesini G.
;
Ughelini N.;Serva L.;Andrighetto I.
2021

Abstract

The aim of the present study was to develop a model to identify posture and behavior from data collected by a triaxial accelerometer located on the left flank of dairy cows and evaluate its accuracy and precision. Twelve Italian Red‐and‐White lactating cows were equipped with an accelerometer and observed on average for 136 ± 29 min per cow by two trained operators as a reference. The acceleration data were grouped in time windows of 8 s overlapping by 33.0%, for a total of 35133 rows. For each row, 32 different features were extracted and used by machine learning algorithms for the classification of posture and behavior. To build up a predictive model, the dataset was split in training and testing datasets, characterized by 75.0 and 25.0% of the observations, respectively. Four algorithms were tested: Random Forest, K Nearest Neighbors, Extreme Boosting Algorithm (XGB), and Support Vector Machine. The XGB model showed the best accuracy (0.99) and Cohen’s kappa (0.99) in predicting posture, whereas the Random Forest model had the highest overall accuracy in predicting behaviors (0.76), showing a balanced accuracy from 0.96 for resting to 0.77 for moving. Overall, very accurate detection of the posture and resting behavior were achieved.
2021
File in questo prodotto:
Non ci sono file associati a questo prodotto.
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11577/3416356
Citazioni
  • ???jsp.display-item.citation.pmc??? 4
  • Scopus 22
  • ???jsp.display-item.citation.isi??? 17
social impact