Developing and evaluating threshold-based algorithms to detect drinking behavior in dairy cows using reticulorumen temperature

J. A. Vázquez-Diosdado, G. G. Miguel-Pacheco, Bobbie Plant, Tania Dottorini, Martin Green, Jasmeet Kaler

Research output: Journal PublicationArticlepeer-review

10 Citations (Scopus)


In this study, we assessed for the first time the use of a reticuloruminal temperature bolus and a thresholding method to detect drinking events and investigated different factors that can affect drinking behavior. First, we validated the detection of drinking events using 16 cows that received a reticuloruminal bolus. For this, we collected continuous drinking behavior data for 4 d using video recordings and ambient and water temperature for the same 4 d. After all the data were synchronized, we performed 2 threshold algorithms: a general-fixed threshold and a cow-day specific threshold algorithm. In the general-fixed threshold, a positive test was considered if the temperature of any cow fell below a fixed threshold; in the cow-day specific threshold, a positive test was considered when the temperature of specific cows fell below the threshold value deviations around the mean temperature of the cow for that day. The former was evaluated using a threshold varying between 35.7 and 39.5°C, and the latter using the formulaμ− [Formula presented] σ, where µ = mean of the temperature of each cow for one day, n = 1, 2, …, 20, and σ = standard deviation of the temperature of each cow on that day. The performance of the validation of detection using each of the threshold types was computed using different metrics, including overall accuracy, precision, recall (also known as sensitivity), F-score, positive predictive value, negative predictive value, false discovery rate, false omission rate, and Cohen's kappa statistic. The findings of the first study showed that the cow-day specific threshold of n = 10 performed better (true positives = 466; false positives = 167; false negatives = 165; true negatives = 8,416) than using a general-fixed threshold of 38.1°C (true positives = 449; false positives = 181; false negatives = 182; true negatives = 8,402). With the information gained in this first study, we investigated the different factors associated with temperature drop characteristics per cow: number of drops, mean amplitude of the drop, and mean recovery time. For this, we used data from 54 cows collected for almost 1 yr to build a mixed-effect multilevel model that included days in milk, parity, average monthly milk production, and ambient temperature as explanatory variables. Cow characteristics and ambient temperature had significant effects on drinking events. Our results provide a platform for automated monitoring of drinking behavior, which has potential value in prediction of health and welfare in dairy cattle.

Original languageEnglish
Pages (from-to)10471-10482
Number of pages12
JournalJournal of Dairy Science
Issue number11
Publication statusPublished - Nov 2019
Externally publishedYes


  • algorithm
  • dairy cattle
  • drinking behavior
  • precision livestock
  • reticuloruminal temperature

ASJC Scopus subject areas

  • Food Science
  • Animal Science and Zoology
  • Genetics


Dive into the research topics of 'Developing and evaluating threshold-based algorithms to detect drinking behavior in dairy cows using reticulorumen temperature'. Together they form a unique fingerprint.

Cite this