Skip to main content

Research Repository

Advanced Search

Automated prediction of mastitis infection patterns in dairy herds using machine learning

Hyde, Robert M.; Down, Peter M.; Bradley, Andrew J.; Breen, James E.; Hudson, Chris; Leach, Katharine A.; Green, Martin J.


Robert M. Hyde

Peter M. Down

Professor of Dairy Herd Health and Production

Clinical Associate Professor

Katharine A. Leach

Professor of Cattle Health & Epidemiology


© 2020, The Author(s). Mastitis in dairy cattle is extremely costly both in economic and welfare terms and is one of the most significant drivers of antimicrobial usage in dairy cattle. A critical step in the prevention of mastitis is the diagnosis of the predominant route of transmission of pathogens into either contagious (CONT) or environmental (ENV), with environmental being further subdivided as transmission during either the nonlactating “dry” period (EDP) or lactating period (EL). Using data from 1000 farms, random forest algorithms were able to replicate the complex herd level diagnoses made by specialist veterinary clinicians with a high degree of accuracy. An accuracy of 98%, positive predictive value (PPV) of 86% and negative predictive value (NPV) of 99% was achieved for the diagnosis of CONT vs ENV (with CONT as a “positive” diagnosis), and an accuracy of 78%, PPV of 76% and NPV of 81% for the diagnosis of EDP vs EL (with EDP as a “positive” diagnosis). An accurate, automated mastitis diagnosis tool has great potential to aid non-specialist veterinary clinicians to make a rapid herd level diagnosis and promptly implement appropriate control measures for an extremely damaging disease in terms of animal health, productivity, welfare and antimicrobial use.


Hyde, R. M., Down, P. M., Bradley, A. J., Breen, J. E., Hudson, C., Leach, K. A., & Green, M. J. (2020). Automated prediction of mastitis infection patterns in dairy herds using machine learning. Scientific Reports, 10(1),

Journal Article Type Article
Acceptance Date Feb 18, 2020
Online Publication Date Mar 9, 2020
Publication Date Mar 9, 2020
Deposit Date Apr 7, 2020
Publicly Available Date Apr 7, 2020
Journal Scientific Reports
Print ISSN 2045-2322
Electronic ISSN 2045-2322
Publisher Nature Publishing Group
Peer Reviewed Peer Reviewed
Volume 10
Issue 1
Article Number 4289
Keywords Computational biology and bioinformatics, Diseases, Medical research
Public URL
Publisher URL
Additional Information Received: 23 September 2019; Accepted: 18 February 2020; First Online: 9 March 2020; : The authors declare no competing interests.


You might also like

Downloadable Citations