Antimicrobial resistance (AMR) represents a major threat to both human and animal health and is largely driven by excessive and inappropriate antimicrobial use (AMU) [1]. In dairy cattle, the greatest proportion of AMU is associated with the treatment of intramammary infections (IMI), with the highest risk of new infections occurring during the dry period and post calving [2, 3]. Subclinical IMI are commonly associated with elevated somatic cell count (SCC), which negatively affects milk quality, animal welfare, and productivity [3]. To support targeted management strategies aimed at reducing antimicrobial use and improving animal welfare, this study evaluated whether cows at risk of elevated post calving SCC or intramammary infection can be identified using machine learning applied to integrated lactation performance, on-farm sensor data and bacteriological analysis collected at dry off. A total of 294 dairy cows were sampled at dry off, with quarter-level milk samples collected for bacteriological analysis. Lactation data included linear score, milk yield, fat and protein production from Dairy Herd Improvement (DHI) records, number of clinical mastitis cases, duration of lactation and dry period, milk yield at dry off, parity, teat condition score, and dry off treatment. Sensor data included rumination, activity and health status from collars and milk flow and production distribution from milking parlour. Two binary outcomes were modeled: SCC ≥200,000 cells/mL at the first post-calving DHI test and infection by a major pathogen 2–8 days after calving. Four supervised learning approaches were compared: Logistic Regression, Random Forest, XGBoost, and Support Vector Machine (SVM). Data were divided into training (70%) and test (30%) sets using stratified sampling. Hyperparameters were optimized using repeated 5-fold cross-validation (2 repeats), selecting models based on balanced accuracy. Our preliminary analysis showed that balanced accuracy predicting high SCC ranged from 61% to 69%, with Random Forest performing best. For predicting post calving IMI, balanced accuracy ranged from 55% to 75%, with Logistic Regression showing the highest performance. Although predictive performance was moderate, this study indicates that the integration of sensor data with lactation and clinical records has the potential to classify cows into distinct risk groups for both post calving IMI and elevated SCC, supporting farmers and veterinarians in decision-making process and potentially reducing antimicrobial use while improving animal welfare.
Integrating lactation and dry off data to predict post calving subclinical intramammary infections in dairy cows
Barin Luca;Marchesini Giorgio;
2026
Abstract
Antimicrobial resistance (AMR) represents a major threat to both human and animal health and is largely driven by excessive and inappropriate antimicrobial use (AMU) [1]. In dairy cattle, the greatest proportion of AMU is associated with the treatment of intramammary infections (IMI), with the highest risk of new infections occurring during the dry period and post calving [2, 3]. Subclinical IMI are commonly associated with elevated somatic cell count (SCC), which negatively affects milk quality, animal welfare, and productivity [3]. To support targeted management strategies aimed at reducing antimicrobial use and improving animal welfare, this study evaluated whether cows at risk of elevated post calving SCC or intramammary infection can be identified using machine learning applied to integrated lactation performance, on-farm sensor data and bacteriological analysis collected at dry off. A total of 294 dairy cows were sampled at dry off, with quarter-level milk samples collected for bacteriological analysis. Lactation data included linear score, milk yield, fat and protein production from Dairy Herd Improvement (DHI) records, number of clinical mastitis cases, duration of lactation and dry period, milk yield at dry off, parity, teat condition score, and dry off treatment. Sensor data included rumination, activity and health status from collars and milk flow and production distribution from milking parlour. Two binary outcomes were modeled: SCC ≥200,000 cells/mL at the first post-calving DHI test and infection by a major pathogen 2–8 days after calving. Four supervised learning approaches were compared: Logistic Regression, Random Forest, XGBoost, and Support Vector Machine (SVM). Data were divided into training (70%) and test (30%) sets using stratified sampling. Hyperparameters were optimized using repeated 5-fold cross-validation (2 repeats), selecting models based on balanced accuracy. Our preliminary analysis showed that balanced accuracy predicting high SCC ranged from 61% to 69%, with Random Forest performing best. For predicting post calving IMI, balanced accuracy ranged from 55% to 75%, with Logistic Regression showing the highest performance. Although predictive performance was moderate, this study indicates that the integration of sensor data with lactation and clinical records has the potential to classify cows into distinct risk groups for both post calving IMI and elevated SCC, supporting farmers and veterinarians in decision-making process and potentially reducing antimicrobial use while improving animal welfare.Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.




