Predicting reticuloruminal pH and subacute ruminal acidosis of individual cows using machine learning and
1Département des sciences animales, Université Laval, Québec, QC, Canada G1V 0A6; Institut intelligence et données, Université Laval, Québec, QC, Canada G1V 0A6; Centre de recherche en données massives, Université Laval, Québec, QC, Canada G1V 0A6.
Abstract:
Low reticuloruminal pH (rpH) for a prolonged period could lead to SARA. This disease negatively affects cow health and is associated with monetary losses for the dairy industry. The aim of this study was to predict rpH and SARA separately using different machine learning (ML) models applied to Fourier-transform infrared spectroscopy (FTIR) spectra obtained from routine DHI milk analysis of individual cows. A total of 107 primiparous and multiparous Holstein cows were selected from 12 commercial farms in Québec, Canada, and their rpH was continuously monitored for 150 d using wireless boluses. In parallel, 2,634 individual milk samples were collected in the morning and afternoon and analyzed to obtain FTIR spectra. After the cleaning process, 1,744 samples remained, evenly divided into 872 morning (a.m.) and 872 afternoon (p.m.) samples. The FTIR and rpH data were combined to create 3 equally balanced datasets for ML model development: one for a.m. samples, one for p.m. samples, and one composed of both a.m. and p.m. samples, with 872 samples in each dataset. Various spectra preprocessing methods were evaluated, including using the first derivative of the spectra and filtering with 3 different sets of spectra. Additionally, different ML algorithms, including partial least squares, random forest, and gradient boosting, were used to predict rpH and SARA. A total of 36 different models were developed and evaluated for both rpH and SARA prediction. All ML models were assessed using 3 different cross-validation (C-V) methods: nested 10-fold, nested leave-one-farm-out (LOFO), and nested leave-cows-out (LCO) C-V. For rpH prediction, the best performance was achieved using nested 10-fold C-V with median R2 values of 0.26, 0.26, and 0.22 for the a.m., p.m., and a.m./p.m. datasets, respectively. However, these performances were likely overoptimistic as none of the models evaluated using nested LOFO or nested LCO C-V obtained R2 higher than 0.12. Unlike rpH, SARA prediction accuracies evaluated using nested LOFO (a.m.: 59%, p.m.: 69%, a.m./p.m.: 64%), and nested LCO (a.m.: 67%, p.m.: 66%, a.m./p.m.: 64%) were closer to the nested 10-fold C-V. These results indicated that rpH was likely not predictable from FTIR, but SARA can be predicted separately and directly from FTIR with 69% accuracy from routine DHI milk samples of individual cows.
More Related Videos
Related Concept Videos
IR and UV–Vis Spectroscopy of Carboxylic Acids
However, the stretching absorptions for the C=O bond vary depending on the structure of carboxylic acids. The C=O bond of the free carboxylic acids shows a higher stretching frequency, 1760 cm−1, while H-bonded carboxylic acids (dimers) exhibit stretching absorptions at a lower frequency,...
NMR and Mass Spectroscopy of Carboxylic Acids
While α protons of carboxylic acids absorb at 2–2.5 ppm, β protons absorb further upfield.
Carboxylic acids are easily identified by dissolving them in deuterium oxide, which results in a rapid exchange of the acidic protons with deuterium. This leads to the...


