Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2022 Dec 1.
Published in final edited form as: Prev Vet Med. 2021 Oct 17;197:105509. doi: 10.1016/j.prevetmed.2021.105509

Developing a predictive model for beta-hydroxybutyrate and non-esterified fatty acids using milk Fourier-transform infrared spectroscopy in dairy cows

E Walleser a, JF Mandujano Reyes a, K Anklam a, M Höltershinken b, P Hertel-Boehnke c, D Döpfer a
PMCID: PMC8627475  NIHMSID: NIHMS1749777  PMID: 34678645

Abstract

Negative energy balance following parturition predisposes dairy cattle to numerous metabolic disorders. Current diagnostics are limited by their labor requirements and inability to measure multiple metabolic markers simultaneously. Fourier-transform Infrared spectroscopy (FTIR) data, measured from milk samples, could improve the detection of metabolic disorders using routine milk samples from dairy farms. The objective of this study was to develop a predictive model for numeric values of blood beta-hydroxybutyrate (BHB) and blood non-esterified fatty acids (NEFA). The study utilized a dataset comprised of 622 observations with known blood BHB and blood NEFA values measured concurrently with the milk FTIR data. Using ElasticNet regression on milk FTIR data and production information, we built regression models for numeric blood BHB and blood NEFA prediction and classification models for blood BHB values greater than 1.2 mmol/L and blood NEFA values greater than 0.7 mmol/L. The R2 of the best fitting model was 0.56 and 0.51 for log-transformed BHB and log-transformed NEFA, respectively. The BHB classification model had a 90% sensitivity and 83% specificity and the NEFA classification model achieved a sensitivity of 73% and specificity of 74%. We applied our numeric prediction models to an external dataset (n=9,660) with known blood metabolites to validate the prediction accuracy of log-transformed blood BHB and log-transformed blood NEFA models. Log-transformed BHB root mean square error (RMSE) was 0.4018 and log-transformed NEFA RMSE was 0.4043.

The second objective of this study was to develop a categorization for cows as either metabolically disordered or healthy. Responses to negative energy balance in transition cows are related to blood levels of BHB and NEFA. Cows suffering from metabolic disorders without elevated blood BHB values remain unidentified when detection is focused on blood BHB alone. To account for this differentiated metabolic response, we categorized cows as either ‘metabolically healthy’ or suffering a ‘metabolic disorder’ by using a combination of blood BHB, blood NEFA, and milk fat to protein quotient. We obtained a balanced accuracy of 94% for the prediction of cow metabolic status. Direct prediction of metabolic status can be used to identify hyperketonemic cows in addition to cows exhibiting metabolic response patterns not detected by elevated blood BHB alone.

Introduction

During the transition period, consisting of the three weeks before to the three weeks after calving, negative energy balance (NEB) predisposes dairy cows to metabolic disorders (Sundrum, 2015). Traditional diagnostics used to detect metabolic disorders include measurements of blood beta-hydroxybutyrate (BHB), blood non-esterified fatty acid (NEFA) levels, and the milk fat protein quotient (FPQ) (McArt et al., 2013; Overton et al., 2017). However, the correlation among these NEB markers is weak (McCarthy et al., 2015; Ospina et al., 2013). Elevated blood BHB alone is inconsistently associated with metabolic disease events (Duffield et al., 2009). A stronger understanding of these associations would improve the management of metabolic disorders in dairy cows during the transition period. In addition, production and milk testing data could improve the characterization of metabolic challenges associated with NEB.

Tremblay et al. (2018) clustered metabolic and production data of early lactation cows using principal component analysis. A key finding of this study was that cows suffering from Poor Metabolic Adaptation Syndrome (PMAS) are undiagnosed when detection relies exclusively on blood BHB levels, resulting in suffering and increased possibility of cow death. Therefore, the development of an improved method for detecting PMAS cows in addition to other NEB-associated disorders, such as hyperketonemia, is warranted.

The ease of routine milk sampling combined with Fourier-transform infrared spectroscopy (FTIR) of milk samples provides opportunities for predictive modeling of the metabolic markers blood BHB and blood NEFA (Weigel et al., 2017). Previous research has demonstrated moderate accuracy for the prediction of blood metabolites using milk FTIR (Belay et al., 2017; De Marchi et al., 2014; Luke et al., 2019). Additionally, Bach et al. (2019) reported an association between FTIR-predicted milk BHB or blood NEFA and reduced production and disease. Machine learning models, partial least squares regression (PLS) and multivariate linear regression have been used to predict metabolic markers from FTIR data (Bach et al., 2019; Belay et al., 2017; Pralle et al., 2018). PLS is reported as a common modeling method in multiple FTIR studies (Aernouts et al., 2020; Luke et al., 2019). Frank and Friedman (1993) compared multiple chemometric analysis options and reported that ridge regression outperformed PLS. ElasticNet (ENET), a regression method that combines both ridge and lasso regression utilizing an iterative selection process, was used to develop our FTIR prediction models as an alternative option to PLS (Zou and Hastie, 2005).

The objective of the current study was to develop ENET regression and classification models for the prediction of blood BHB and blood NEFA followed by external validation to assess prediction performance and correlation between predicted and observed values. We hypothesized that ENET based prediction models would have prediction performance levels that would make it a possible screening test for hyperketonemia. We used the prediction models for estimating blood BHB and blood NEFA levels in addition to FPQ to classify cows as having metabolic disorders or as being healthy. We hypothesized that combining our ENET prediction models for blood BHB, blood NEFA, and FPQ it will improve the identification of animals at risk of metabolic disorders.

Materials and Methods

Data Collection and Data Editing

This study used the optiKuh dataset consisting of data from nine German dairy farms, collected between December 2014 and December 2016. Animal care protocols were approved by Bayerische Landesanstalt für Landwirtschaft (LfL) (Grub, Achselschwang) (A.Z. 55.2–1-54–2523-170–14). Feeding protocols varied by farm and were either total mixed rations or partial mixed rations with concentrates. Cow information collected from on-farm software included cow ID, breed, lactation number, calving date, daily milk weight (kg), and milk sample collection date. Farm visits by LfL researchers occurred as often as once weekly and at least once monthly. Cows enrolled in the study were dried off seven weeks before their expected calving date or when daily milk yield was below 13 kg (Holstein) or 12 kg (Flekvieh). The target days in milk (DIM) for sampling was between 6 and 60 days. Milk samples were taken between 8:00–10:00 AM using proportional milk samplers, which reduce intra-sample variability by combining subsamples throughout a single milking. A 10ml aliquot was taken and preserved with 1–2ml of bronopol (2-Bromo-2-nitropropane1,3-diol). Samples were transported at 4°C to regional milk testing facilities within one day of collection and analyzed using a MilkoScan FT-6000 (FossAnalytical A/S, Hillerød, Denmark). Milk fat and protein percentages were estimated using proprietary FTIR calibration equations (FOSS GmbH, Rellingen, Germany). Milk FTIR absorbance variables were recorded for 1,060 wavenumbers.

A total of 756 observations of blood BHB, blood NEFA, and milk FTIR were collected from 478 cows. Blood samples were obtained following milking from randomly selected cows that had milk samples collected the same day. Nine milliliters of blood were collected from the jugular vein into an evacuated 10mL tube without additives (Becton Dickinson, Heidelberg, Germany) and allowed to clot for a minimum of one hour at room temperature. The tube was then centrifuged at 1,800 x g for 10 minutes. After centrifugation, the serum was removed from the initial tube and placed into a labeled transportation tube at −20°C before being transported to the laboratory at the University of Veterinary Medicine Foundation, Clinic for Cattle, Hannover, Germany. All serum samples were tested, along with controls of known concentrations, for NEFA (coefficient of variation % (CV), intra-assay, 2.15%), and BHB (CV, intra-assay, 7.86%), using a photometric analyzer (ABX Pentra 400; Fa. Horiba ABX Rue du Caducée), and reagents from Randox Laboratories (Crumlin, UK).

Variable Selection and Editing

FTIR wavenumber variables were removed if greater than 15% of optiKuh dataset observations were missing values for a specific wavenumber. Following wavenumber variable selection, observations with missing values for any remaining variables were removed until only complete cases remained.

IR spectra were transformed using a second derivative function in addition to thinning the wavenumbers using a four-wavenumber gap. In this way, the transformed spectra were reduced to 212 wavenumber variables. Wavenumber variables removed were associated with non-predictive spectral regions (Grelet et al., 2015). Cow information included in our model input was DIM, lactation group (primiparous versus multiparous), and milk yield (kg). Cow information and spectral wavenumber variables were then standardized (mean=0, standard deviation=1). Blood BHB and blood NEFA, both originally measured in mmol/L, were log-transformed to approximate a normal distribution based on histogram visualization.

Statistical Analysis and Predictive Model Development

All statistical analyses were performed using R software version 3.6.3 (R Core Team, 2021). Prediction models were computed using the caret package (Kuhn, 2008). All figures were produced using the ggplot2 package in R (Wickham, 2016).

ElasticNet regression and classification for blood BHB and blood NEFA.

ENET is a regression method that combines ridge regression and lasso regression to apply regularization, which shrinks model coefficients and reduces coefficient variance (Hoerl and Kennard, 1970; James et al., 2013; Tibshirani, 1996). Lasso regression introduces sparsity by shrinking non-informative coefficients to zero while ridge regression improves model stability but cannot perform variable removal. ENET has demonstrated improved performance over alternative modeling options, such as PLS, when the number of predictors exceeds observations or when predictors are highly correlated (Engebretsen and Bohlin, 2019; Hastie et al., 2009; Zou and Hastie, 2005).

ENET is fit to the model using two parameters, λ and α. The λ parameter takes a range of values from 0 to ∞; when set to 0 ENET performs no regularization and the model is equivalent to least squares regression, and as λ increases coefficients undergo increased shrinkage, eventually dropping out of the model. The α value ranges from 0 to 1 and determines the balance between lasso (0) and ridge regression (1). Values for α and λ were selected using 10 iterations of 7-fold cross-validation on 80% training and 20% test data. Root mean square error (RMSE) was used as the performance metric to select a grid of values to optimize the tuning parameter α for numeric predictions, and λ was then optimized at its minimum value. For both blood BHB and blood NEFA, R2 and RMSE were reported.

ENET was also used to predict the binary outcome for blood BHB and blood NEFA threshold values, set at 1.2 mmol/L and 0.7 mmol/L, respectively. Threshold values were selected based on those reported by Tremblay et al. (2018) in conjunction with threshold values reported by Duffield et al. (1997) and Ospina et al. (2013). Wavenumber variables underwent the same preprocessing as for numeric predictions. Following the centering and scaling of data, a Synthetic Minority Over-sampling Technique (SMOTE) was applied to the training dataset to compensate for imbalanced classes during the blood BHB and blood NEFA classification. In our case, SMOTE generated “synthetic” minority class observations with 200% oversampling of positives and 150% undersampling of negatives and balanced data to improve performance in imbalanced classification tasks (Chawla et al., 2002). True prevalence (TP), apparent prevalence (AP), sensitivity (Se), specificity (Sp), balanced accuracy (BA), positive predictive value (PPV), and negative predictive value (NPV) were calculated for each threshold value. The α and λ parameters were again selected using 10 iterations of 7-fold cross-validation on 80% training and 20% test data. Cohen’s Kappa was used to select our optimized values of α and minimized λ.

External Validation Data

The Qcheck dataset was used to evaluate our prediction models (Gruber et al., 2021). This dataset consisted of 9,660 observations from 2,456 cows with measured blood BHB, blood NEFA, and milk FTIR data. Samples were collected weekly on ten dairy farms in Bavaria and Thuringia from January 2018 to December 2018. Milk samples were collected in sampling bottles of type 6845-xx (Bartec Benke GmbH, Gotteszell, Germany) containing 2 ml of preservative gel consisting of < 4 % sodium azide, < 3 % bronopol (2-Bromo-2-nitropropane-1,3-diol), and < 0.2 % chloramphenicol. Samples were analyzed using the IR spectroscope MilkoScan 7 RM (FOSS GmbH, Hamburg, Germany) at the laboratories of the Bavarian Association for raw milk testing (Milchprüfring Bayern e. V., MPR). Blood samples were collected by the investigators the day following milk sample collection. The samples were transported at 4°C to the Clinic for Ruminants in Oberschleißheim. Blood samples were analyzed for blood BHB and blood NEFA using the Cobas c311 analyzer (Roche Diagnostics, Mannheim, Germany).

External Validation and Metabolic Disorder Prediction

We assessed the external validation performance of our prediction models by using 10,000 bootstrap sampling replications to generate 95% confidence intervals for RMSE of log-BHB and log-NEFA values for the Qcheck dataset. Pearson’s correlation coefficients were calculated between measured blood BHB, measured blood NEFA, predicted blood BHB, and predicted blood NEFA.

Using the ENET predicted blood values and FPQ, we classified cows in the Qcheck dataset as either metabolically disordered or healthy. Cows were identified as metabolically disordered if predicted BHB was greater than 1.2 mmol/L, NEFA greater than 0.7 mmol/L, or FPQ greater than 1.4. Threshold values were selected based on values reported by Duffield et al. (1997) and Ospina et al. (2013). This method was used to identify hyperketonemic cows in addition to cows suffering from metabolic disorders that do not display hyperketonemia as identified by Tremblay et al. (2018). Predicted metabolic status was then compared to true metabolic status determined by measured blood BHB, blood NEFA, and FPQ.

Results and Discussion

Descriptive Statistics

The optiKuh dataset was edited before prediction model development. Wavenumbers 900 –1,060 were removed because 237 observations in the optiKuh dataset did not have these values recorded. There were 130 observations removed for missing FTIR absorbance data and four missing milk yield data. Following the removal of all observations with a missing value (n=134) and wavenumber reduction, the dataset contained 622 observations with 223 variables. Final dataset variables are summarized in Table 1. The final dataset consisted of absorbance values for 212 wavenumbers, cow ID, breed, sampling date, calving date, DIM, lactation number, milk yield (kg), fat percent, protein percent, blood BHB, and blood NEFA.

Table 1.

Descriptive statistics of cow production variables in the optiKuh dataset from nine dairy herds in Germany sampled between 6 and 60 days in milk (n=626). This dataset was used to create numeric and classification prediction models for blood BHB1 and blood NEFA2 prediction models using milk Fourier-transform infrared spectroscopy.

Variable Mean (Median) SD1 (Range) Missing values (no.)
Lactation # 2.9 (3) 1.7 (1–10) 0
Days in Milk 21.0 (27) 12.6 (6–60) 0
Milk per day(kg) 37.4 8.7 4
Fat (%) 4.3 0.8 0
Protein (%) 3.3 0.3 0
BHB1 (mmol/L) 0.79 (0.70) 0.4 (0.14–5.98) 0
NEFA2 (mmol/L) 0.29 (0.53) 0.28 (0.05–3.01) 0
1

Blood beta-hydroxybutyrate

2

Blood non-esterified fatty acids

3

Standard Deviation

4

(n=) refers to total number of observations

Sample collection was performed throughout the year and observations were aggregated by season as follows: winter (December-February) 140 samples, spring (March-May) 104 samples, summer (June-August) 188 samples, and fall (September-November) 190 samples. A single sample was collected from 407 cows, 106 cows were sampled twice, and one cow was sampled three times. The median number of samples per farm was 55 (range 2–180). There were 152 first lactation cows and 470 cows were in their second or greater lactation (median=3, range 1–10). A total of 563 Holstein and 59 Flekvieh samples were included in the final dataset. Prevalence of blood BHB greater than 1.2 mmol/L was 11.8% (74/622), the prevalence of blood NEFA levels greater than 0.7 mmol/L was 33.3% (207/622), and the prevalence of FPQ values greater than 1.4 was 30.9% (192/622).

ENET for Prediction of Blood BHB and Blood NEFA

Out of the 215 variables (DIM, lactation group, milk yield, 212 wavenumber variables) introduced to the ENET model, 69 remained in the final model for log-transformed blood BHB. The maximum coefficient magnitude identified (438.51) was for wavenumber 1283.715. The DIM coefficient shrank to 0 and was removed from the model, the other production variables also had minimal coefficient values (lactation group-primiparous = −0.353, milk yield = −0.002). The low predictive importance of cow information variables allows for simplified prediction models requiring only a milk sample and no additional cow information in the future.

ENET regression for blood BHB was tuned to an α-value of 0.2421 and λ-value of 0.0258. Cross-validated results of an R2 of 0.5627 0.2610(SD) and RMSE of 0.3873 0.1380(SD) were recorded. These results were within comparable ranges to previously published studies. Belay et al. (2017) used milk FTIR to predict blood BHB with an R2 of 0.217 to 0.316 for cross-validated data. Using an artificial neural network or PLS, Pralle et al. (2018) reported an R2 of 0.44 ± 0.01 and R2 of 0.36 ± 0.01, respectively. The RMSE values from the current study were greater than both Belay et al. (2017) (RMSE = 0.22) and Pralle et al. (2018) (RMSE = 0.16). Possible reasons for greater RMSE values may be related to our limited dataset size (n=622) relative to Pralle et al. (2018) (n=3,020), differences in measurements of IR spectra, or actual differences regarding model prediction performance.

ENET classification model results are summarized for BHB and NEFA predictions in Table 3. At a threshold BHB value of 1.2 mmol/L, the ENET classification model had a balanced accuracy of 87% (80% – 91%), with a sensitivity of 90% (81% - 96%) and a specificity of 83% (80% - 86%). The PPV and NPV were 43% (35% - 51%) and 98% (97% - 98%) respectively. The prevalence of hyperketonemia as determined by true and predicted blood BHB was overestimated by our prediction model with an apparent prevalence of 26% (22% - 30%) compared to the true prevalence of 12% (10% - 15). In comparison, Pralle et al. (2018) achieved sensitivities ranging from 76 – 81% and specificities of 71 – 81% using PLS, multivariate linear regression, or an artificial neural network. Achieving high PPV for elevated blood BHB in unbalanced datasets is a primary challenge for milk FTIR prediction models (Bonfatti et al., 2019; van Knegsel et al., 2010). van Knegsel et al. (2010) reported a PPV of only 18% (13% - 24%) using milk BHB for determination of hyperketonemia. Similarly, Bonfatti et al. (2019) achieved a PPV of only 37% when predicting blood BHB at a threshold of 1.2 mmol/L. Results from both our ENET regression model and ENET classification model for BHB are similar to other modeling techniques in published literature, showing that ENET is a good alternative to PLS.

Table 3.

Summary of the ElasticNet classification model predictions using 7-fold cross-validation of the optiKuh dataset (from nine dairy herds in Germany sampled between 6 and 60 days in milk), including milk yield, DIM, and lactation group (primiparous or multiparous) for blood beta-hydroxybutyrate (BHB1) greater than 1.2mmol/L and blood non-esterified fatty acids (NEFA2) values greater than 0.7 mmol/L (n=622).

Outcome Ap. Prev* T. Prev* Sensitivity Specificity Bal Acc.* PPV* NPV*
BHB
(1.2 mmol/L)
0.26
(0.22 – 0.30)
0.12
(0.10–0.15)
0.90
(0.81 – 0.96)
0.83
(0.80 – 0.86)
0.87
(0.80 – 0.91)
0.43
(0.35 – 0.51)
0.98
(0.97 – 0.98)
NEFA
(0.7 mmol/L)
0.42
(0.38 – 0.46)
0.35
(0.31 – 0.39)
0.73
(0.66 – 0.79)
0.74
(0.69 – 0.78)
0.73
(0.68 – 0.79)
0.60
(0.54 – 0.66)
0.84
(0.79 – 0.87)
1

Beta-hydroxybutyrate

2

Non-esterified fatty acids

*

Apparent prevalence (Ap. Prev), True prevalence (T. Prev), sensitivity, specificity, balanced accuracy (Bal Acc.), positive predictive value (PPV), and negative predictive value (NPV) were calculated for all threshold values with a 95% confidence interval.

The current ENET model for the prediction of blood NEFA values achieved an R2 value of 0.5093 0.2473(SD) and an RMSE of 0.4825 0.9260(SD). Elevated blood NEFA prediction above the 0.7 mmol/L threshold value achieved a balanced accuracy of 73% (68% – 79%) with a sensitivity of 73% (66% – 79%) and specificity of 74% (69% – 78%). Apparent prevalence and true prevalence confidence intervals overlapped and are shown in Table 3.

Prediction of blood NEFA levels using FTIR has been recently evaluated by multiple authors. Using PLS and milk FTIR, Bach et al. (2021), Benedet et al. (2019), and Luke et al. (2019) reported an R2 for blood NEFA prediction of 0.53, 0.56, and 0.51, respectively, similar to our achieved ENET regression results of 0.51. ENET classification results were comparable to Luke et al. (2019) who reported a sensitivity of 73% and Tremblay et al. (2019) who achieved a sensitivity of 77% (71%−83%), but lower than Aernouts et al. (2020) who reported sensitivity values up to 83.1%. Specificities were similar for Luke et al. (2019) (69%), Tremblay et al. (2019) (77%) (74%−80%), and our study, while Aernouts et al. (2020) achieved specificities as high as 80%. Aeronauts et al. (2020) may have reported higher test values in part due to lower cutoff values for elevated NEFA (0.6 mmol/L) relative to our own (0.7 mmol/L), resulting in a less imbalanced dataset. These results indicate that ENET regression and classification for blood NEFA using milk FTIR are a good alternative to PLS prediction models.

External Validation and Metabolic Disorder Prediction

External validation of our ENET prediction models was performed using the Qcheck dataset to account for overfitting bias. Applying the optiKuh regression models for prediction, RMSE was 0.4018 (95% CI 0.3958 – 0.4082) for log-transformed blood BHB and 0.4043 (95% CI 0.3937 – 0.4159) for log-transformed blood NEFA prediction. Figure 1 shows observed versus predicted blood BHB and displays the challenge that our model faces for predicting values greater than 2.0 mmol/L BHB. Similar challenges were observed by Pralle et al. (2018) and Bach et al. (2021). The limited observations in our training dataset above 2.0 mmol/L likely reduce the model’s ability to accurately generalize to values outside of the training range of data. Figure 2 shows observed versus predicted blood NEFA values for the Qcheck dataset.

Figure 1.

Figure 1.

Observed versus predicted values of blood beta-hydroxybutyrate (BHB)1 for the ElasticNet regression model of dairy cows from Germany (Qcheck dataset, n=9,660, collected from 10 dairy farms in Bavaria and Thuringia, Germany) between 5 and 50 days in milk using milk Fourier-transformed infrared spectroscopy and production variables (milk yield, DIM, lactation group).

1 Actual values from blood BHB are graphed along the x-axis, BHB values generated from ElasticNet regression model prediction using milk FTIR are graphed along the y-axis. The red line of best fit is overlaid on the scatterplot.

Figure 2.

Figure 2.

Observed versus predicted values of blood non-esterified fatty acids (NEFA)1 for the ElasticNet regression model of dairy cows from Germany (Qcheck dataset, n=9,660, collected from 10 dairy farms in Bavaria and Thuringia, Germany) between 5 and 50 days in milk using milk Fourier-transformed infrared spectroscopy and production variables (milk yield, DIM, lactation group).

1 Actual values from blood NEFA are graphed along the x-axis, NEFA values generated from ElasticNet regression model prediction using milk FTIR are graphed along the y-axis. The line of best fit is overlaid on the scatterplot.

The relationship between BHB and NEFA levels was important for our ability to identify cows with different responses to NEB. We used Pearson’s correlation coefficients to improve our understanding of the correlations between the observed and predicted metabolites under study. Our observed blood BHB and blood NEFA values had a Pearson’s correlation coefficient of 0.31 (P<0.001) while predicted blood BHB and predicted blood NEFA had a higher correlation coefficient of 0.69 (P<0.001). The correlation coefficient between predicted blood BHB and true blood BHB was 0.51 (P<0.001). Predicted blood NEFA and true blood NEFA had a correlation coefficient of 0.50 (P<0.001). The fact that predicted blood BHB and predicted blood NEFA values had a higher correlation than observed values limits the capability for differentiating cows based on the predicted values. One reason for this increased correlation in the predicted values could be the limited sample size of the training dataset, the imbalance between numbers of high and low-value observations in the dataset, different time points of the day when measurements were conducted compared to other studies that reported a low correlation between blood BHB and blood NEFA (McCarthy et al., 2015; Ospina et al., 2013). We did not influence the prevalence of high versus low blood levels of BHB and NEFA in the random samples of our dataset and therefore, we do not expect the random prevalence of 11.8% for BHB and 33.3% for NEFA to cause the relatively high correlation between the predicted values of blood BHB and blood NEFA. We suspect that the limited sample size is causing the difference in Pearson’s correlation coefficients and support the idea of checking the correlations between observed and predicted values as part of routine evaluations of model performance.

Hyperketonemia and its association with dairy cattle metabolic disorders is well documented (Drackley, 1999; Lean et al., 1992; Overton et al., 2017). However, the identification and management of cows exhibiting metabolic disorders that are not associated with elevated blood BHB have lagged (Tremblay et al., 2018). Ospina et al. (2013) reported that blood NEFA and blood BHB are not well correlated when measured on the same day. Additionally, blood NEFA values were also better overall predictors of negative health events when compared to blood BHB. McCarthy et al. (2015) observed a poor correlation between blood NEFA and blood BHB levels during the transition period and concluded that the two metabolic markers are not alternatives for each other. Contradicting results to McCarthy et. al (2015) and Ospina et al. (2013) were reported by Seely et al. (2021), who measured blood BHB and blood NEFA every 2 hours and observed a high correlation of 0.81 between blood BHB and blood NEFA, with variability throughout the day. Diurnal variability may explain some of the differences in the results between blood BHB and blood NEFA values observed, both in this study and others. Additionally, energy and glucose metabolism vary between cows in the same environment, indicating that cow factors play a role in response to NEB and may result in different biomarker levels (Hammon et al., 2009). The conflicting results regarding BHB and NEFA correlation suggest that cows with elevated blood NEFA but normal blood BHB levels, such as PMAS cows, may not be identified on dairies using a blood BHB focused testing strategy, as presented by Oetzel (2004). The high correlation of predicted blood metabolites also hinders the classification of cows with different blood BHB and blood NEFA levels using FTIR predicted blood BHB and blood NEFA values.

Despite the relatively high correlation between predicted blood BHB and blood NEFA, balanced accuracy for metabolic disorder classifications of cows using predicted blood BHB, predicted blood NEFA, and milk FPQ was 94% (9081/9660). The sensitivity for detection of cows with metabolic disorders was 94% (3354/3542) and specificity was 94% (5727/6118). The accuracy of predicting metabolic disorders was greater for the combined BHB, NEFA, and FPQ compared to prediction using BHB or NEFA alone. By using a combination of BHB, NEFA, and FPQ, this approach enables the identification of cows affected by hyperketonemia and hyperlipemia together with deviations of FPQ values that are prone to metabolic disorders.

Similar metabolic clustering approaches have been recently explored by De Koster et al. (2019) who used K-means clustering to group cows based on metabolic status from milk FTIR, production information, and known components of glucose, NEFA, BHB, and IGF-1. Cows were described as having balanced, moderately impacted, or imbalanced metabolic status. FTIR data were used to implement a prediction model for imbalanced or balanced metabolic status. Balanced metabolic status was predicted with an average accuracy of 76% and imbalanced metabolic status average prediction accuracy was 81%. The direct prediction of metabolic status using milk FTIR may allow more accurate identification of cows with metabolic disorders compared to using a single biomarker or single cow-side tests. This opens opportunities for herd-level management of cows affected by metabolic disorders early after calving.

As an alternative to the prediction of blood metabolites or metabolic status, Gengler et al. (2016) proposed direct prediction of health events. Similar usage of FTIR data as a direct phenotypic predictor has been proposed by multiple authors to avoid costly measurement approaches (De Marchi et al., 2014; Egger-Danner et al., 2015). Future work could focus on predicting both phenotypic outcomes and intermediary blood metabolite values, allowing for a more direct comparison between these different methods.

Our metabolic disorder identification approach allows for more informed management of at-risk cows. By identifying cows suspect of metabolic disorders through routine milk testing, producers can initiate prompt cow care. This approach benefits PMAS cows that, due to normal blood BHB levels, may otherwise not receive treatment with severe health consequences, including death. McArt et al. (2015) reported the direct costs of hyperketonemia treatment to represent only 5% of the true economic costs for managing cows with metabolic disorders. Indirect costs of metabolic diseases, such as reduced production, fertility problems, and culling, represent a much greater proportion of the total costs. The same is true for blood NEFA. Seifi et al. (2011) reported that cows with elevated NEFA had a 3.6 times greater risk for culling. Therefore, prompt identification and treatment of cows suffering from metabolic disorders can save cows’ lives resulting in lower economic losses. These evidence-based findings support that overdiagnosis of metabolic disorders is preferable to underdiagnosis, both from a cow welfare and cost perspective.

The present study combined data from multiple German dairy farms to generate prediction models for blood BHB and blood NEFA using milk FTIR data. The use of multiple farms increased both the number of samples able to be collected and introduced between farm variability. This improved the ability to generate robust prediction models for blood BHB and blood NEFA. As the study was observational, we were able to examine associations between our variables but are unable to demonstrate causal relationships. Additionally, the usage of an external validation dataset helps provide more support for our prediction model evaluation.

Conclusions

FTIR-based prediction models have potential as a screening tool for hyperketonemia and other metabolic disorders. This project demonstrates milk FTIR models are appropriate as screening tests for hyperketonemia and with performance improvement could be employed as a diagnostic test. Additionally, combining prediction models for blood BHB, blood NEFA, and FPQ can improve identification of metabolically disordered cows. Continued development on FTIR prediction models should focus on improving diagnostic accuracy and gaining a better understanding of how prediction models can be implemented together to maximize cow welfare.

Table 2.

Descriptive statistics of cow production variables in the Qcheck dataset (dataset collected from 10 dairy farms in Bavaria and Thuringia, Germany) with known values of blood BHB1 and NEFA2 used in external validation of ElasticNet and milk Fourier-transform infrared spectroscopy prediction of blood BHB1 and blood NEFA (n=9,660).

Variable Mean (median) SD3 (range) Missing values (no.)
Lactation # 2.6 (2) 1.7 (1–11) 0
Days in Milk 23.0 (22) 1.7 (5–50) 0
Milk per day(kg) 33.5 8.3 0
Fat (%) 4.4 0.9 0
Protein (%) 3.3 0.3 0
BHB1 (mmol/L) 0.8 (0.7) 0.4 (0.14–5.98) 0
NEFA2 (mmol/L) 0.29 (0.2) 0.28 (0.02–3.71) 0
1

Blood beta-hydroxybutyrate

2

Blood non-esterified fatty acids

3

Standard Deviation

4

(n=) refers to total number of observations

Acknowledgments

The optiKuh project was supported by funds of the Federal Ministry of Food and Agriculture (BMEL) based on a decision of the Parliament of the Federal Republic of Germany via the Federal Office for Agriculture and Food (BLE) under the innovation support program (2817201013).

The QCheck project was supported by funds of the Federal Ministry of Food and Agriculture (BMEL) based on a decision of the Parliament of the Federal Republic of Germany via the Federal Office for Agriculture and Food (BLE) under the innovation support program. The authors acknowledge the MPR Bayern e.V. (Bavarian Association for Raw Milk Testing) and the LKV Bayern e. V. (Dairy Herd Improvement Association of Bavaria) for supporting the collection of the current data under study. We appreciate the work done by FOSS for providing the fatty acid panels used for the analysis. We gratefully acknowledge all dairy farms taking part in our project and the team of the laboratory in the Clinic for Ruminants, Ludwig- Maximilian-University Munich. Special thanks to our colleagues, Anne Reus, Franziska Hajek, and Dr. Stefan Plattner for supporting the data collection. The official identification number for the animal experiment proposal by the Government of Bavaria was ROB-55.2Vet-2532.Vet_03-17-84 and the Thuringian State Office of Consumer Protection was 22-2684-04-LMU-17-101.

Funding support was also provided by the National Institutes of Health through the Comparative Biomedical Sciences Training Grant T32OD010423.

Footnotes

Declaration of interests

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

REFERENCES

  1. Aernouts B, Adriaens I, Diaz-Olivares J, Saeys W, Mäntysaari P, Kokkonen T, Mehtiö T, Kajava S, Lidauer P, Lidauer MH, Pastell M, 2020. Mid-infrared spectroscopic analysis of raw milk to predict the blood nonesterified fatty acid concentrations in dairy cows. Journal of Dairy Science 103, 6422–6438. 10.3168/jds.2019-17952 [DOI] [PubMed] [Google Scholar]
  2. Bach KD, Barbano DM, McArt JAA, 2021. The relationship of excessive energy deficit with milk somatic cell score and clinical mastitis. Journal of Dairy Science 104, 715–727. 10.3168/jds.2020-18432 [DOI] [PubMed] [Google Scholar]
  3. Bach KD, Barbano DM, McArt JAA, 2019. Association of mid-infrared-predicted milk and blood constituents with early-lactation disease, removal, and production outcomes in Holstein cows. Journal of Dairy Science 102, 10129–10139. 10.3168/jds.2019-16926 [DOI] [PubMed] [Google Scholar]
  4. Belay TK, Dagnachew BS, Kowalski ZM, Ådnøy T, 2017. An attempt at predicting blood β-hydroxybutyrate from Fourier-transform mid-infrared spectra of milk using multivariate mixed models in Polish dairy cattle. Journal of Dairy Science 100, 6312–6326. 10.3168/jds.2016-12252 [DOI] [PubMed] [Google Scholar]
  5. Benedet A, Franzoi M, Penasa M, Pellattiero E, De Marchi M, 2019. Prediction of blood metabolites from milk mid-infrared spectra in early-lactation cows. Journal of Dairy Science 102, 11298–11307. 10.3168/jds.2019-16937 [DOI] [PubMed] [Google Scholar]
  6. Bonfatti V, Turner S-A, Kuhn-Sherlock B, Luke TDW, Ho PN, Phyn CVC, Pryce JE, 2019. Prediction of blood β-hydroxybutyrate content and occurrence of hyperketonemia in early-lactation, pasture-grazed dairy cows using milk infrared spectra. Journal of Dairy Science 102, 6466–6476. 10.3168/jds.2018-15988 [DOI] [PubMed] [Google Scholar]
  7. Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP, 2002. SMOTE: Synthetic Minority Over-sampling Technique. Journal of Artificial Intelligence Research 16, 321–357. 10.1613/jair.953 [DOI] [Google Scholar]
  8. De Koster J, Salavati M, Grelet C, Crowe MA, Matthews E, O’Flaherty R, Opsomer G, Foldager L, Hostens M, 2019. Prediction of metabolic clusters in early-lactation dairy cows using models based on milk biomarkers. Journal of Dairy Science 102, 2631–2644. 10.3168/jds.2018-15533 [DOI] [PubMed] [Google Scholar]
  9. De Marchi M, Toffanin V, Cassandro M, Penasa M, 2014. Invited review: Mid-infrared spectroscopy as phenotyping tool for milk traits. Journal of Dairy Science 97, 1171–1186. 10.3168/jds.2013-6799 [DOI] [PubMed] [Google Scholar]
  10. Drackley JK, 1999. Biology of Dairy Cows During the Transition Period: the Final Frontier? Journal of Dairy Science 82, 2259–2273. 10.3168/jds.S0022-0302(99)75474-3 [DOI] [PubMed] [Google Scholar]
  11. Duffield TF, Kelton DF, Leslie KE, Lissemore KD, Lumsden JH, 1997. Use of test day milk fat and milk protein to detect subclinical ketosis in dairy cattle in Ontario. Canadian Veterinary Journal 38, 713–718. [PMC free article] [PubMed] [Google Scholar]
  12. Duffield TF, Lissemore KD, McBride BW, Leslie KE, 2009. Impact of hyperketonemia in early lactation dairy cows on health and production. Journal of Dairy Science 92, 571–580. 10.3168/jds.2008-1507 [DOI] [PubMed] [Google Scholar]
  13. Engebretsen S, Bohlin J, 2019. Statistical predictions with glmnet. Clinical Epigenetics 11, 123. 10.1186/s13148-019-0730-1 [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Frank IE, Friedman JH, 1993. A Statistical View of Some Chemometrics Regression Tools. Technometrics 35, 109–135. 10.2307/1269656 [DOI] [Google Scholar]
  15. Gengler N, Soyeurt H, Dehareng F, Bastin C, Colinet F, Hammami H, Vanrobays M-L, Lainé A, Vanderick S, Grelet C, Vanlierde A, Froidmont E, Dardenne P, 2016. Capitalizing on fine milk composition for breeding and management of dairy cows. Journal of Dairy Science 99, 4071–4079. 10.3168/jds.2015-10140 [DOI] [PubMed] [Google Scholar]
  16. Grelet C, Fernández Pierna JA, Dardenne P, Baeten V, Dehareng F, 2015. Standardization of milk mid-infrared spectra from a European dairy network. Journal of Dairy Science 98, 2150–2160. 10.3168/jds.2014-8764 [DOI] [PubMed] [Google Scholar]
  17. Gruber S, Tremblay M, Kammer M, Reus A, Hajek F, Plattner S, Baumgartner C, Hachenberg S, Döpfer D, Mansfeld R, 2021. Validation of a prediction model for hyperketonemia and poor metabolic adaptation syndrome in dairy cows based on regression tree full model selection. Milk Science International. [Google Scholar]
  18. Hastie T, Tibshirani R, Friedman J, 2009. The Elements of Statistical Learning: Data Mining, Inference, and Prediction, Second Edition. Springer Science & Business Media. [Google Scholar]
  19. Hoerl AE, Kennard RW, 1970. Ridge Regression: Biased Estimation for Nonorthogonal Problems. Technometrics 12, 55–67. 10.1080/00401706.1970.10488634 [DOI] [Google Scholar]
  20. James G, Witten D, Hastie T, Tibshirani R, 2013. An Introduction to Statistical Learning, Springer Texts in Statistics. Springer; New York, New York, NY. 10.1007/978-1-4614-7138-7 [DOI] [Google Scholar]
  21. Kuhn M, 2008. Building Predictive Models in R Using the caret Package. Journal of Statistical Software 28, 1–26. 10.18637/jss.v028.i0527774042 [DOI] [Google Scholar]
  22. Lean I, Bruss M, Baldwin RL, Troutt HF, 1992. Bovine ketosis: A review. II. Biochemistry and prevention. Veterinary Bulletin 62, 1–14. [Google Scholar]
  23. Luke TDW, Rochfort S, Wales WJ, Bonfatti V, Marett L, Pryce JE, 2019. Metabolic profiling of early-lactation dairy cows using milk mid-infrared spectra. Journal of Dairy Science 102, 1747–1760. 10.3168/jds.2018-15103 [DOI] [PubMed] [Google Scholar]
  24. McArt JAA, Nydam DV, Oetzel GR, Overton TR, Ospina PA, 2013. Elevated non-esterified fatty acids and β-hydroxybutyrate and their association with transition dairy cow performance. The Veterinary Journal 198, 560–570. 10.1016/j.tvjl.2013.08.011 [DOI] [PubMed] [Google Scholar]
  25. McArt JAA, Nydam DV, Overton MW, 2015. Hyperketonemia in early lactation dairy cattle: A deterministic estimate of component and total cost per case. Journal of Dairy Science 98, 2043–2054. 10.3168/jds.2014-8740 [DOI] [PubMed] [Google Scholar]
  26. McCarthy MM, Mann S, Nydam DV, Overton TR, McArt JAA, 2015. Short communication: Concentrations of nonesterified fatty acids and β-hydroxybutyrate in dairy cows are not well correlated during the transition period. Journal of Dairy Science 98, 6284–6290. 10.3168/jds.2015-9446 [DOI] [PubMed] [Google Scholar]
  27. Oetzel GR, 2004. Monitoring and testing dairy herds for metabolic disease. Veterinary Clinics of North America: Food Animal Practice 20, 651–674. 10.1016/j.cvfa.2004.06.006 [DOI] [PubMed] [Google Scholar]
  28. Ospina PA, McArt JA, Overton TR, Stokol T, Nydam DV, 2013. Using Nonesterified Fatty Acids and β-Hydroxybutyrate Concentrations During the Transition Period for Herd-Level Monitoring of Increased Risk of Disease and Decreased Reproductive and Milking Performance. Veterinary Clinics of North America: Food Animal Practice, Metabolic Diseases of Dairy Cattle 29, 387–412. 10.1016/j.cvfa.2013.04.003 [DOI] [PubMed] [Google Scholar]
  29. Overton TR, McArt J. a. A., Nydam DV, 2017. A 100-Year Review: Metabolic health indicators and management of dairy cattle. Journal of Dairy Science 100, 10398–10417. 10.3168/jds.2017-13054 [DOI] [PubMed] [Google Scholar]
  30. Pralle RS, Weigel KW, White HM, 2018. Predicting blood β-hydroxybutyrate using milk Fourier transform infrared spectrum, milk composition, and producer-reported variables with multiple linear regression, partial least squares regression, and artificial neural network. Journal of Dairy Science 101, 4378–4387. 10.3168/jds.2017-14076 [DOI] [PubMed] [Google Scholar]
  31. R Core Team, 2021. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. [Google Scholar]
  32. Seely CR, Bach KD, Barbano DM, McArt J. a. A., 2021. Effect of hyperketonemia on the diurnal patterns of energy-related blood metabolites in early-lactation dairy cows. Journal of Dairy Science 104, 818–825. 10.3168/jds.2020-18930 [DOI] [PubMed] [Google Scholar]
  33. Seifi HA, LeBlanc SJ, Leslie KE, Duffield TF, 2011. Metabolic predictors of post-partum disease and culling risk in dairy cattle. The Veterinary Journal 188, 216–220. 10.1016/j.tvjl.2010.04.007 [DOI] [PubMed] [Google Scholar]
  34. Sundrum A, 2015. Metabolic Disorders in the Transition Period Indicate that the Dairy Cows’ Ability to Adapt is Overstressed. Animals 5, 978–1020. 10.3390/ani5040395 [DOI] [PMC free article] [PubMed] [Google Scholar]
  35. Tibshirani R, 1996. Regression Shrinkage and Selection via the Lasso. Journal of the Royal Statistical Society. Series B (Methodological) 58, 267–288. [Google Scholar]
  36. Tremblay M, Kammer M, Lange H, Plattner S, Baumgartner C, Stegeman JA, Duda J, Mansfeld R, Döpfer D, 2019. Prediction model optimization using full model selection with regression trees demonstrated with FTIR data from bovine milk. Preventive Veterinary Medicine 163, 14–23. 10.1016/j.prevetmed.2018.12.012 [DOI] [PubMed] [Google Scholar]
  37. Tremblay M, Kammer M, Lange H, Plattner S, Baumgartner C, Stegeman JA, Duda J, Mansfeld R, Döpfer D, 2018. Identifying poor metabolic adaptation during early lactation in dairy cows using cluster analysis. Journal of Dairy Science 101, 7311–7321. 10.3168/jds.2017-13582 [DOI] [PubMed] [Google Scholar]
  38. van Knegsel ATM, van der Drift SGA, Horneman M, de Roos APW, Kemp B, Graat EAM, 2010. Short communication: Ketone body concentration in milk determined by Fourier transform infrared spectroscopy: Value for the detection of hyperketonemia in dairy cows. Journal of Dairy Science 93, 3065–3069. 10.3168/jds.2009-2847 [DOI] [PubMed] [Google Scholar]
  39. Weigel KA, VanRaden PM, Norman HD, Grosu H, 2017. A 100-Year Review: Methods and impact of genetic selection in dairy cattle—From daughter–dam comparisons to deep learning algorithms. Journal of Dairy Science 100, 10234–10250. 10.3168/jds.2017-12954 [DOI] [PubMed] [Google Scholar]
  40. Wickham H, 2016. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag; New York. [Google Scholar]
  41. Zou H, Hastie T, 2005. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 67, 301–320. 10.1111/j.1467-9868.2005.00503.x [DOI] [Google Scholar]

RESOURCES