Authors: Lúcio Flávio Macêdo Mota | Diana Giannuzzi | Vittoria Bisutti | Sara Pegolo | Erminio Trevisi | Stefano Schiavon | Luigi Gallo | David Fineboym | Gil Katz | Alessio Cecchinato
Source: Journal of Dairy Science (article, 2022-03-10)
Field: Chemistry — Analytical Chemistry

Real-time milk analysis integrated with stacking ensemble learning as a tool for the daily prediction of cheese-making traits in Holstein cattle Cheese-making traits in dairy cattle are important to the dairy industry but are difficult to measure at the individual level because there are limitations on collecting phenotypic information. Mid-infrared spectroscopy has its advantages, but it can only be used during monthly milk recordings. Recently, in-line devices for real-time analysis of milk quality have been developed. The AfiLab recording system (Afimilk) offers significant benefits as phenotypes can be collected from each cow at each milking session. The objective of this study was to assess the potential of integrating AfiLab real-time milk analyzer measures with the stacking ensemble learning technique using heterogeneous base learners for the in-line daily monitoring of cheese-making traits in Holstein cattle with a view to developing a precision livestock farming system for monitoring the technological quality of milk. Data and samples for wet-laboratory analyses were collected from 499 Holstein cows belonging to 2 farms where the AfiLab system was installed. The traits of concern were 9 milk coagulation traits [3 milk coagulation properties (MCP), and 6 curd firming traits (CF<sub>t</sub>)], and 7 cheese-making traits [3 cheese yield (CY) traits, and 4 milk nutrient recovery in the curd (REC) traits]. The near-infrared AfiLab spectral data and on-farm information (days in milk and parity) were used to assess the predictive ability of different statistical methods [elastic net (EN), gradient boosting machine (GBM), extreme gradient boosting (XGBoost), and artificial neural network (ANN)] across different cross-validation scenarios. These statistical methods were considered the base learners, which were then combined in a stacking ensemble learning. Results indicate that including information on the cows (days in milk and parity) in the AfiLab infrared prediction increased its accuracy by 10.3% for traditional MCP, 13.8% for curd firming, 9.8% for CY, and 11.2% for REC traits compared with those obtained from near-infrared AfiLab alone. The statistical approaches exhibited high prediction accuracies (R<sup>2</sup>) averaged across the cross-validation scenarios for traditional MCP (0.58 for ANN, 0.55 for EN and GBM, 0.52 for XGBoost, and 0.62 for stacking ensemble), CF<sub>t</sub> (0.55 for ANN, 0.54 for EN and GBM, 0.53 for XGBoost, and 0.61 for stacking ensemble), and similar R<sup>2</sup> averages for CY and REC (0.55 for ANN, 0.54 for EN and GBM, 0.53 for XGBoost, and 0.61 for stacking ensemble). The ANN approach was more accurate than the other base learners (EN, GBM, and XGBoost) and improved accuracy across cross-validation scenarios on average by 7% for traditional MCP, 5% for CF<sub>t</sub>, 8% for CY, and 7% for REC. The stacking ensemble method improved prediction accuracy by 3% to 31% for traditional MCP, 2% to 26% for CF<sub>t</sub>, 1% to 38% for CY traits, and 2% to 27% for REC traits compared with the base learners. The prediction accuracies of the different approaches evaluated tended to decrease from the 10-fold cross-validation to the independent validation scenario, although there was a smaller reduction in prediction accuracy with the stacking ensemble learning technique across all the cross-validation scenarios. Our results show that combining in-line on-farm information with stacking ensemble machine learning represents an effective alternative for obtaining robust daily predictions of milk cheese-making traits. Dairy cattle ; Milking ; Boosting (machine learning) ; Biology ; Biotechnology ; Animal science ; Computer science ; Artificial intelligence Spectroscopy and Chemometric Analyses ; Milk Quality and Mastitis in Dairy Cows ; Effects of Environmental Stressors on Livestock