Predicting classes of β-hydroxybutyrate concentrations in blood of dairy cows from milk mid-infrared spectra: Application of a weighted discriminant model addressing class imbalance
15 affiliations
- 1SELMET, Université Montpellier, CIRAD, INRAE, Institut Agro, Montpellier, France, 34398
- 2Walloon Agricultural Research Center (CRA-W), Gembloux, Belgium, 5030
- 3CEL25-90, Roulans, France, 25640
- 4ZuchtData, Vienna, Austria, A-1200
- 5Eleveo, Awé group, Ciney, Belgium, 5590
- 6Qualitas AG, Zug, Switzerland, 6300
- 7University College Dublin (UCD), Dublin, Ireland, D04 C1P1
- 8Department of Animal and Veterinary Sciences, Aarhus University, Tjele, Denmark, DK-8830
- 9Royal Veterinary College (RVC), London, United Kingdom, CM24 1RW
- 10Agri-Food and Biosciences Institute (AFBI), Belfast, Northern Ireland, BT9 5PX
- 11Research Center for Animal Production and Aquaculture (CREA), Rome, Italy, 00184
- 12Institute for Farm Animal Biology (FBN), Dummerstorf, Germany, 18196
- 13University of Göttingen, Göttingen, Germany, D-37075
- 14Idele, Paris, France, 75012
- 15TERRA Teaching and Research Centre, Gembloux Agro-Bio Tech, University of Liège, Gembloux, Belgium, 5030
Abstract
Monitoring biomarkers in milk or blood is widely used to assess dairy cow health and to detect diseases such as (sub)clinical ketosis. Blood BHB is a key indicator of metabolic imbalance, and its prediction from milk Fourier-transform mid-infrared (FT-MIR) spectra has been extensively explored. However, most of the predictive models applied in spectrometry fail to achieve acceptable accuracy because of the highly skewed distribution of BHB concentrations (many blood samples have low concentrations, but a few have high concentrations). Imbalanced distributions complicate both quantitative and class modeling. Thus, the objective of this work was to undertake discrete predictions of BHB (low versus high level) by implementing a specific weighting in a usual discrimination algorithm to overcome the class imbalance between healthy cows and those suffering from hyperketonemia. The threshold of 1.2 mmol/L was used to distinguish low from high BHB, that is, absence or presence of hyperketonemia. The cleaned dataset combined 4,221 records comprising milk FT-MIR spectra and blood BHB content that were collected across 10 countries between 2013 and 2024, and in multiple breeds, and numerous research projects. Milk MIR spectra (selected wavenumber regions, second derivative Savitzky–Golay preprocessing) served as predictors. A replicated external herd validation strategy was implemented. The weighted model outperformed the standard model, achieving average intraclass error rates of around 18% on external test sets. It reached 82% accuracy, 83% sensitivity, and 81% specificity, with these results comparable to or better than previously published discriminant models, despite using only raw MIR spectra. These findings demonstrate that the use of weighting within discriminant methods is a valid option for the class prediction of asymmetrically distributed health biomarkers.
Related
- Application of partial least squares discriminant analysis to mid-infrared spectral data for discriminating green and roasted coffee processed by different post-harvest methods: MATLAB- and R-based computational tools and modeling pipelines
- Predicting Bioconcentration Factors and Concentrations of Per- and Polyfluoroalkyl Substances in Plants with Machine Learning.
- Application of artificial neural networks for predicting rare earth element retention and passage rate in phosphogypsum leachate analysis
- PEG as Transient Structuring Agent for Tuning Properties of Electrospun Poly(3-hydroxybutyrate-co-3-hydroxyhexanoate) Scaffolds
- Active Poly(3-hydroxybutyrate-co-3-hydroxyvalerate) Electrospun Membranes Incorporating Antioxidant Oil from Spent Coffee Grounds
BibTeX
@article{lesnoff2026predicting,
title = {{Predicting classes of β-hydroxybutyrate concentrations in blood of dairy cows from milk mid-infrared spectra: Application of a weighted discriminant model addressing class imbalance}},
author = {M. Lesnoff and C. Grelet and V. Wolf and L. Millot and A. Köck and J. Leblois and B. Bapst and M.A. Crowe and T. Larsen and D.C. Wathes and C.P. Ferris and K.L. Ingvartsen and C. Marchitelli and F. Becker and J. Hummel and M. Gelé and H. Soyeurt and N. Gengler and F. Dehareng},
journal = {JDS communications},
year = {2026},
month = jul,
doi = {10.3168/jdsc.2026-1074},
url = {https://europepmc.org/article/PMC/PMC13751259},
note = {CC BY},
}
RIS
TY - JOUR
TI - Predicting classes of β-hydroxybutyrate concentrations in blood of dairy cows from milk mid-infrared spectra: Application of a weighted discriminant model addressing class imbalance
AU - M. Lesnoff
AU - C. Grelet
AU - V. Wolf
AU - L. Millot
AU - A. Köck
AU - J. Leblois
AU - B. Bapst
AU - M.A. Crowe
AU - T. Larsen
AU - D.C. Wathes
AU - C.P. Ferris
AU - K.L. Ingvartsen
AU - C. Marchitelli
AU - F. Becker
AU - J. Hummel
AU - M. Gelé
AU - H. Soyeurt
AU - N. Gengler
AU - F. Dehareng
PY - 2026
DA - 2026/07/06
JO - JDS communications
DO - 10.3168/jdsc.2026-1074
UR - https://europepmc.org/article/PMC/PMC13751259
AB - Monitoring biomarkers in milk or blood is widely used to assess dairy cow health and to detect diseases such as (sub)clinical ketosis. Blood BHB is a key indicator of metabolic imbalance, and its prediction from milk Fourier-transform mid-infrared (FT-MIR) spectra has been extensively explored. However, most of the predictive models applied in spectrometry fail to achieve acceptable accuracy because of the highly skewed distribution of BHB concentrations (many blood samples have low concentrations, but a few have high concentrations). Imbalanced distributions complicate both quantitative and class modeling. Thus, the objective of this work was to undertake discrete predictions of BHB (low versus high level) by implementing a specific weighting in a usual discrimination algorithm to overcome the class imbalance between healthy cows and those suffering from hyperketonemia. The threshold of 1.2 mmol/L was used to distinguish low from high BHB, that is, absence or presence of hyperketonemia. The cleaned dataset combined 4,221 records comprising milk FT-MIR spectra and blood BHB content that were collected across 10 countries between 2013 and 2024, and in multiple breeds, and numerous research projects. Milk MIR spectra (selected wavenumber regions, second derivative Savitzky–Golay preprocessing) served as predictors. A replicated external herd validation strategy was implemented. The weighted model outperformed the standard model, achieving average intraclass error rates of around 18% on external test sets. It reached 82% accuracy, 83% sensitivity, and 81% specificity, with these results comparable to or better than previously published discriminant models, despite using only raw MIR spectra. These findings demonstrate that the use of weighting within discriminant methods is a valid option for the class prediction of asymmetrically distributed health biomarkers.
SN - 2666-9102
ER -