Evaluation of an early warning system for elevated ß-hydroxy­butyrate and non-esterified fatty acid values based on Fourier transform infrared spectra from routine milk samples



Herd health monitoring, hyperketonemia, fatty acids, prediction model


The objective of our study was to evaluate an early warning system for the detection of elevated ß-hydroxybutyrate (BHB) and non-esterified fatty acid (NEFA) levels in Fourier transform infrared (FTIR) spectroscopy data from routine milk samples. Starting from the monthly milk performance test of the German Dairy Herd Improvement Associations (DHIAs), we evaluated the benefit of more frequent milk sampling in early lactation to detect cows at risk for hyperketonemia and exaggerated fat mobilization. For the validation of the early warning system, milk and blood samples as reference data were obtained from Holstein-Friesian (HF) and German Simmental (GS) dairy cows in a one-year field trial. To establish an early warning system that utilizes a prediction model for FTIR data, the preferable day in milk (DIM) and a suitable sampling interval were investigated. For elevated NEFA values, a DIM of 6 – 13 was identified as the period for preferable sampling. A weekly testing frequency was used for nearly all of the cows in early lactation, and the number of identified cows with elevated NEFA or BHB values was three times higher than the actual situation of milk testing. Prediction models based on the regression tree full model selection (rtFMS) method, as presented by previous work, were validated to detect elevated BHB and NEFA values in FTIR data from routine milk samples. Different model options were compared in the regression tree regarding their significant impact on the prediction performance, measured in balanced accuracy. The chosen prediction model for each metabolite was validated on the reference data set as the gold standard. The evaluated early warning system might be implemented as an additional flexible milk sampling in the routine processes of the milk performance test of the DHIAs.


Baird GD. Primary ketosis in the high-producing dairy cow: Clinical and subclinical disorders, treatment, prevention, and outlook. Journal of Dairy Science. 1982;65:1–10.

LeBlanc SJ, Leslie KE, Duffield TF. Metabolic predictors of displaced abomasum in dairy cattle. Journal of Dairy Science. 2005;88:159–70. doi:10.3168/jds.S0022-0302(05)72674-6.

Oetzel GR. Monitoring and testing dairy herds for metabolic disease. Vet Clin North Am Food Anim Pract. 2004;20:651–74. doi:10.1016/j.cvfa.2004.06.006.

Suthar VS, Canelas-Raposo J, Deniz A, Heuwieser W. Prevalence of subclinical ketosis and relationships with postpartum diseases in European dairy cows. Journal of Dairy Science. 2013;96:2925–38. doi:10.3168/jds.2012-6035.

Tremblay M, Kammer M, Lange H, Plattner S, Baumgartner C, Stegeman JA, et al. Identifying poor metabolic adaptation during early lactation in dairy cows using cluster analysis. Journal of Dairy Science. 2018;101:7311–21. doi:10.3168/jds.2017-13582.

Tatone EH, Duffield TF, LeBlanc SJ, DeVries TJ, Gordon JL. Investigating the within-herd prevalence and risk factors for ketosis in dairy cattle in Ontario as diagnosed by the test-day concentration of β-hydroxybutyrate in milk. Journal of Dairy Science. 2017;100:1308–18. doi:10.3168/jds.2016-11453.

McArt JAA, Nydam DV, Oetzel GR. Epidemiology of subclinical ketosis in early lactation dairy cattle. Journal of Dairy Science. 2012;95:5056–66. doi:10.3168/jds.2012-5443.

Chandler TL, Pralle RS, Dórea JRR, Poock SE, Oetzel GR, Fourdraine RH, White HM. Predicting hyperketonemia by logistic and linear regression using test-day milk and performance variables in early-lactation Holstein and Jersey cows. Journal of Dairy Science. 2018;101:2476–91. doi:10.3168/jds.2017-13209.

Tremblay M, Kammer M, Lange H, Plattner S, Baumgartner C, Stegeman JA, et al. Prediction model optimization using full model selection with regression trees demonstrated with FTIR data from bovine milk. Preventive Veterinary Medicine. 2019;163:14–23. doi:10.1016/j.prevetmed.2018.12.012.

Bali R, Sarkar D. R machine learning by example: Understand the fundamentals of machine learning with R and build your own dynamic algorithms to tackle complicated real-world problems successfully. Birmingham, UK: Packt Publishing; 2016.

Kuhn M. Package caret. 2019. https://github.com/topepo/caret/. Accessed 12 Dec 2019.

Japkowicz N, Stephen S. The class imbalance problem: A systematic study1. IDA. 2002;6:429–49. doi:10.3233/IDA-2002-6504.

Roche JR, Kay JK, Friggens NC, Loor JJ, Berry DP. Assessing and Managing Body Condition Score for the Prevention of Metabolic Disease in Dairy Cows. Veterinary Clinics of North America: Food Animal Practice. 2013;29:323–36. doi:10.1016/j.cvfa.2013.03.003.

Gantner V. Metabolic disorders in dairy Simmentals - prevalence risk and effect on subsequent daily milk traits. Mljekarstvo. 2018;2018:77–84.

Gantner V, Bobić T, Potočnik K. Prevalence of metabolic disorders and effect on subsequent daily milk quantity and quality in Holstein cows. Arch. Anim. Breed. 2016;59:381–6. doi:10.5194/aab-59-381-2016.

Dairy Herd Improvement Association. milk testing services. 2020. www.dhia.org. Accessed 14 Jul 2020.

Deutscher Verband für Leistungs- und Qualitätsprüfungen e.V. Q Check. 2020. Accessed 26 May 2020.

Zou H, Hastie T. Regularization and variable selection via the elastic net. J Royal Statistical Soc B. 2005;67:301–20. doi:10.1111/j.1467-9868.2005.00503.x.

Grelet C, Pierna JAF, Dardenne P, Soyeurt H, Vanlierde A, Colinet F, et al. Standardization of milk mid-infrared spectrometers for the transfer and use of multiple models. Journal of Dairy Science. 2017;100:7910–21. doi:10.3168/jds.2017-12720.