Compares machine learning models for predicting milk yield in dairy cows, indicating improved accuracy with advanced models.
The expansion of digital technologies in dairy farming (precision dairy farming) has created new opportunities for the systematic use of data, which can lead to more efficient production processes. This study aimed to develop and evaluate models for predicting daily milk yield from dairy cows during summer. This yield was modeled at the individual level, with days in milk and parity group included as baseline covariates in all analyses. Three feature-set scenarios were defined and evaluated, in which the temperature–humidity index (THI) and milk yield history were added to the baseline variables either separately (Scenarios 1 and 2) or jointly (Scenario 3). Performance was evaluated using walk-forward validation, and feature selection was nested within each iteration’s training window. The performance of the linear mixed model (LMM) was then compared with two machine learning models, random forest (RF) and gradient boosting machine (GBM), within the same experimental framework. In Scenario 3, all three models showed similar fits (R2 = 0.92 and concordance correlation coefficient = 0.96), although the GBM model yielded a smaller error (root mean square error [RMSE] = 2.07 ± 0.22, mean absolute error [MAE] = 1.39 ± 0.12) than the RF model (RMSE = 2.10 ± 0.23, MAE = 1.45 ± 0.13) and the LMM (RMSE = 2.15 ± 0.22, MAE = 1.41 ± 0.10). Overall, adding the THI and recent milk yield history to the baseline variables improved short-term prediction accuracy in this dataset, with the GBM model showing the smallest error. These results can support farmers and herd managers in predicting short-term milk yield under heat stress conditions and making timely management decisions.
No takes yet. Share an insight, caveat, or question.
Darabighane et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: