Detecting subclinical mastitis in dairy cattle by using machine learning techniques to analyse automated milking system data.
Mariana Massoni Fraga, Larissa Cristina Brassolatti, Maria Laura da Silva Soarde, Mateus Galli da Silva, Débora Pompilio, Alan Vitor Lima Silva, Arthur Hideio Noguti, Marcos Veiga Dos Santos,
Postgraduate Program in Veterinary Sciences, School of Agricultural and Veterinary Sciences (FCAV), São Paulo State University (UNESP), Jaboticabal, São Paulo, Brazil. · Central Paulista University Center (UNICEP), São Carlos, São Paulo, Brazil.
Key points
From the paper's conclusion- Routinely recorded automatic milking system variables showed potential to support mammary-quarter-level classification of subclinical mastitis.
Abstract
BACKGROUND: Early detection of subclinical mastitis in dairy cattle is essential to aid pattern diagnosis and the implementation of control strategies to reduce new infection rates. This observational cross-sectional study aimed to evaluate the ability of machine learning techniques to detect subclinical mastitis in dairy cattle using production and health indicators. METHODS: Six machine learning algorithms were evaluated: support vector machine, logistic regression, decision tree, random forest, XGBoost and multilayer perceptron neural network. Three response classifications were tested. Data were partitioned by cow, with 80% of cows used for development and hyperparameter tuning through 30 repeated cow-grouped holdouts and 20% of cows used for independent testing. SHAP (SHapley Additive exPlanations) analysis identified influential variables in development data. RESULTS: The random forest model, using positive microbiological culture and/or somatic cell count ≥200 × 103 cells/mL to define affected quarters, performed the best, achieving a sensitivity of 0.6322, balanced accuracy of 0.6177, F1-score of 0.5729 and ROC-AUC of 0.6774 in the independent test dataset. Electrical conductivity, milk yield and mastitis detection index showed the greatest mean absolute SHAP contributions. LIMITATIONS: Most models showed modest sensitivity, and the single-herd design limited external generalisability. CONCLUSION: Routinely recorded automatic milking system variables showed potential to support mammary-quarter-level classification of subclinical mastitis.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Comparative analysis of artificial neural networks and classical machine learning models for predicting subclinical mastitis in dairy cows, with SHAP-based interpretation of predictions.Journal of dairy science · 2026
- Supervised machine learning approaches for early detection of metabolic and udder health disorders in dairy cows using sensor-derived dataFrontiers in Veterinary Science · 2025
- Farm-level grouped multimodel analysis of dairy herd improvement variables associated with elevated somatic cell count in Holstein cows using interpretable machine learning.Journal of dairy science · 2026
- Performance of a Sensor-Based Health Monitoring System for the Detection of Clinical Mastitis in Dairy Cows.Animals : an open access journal from MDPI · 2026
- Development of a Classification Model for Intramammary Infection at Dry-Off Using Indirect Cow-Level Indicators.Animals : an open access journal from MDPI · 2026
- Evaluation of machine learning models for predicting mastitis in dairy cows using dielectric properties and other milk quality parameters.Research in veterinary science · 2026