Skip to main content Accessibility help

Using animal-mounted sensor technology and machine learning to predict time-to-calving in beef and dairy cows

  • G. A. Miller (a1), M. Mitchell (a2), Z. E. Barker (a3), K. Giebel (a3), E. A. Codling (a4), J. R. Amory (a3), C. Michie (a5), C. Davison (a5), C. Tachtatzis (a5), I. Andonovic (a5) and C.-A. Duthie (a1)...


Worldwide, there is a trend towards increased herd sizes, and the animal-to-stockman ratio is increasing within the beef and dairy sectors; thus, the time available to monitoring individual animals is reducing. The behaviour of cows is known to change in the hours prior to parturition, for example, less time ruminating and eating and increased activity level and tail-raise events. These behaviours can be monitored non-invasively using animal-mounted sensors. Thus, behavioural traits are ideal variables for the prediction of calving. This study explored the potential of two sensor technologies for their capabilities in predicting when calf expulsion should be expected. Two trials were conducted at separate locations: (i) beef cows (n = 144) and (ii) dairy cows (n = 110). Two sensors were deployed on each cow: (1) Afimilk Silent Herdsman (SHM) collars monitoring time spent ruminating (RUM), eating (EAT) and the relative activity level (ACT) of the cow, and (2) tail-mounted Axivity accelerometers to detect tail-raise events (TAIL). The exact time the calf was expelled from the cow was determined by viewing closed-circuit television camera footage. Machine learning random forest algorithms were developed to predict when calf expulsion should be expected using single-sensor variables and by integrating multiple-sensor data-streams. The performance of the models was tested using the Matthew’s correlation coefficient (MCC), the area under the curve, and the sensitivity and specificity of predictions. The TAIL model was slightly better at predicting calving within a 5-h window for beef cows (MCC = 0.31) than for dairy cows (MCC = 0.29). The TAIL + RUM + EAT models were equally as good at predicting calving within a 5-h window for beef and dairy cows (MCC = 0.32 for both models). Combining data-streams from SHM and tail sensors did not substantially improve model performance over tail sensors alone; therefore, hour-by-hour algorithms for the prediction of time of calf expulsion were developed using tail sensor data. Optimal classification occurred at 2 h prior to calving for both beef (MCC = 0.29) and dairy cows (MCC = 0.25). This study showed that tail sensors alone are adequate for the prediction of parturition and that the optimal time for prediction is 2 h before expulsion of the calf.


Corresponding author


Hide All
Agjee, NH, Mutanga, O, Peerbhay, K and Ismail, R 2018. The impact of simulated spectral noise on random forest and oblique random forest classification performance. Journal of Spectroscopy,, Published online by Hindawi 13 March 2018.
Agriculture and Horticulture Development Board (AHDB), Beef and Lamb 2018. AHDB UK cattle yearbook 2018. AHDB Beef and Lamb, Kenilworth, UK.
Barrier, AC, Haskell, MJ, Birch, S, Bagnall, A, Bell, DJ, Dickinson, J, Macrae, AI and Dwyer, CM 2013. The impact of dystocia on dairy calf health, welfare, performance and survival. The Veterinary Journal 195, 8690.
Borchers, MR, Chang, YM, Proudfoot, KL, Wadsworth, BA, Stone, AE and Bewley, JM 2017. Machine-learning-based calving prediction from activity, lying, and ruminating behaviors in dairy cattle. Journal of Dairy Science 100, 6645674.
Braun, U, Tschoner, T and Hässig, M 2014. Evaluation of eating and rumination behaviour using a noseband pressure sensor in cows during the peripartum period. BMC Veterinary Research 10, 195 doi: 10.1186/s12917-014-0195-6.
Büchel, S and Sundrum, A 2014. Decrease in rumination time as an indicator of the onset of calving. Journal of Dairy Science 97, 31203127.
Calamari, L, Soriani, N, Panella, G, Petrera, F, Minuti, A and Trevisi, E 2014. Rumination time around calving: an early signal to detect cows at greater risk of disease. Journal of Dairy Science 97, 36353647.
Clark, CEF, Lyons, NA, Millapan, L, Talukder, S, Cronin, GM, Kerrisk, KL and Garcia, SC 2015. Rumination and activity levels as predictors of calving for dairy cows. Animal 9, 91695.
De Amicis, I, Veronesi, MC, Robbe, D, Gloria, A and Carluccio, A 2018. Prevalence, causes, resolution and consequences of bovine dystocia in Italy. Theriogenology 1007, 104108.
Eriksson, S, Näsholm, A, Johansson, K and Philipsson, J 2004. Genetic parameters for calving difficulty, stillbirth, and birth weight for Hereford and Charolais at first and later parities. Journal of Animal Science 82, 375383.
Gaafar, HMA, Shamiah, M, Abu El-Hamd, MA, Shitta, AA and Tag El-Din, MA 2011. Dystocia in Friesian cows and its effects on postpartum reproductive performance and milk production. Tropical Animal Health and Production 43, 229234.
Huzzey, JM, von Keyserlingk, MAG and Weary, DM 2005. Changes in feeding, drinking and standing behaviour of dairy cows during the transition period. Journal of Dairy Science 88, 24542461.
Jensen, MB 2012. Behaviour around the time of calving in dairy cows. Applied Animal Behaviour Science 139, 195202.
Konka, J, Michie, C and Andonovic, I 2014. Automatic classification of eating and ruminating in cattle using a collar mounted accelerometer. Paper presented at the 39th ICAR Session, 19–23 May 2014, Berlin, Germany.
Kovács, L, Kézér, FL, Ruff, F and Szenci, O 2016. Rumination time and reticuloruminal temperature as possible predictors of dystocia in dairy cows. Journal of Dairy Science 100, 15681579.
Krieger, S, Sattlecker, G, Kickinger, F, Auer, W, Drillich, M and Iwersen, M 2018. Prediction of calving in dairy cows using a tail-mounted tri-axial accelerometer: a pilot study. Biosystems Engineering 173, 7984.
Kuhn, M, Contributions from Wing J, Weston S, Williams A, Keefer C, Engelhardt A, Cooper T, Mayer Z, Kenkel B, the R Core Team, Benesty M, Lescarbeau R, Ziem A, Scrucca L, Tang Y, Candan C and Hunt T 2018. caret: classification and regression training. R package version 6.0-80.
Lombard, JE, Garry, FB, Tomlinson, SM and Garber, LP 2007. Impacts of dystocia on health and survival of dairy calves. Journal of Dairy Science 90, 17511760.
López de Maturana, E, Legarra, A, Varona, L and Ugarte, E 2007. Analysis of fertility and dystocia in Holsteins using recursive models to handle censored and categorical data. Journal of Dairy Science 90, 20122024.
Lowman, BG, Scott, N and Somerville, S 1976. Condition scoring of cattle. Bulletin No. 6. East of Scotland College of Agriculture, Edinburgh, UK.
McGuirk, BJ, Forsyth, R and Dobson, H 2007. Economic cost of difficult calvings in the United Kingdom dairy herd. Veterinary Record 161, 685687.
Mee, JF 2008. Prevalence and risk for dystocia in dairy cattle: a review. The Veterinary Journal 176, 93101.
Miedema, HM, Cockram, MS, Dwyer, CM and Macrae, AI 2011a. Changes in the behaviour of dairy cows during the 24h before normal calving compared to behaviour during late pregnancy. Applied Animal Behaviour Science 131, 814.
Miedema, HM, Cockram, MS, Dwyer, CM and Macrae, AI 2011b. Behavioural predictors of the start of normal and dystocic calving in dairy cows and heifers. Applied Animal Behaviour Science 132, 1419.
Miller, GA, Mitchell, MA, Barker, Z, Giebel, K, Codling, E, Amory, J and Duthie, C-A 2019. Animal-mounted sensor technology to predict ‘time to calving’ in beef and dairy cows. In Proceedings of the British Society of Animal Science BSAS 75th Annual Conference 2019 held at the Edinburgh International Conference Centre (EICC), 9–11 April 2019, p. 149.
Nix, JM, Spitzer, JC, Grimes, LW, Burns, GL and Plyler, BB 1998. A retrospective analysis of factors contributing to calf mortality and dystocia in beef cattle. Theriogenology 49, 15151523.
Ouellet, V, Vasseur, E, Heuwieser, W, Burfeind, O, Maldague, X and Charbonneau, E 2016. Evaluation of calving indicators measured by automated monitoring devices to predict the onset of calving in Holstein dairy cows. Journal of Dairy Science 99, 15391548.
Pahl, C, Hartung, E, Grothmann, A and Mahlkow-Nerge, K 2014. Rumination activity of dairy cows in the 24 hours before and after calving. Journal of Dairy Science 97, 69356941.
Phocas, F and Laloë, D 2003. Evaluation of genetic parameters for calving difficulty in beef cattle. Journal of Animal Science 81, 933938.
R Core Team 2017. R: a language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria.
Robin, X, Turck, N, Hainard, A, Tiberti, N, Lisacek, F, Sanchez, J and Muller, M 2011. pROC: an open-source package for R and S+ to analyse and compare ROC curves. BMC Bioinformatics 12, 77. doi: 10.1186/1471-2105-12-77.
Rumph, JM and Faust, MA 2006. Genetic analysis of calving ease in Holsteins in the U.K. based on data from heifers and cows. In Proceedings of the 8th World Congress on Genetics Applied to Livestock Production, 13–18 August 2006, Belo Horizonte, Brazil, p. 11.
Rutten, CJ, Kamphuis, C, Hogeveen, H, Huijps, K, Nielen, M and Steeneveld, W 2017. Sensor data on cow activity, rumination, and ear temperature improve prediction of the start of calving in dairy cows. Computers and Electronics in Agriculture 132, 108118.
Saint-Dizier, M and Chastant-Maillard, S 2015. Methods and on-farm devices to predict calving time in cattle. The Veterinary Journal 205, 349356.
Shah, KD, Nakao, T and Kubota, H 2006. Plasma estrone sulphate (E1S) and estradiol-17β (E2β) profiles during pregnancy and their relationship with the relaxation of sacrosciatic ligament, and prediction of calving time in Holstein-Fresian cattle. Animal Reproduction Science 95, 3853.
Soriani, N, Trevisi, E and Calamari, L 2012. Relationships between rumination time, metabolic conditions, and health status in dairy cows during the transition period. Journal of Animal Science 90, 45444554.
Titler, M, Maquivar, MG, Bas, S, Rajala-Schultz, PJ, Gordon, E, McCullough, K and Federico, P 2015. Prediction of parturition in Holstein dairy cattle using electronic data loggers. Journal of Dairy Science 98, 53045312.


Type Description Title
Supplementary materials

Miller et al. supplementary material
Table S1

 Word (14 KB)
14 KB

Using animal-mounted sensor technology and machine learning to predict time-to-calving in beef and dairy cows

  • G. A. Miller (a1), M. Mitchell (a2), Z. E. Barker (a3), K. Giebel (a3), E. A. Codling (a4), J. R. Amory (a3), C. Michie (a5), C. Davison (a5), C. Tachtatzis (a5), I. Andonovic (a5) and C.-A. Duthie (a1)...


Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed