Farm-Specific Effects in Predicting Mastitis by Applying Machine Learning Models to Automated Milking System and Other Farm Management Data
Muhammad N. Dharejo, Olivier Kashongwe, Thomas Amon, Tina Kabelitz, Marcus G. Doherr

TL;DR
This study shows that predicting mastitis in dairy cows using machine learning works best when models are customized for each farm due to unique farm conditions.
Contribution
The study demonstrates that farm-specific machine learning models outperform general models in predicting mastitis.
Findings
Machine learning models achieved 83–92% accuracy in predicting mastitis across four German farms.
Farm-specific models reached up to 98% AUC, but generalization to new farms was poor.
Farm-specific factors like herd size and management practices strongly influence prediction accuracy.
Abstract
Mastitis is a common disease in dairy cows that can cause major losses for farmers. Predicting it early can help prevent problems. This study used computer programs called ‘machine learning models’ to see how well they could predict mastitis in cows using data from automatic milking robots and farm records, with a focus on differences between farms. We looked at information from four farms in Germany, covering nearly 6 million records from 2019 to 2024. The machine learning models were pretty accurate overall—in many cases, they predicted mastitis correctly around 83–92% of the time. But the accuracy changed depending on which farm the data came from. Each farm had its own unique setup, like different herd sizes and management styles. When the models were tested on combined data from all farms and on the data of each individual farm, they worked well—but when trying to predict mastitis…
Genes, proteins, chemicals, diseases, species, mutations and cell lines named across the full text — each resolved to its canonical identifier and authoritative record.
Click any figure to enlarge with its caption.
Figure 1
Figure 2Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMilk Quality and Mastitis in Dairy Cows · Genetic and phenotypic traits in livestock · Food Supply Chain Traceability
