An effective way to incorporate temperature–humidity index to study effect of heat stress on milk yield by an XGBoost machine learning model - Hasan, M.F.; Celik, N.; Williams, Y.; Williams, S.R.O.; Marett, L.C. (Journal of dairy science, 2025)
The list of standard abbreviations for JDS is available at adsa.org/jds-abbreviations-24. Nonstandard abbreviations are available in the Notes. Commercial dairy farms face major challenges in safeguarding animal welfare and overall farm sustainability from environmental heat stressors. As climate change drives increased temperatures in many places, it is essential to predict the potential effects of heat stress on dairy cows to mitigate the adverse impact. This study aimed to develop an eXtreme Gradient Boosting (XGBoost) machine learning model to predict the daily milk production of 3,369 lactating dairy cows under different climatic conditions across 10 different commercial dairy farms in Australia. The duration of the dataset covered early 2019 to mid-2023, with seasonal variations. The model considered a total of 8 input parameters combining the physiological properties of cows as well as temporal and climate variables. In this study, the temperature–humidity index (THI) was incorporated, using a novel approach in which THI mean values of 5 accumulating days were considered. The model considered a mean daily THI ≥55 as a threshold point to identify a potential heat stress day (THI ≥60) and then combined the THI mean of 2 d before and 2 d after to incorporate the before- and after-effects of a potential heat stress day, defined as THI composite. The model was evaluated using combined farm data, regional farm data, and leave-one-farm-out validations, achieving high predictive accuracy (R2 up to 0.73; Lin's concordance correlation coefficient up to 0.84). The THI composite metric improved prediction accuracy by up to 21% compared with conventional rolling THI averages, demonstrating its value in forecasting milk yield under heat stress conditions. The model from this study offers a foundation for strategic planning using projected climate data to mitigate future heat-related impacts on dairy productivity.