Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2020 Mar 9;10(1):4289.
doi: 10.1038/s41598-020-61126-8.

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

Affiliations

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

Robert M Hyde et al. Sci Rep. .

Abstract

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.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing interests.

Figures

Figure 1
Figure 1
Variable importance plot showing the top 20 features for the classification of environmental dry period (EDP) vs environmental lactation period (EL) diagnosis. “Heifers” are animals in their first lactation, and “cows” are animals after their first lactation. “Quarter” denotes which 3-month period is being analysed; “Quarter 0” denotes the most recent 3-month period, and “Quarter -1” denotes the 3-month period prior to that.
Figure 2
Figure 2
An illustration of the recursive feature elimination results incorporating 2 to 274 features (Random forest model to predict the herd mastitis diagnosis of environmental dry period or environmental lactation period). The number of features (variables) included within the model is depicted on the x-axis and the accuracy of the model from 10-fold cross validation on the truncated y-axis.
Figure 3
Figure 3
Receiver operator characteristic (ROC) curve of mastitis diagnosis of environmental lactation period origin (EL) as opposed to environmental dry period (EDP).
Figure 4
Figure 4
Calibration plot illustrating the predicted probability (and 95% confidence interval) of a mastitis diagnosis of environmental dry period origin (EDP), as opposed to environmental lactation period (EL), in comparison with the observed probability of the diagnosis.

References

    1. FAWC. Opinion on the Welfare of the Dairy Cow. (2009).
    1. Kossaibati MA, Esslemont RJ. The costs of production diseases in dairy herds in England. Vet. J. 1997;154:41–51. doi: 10.1016/S1090-0233(05)80007-3. - DOI - PubMed
    1. Leslie KE, Petersson-Wolfe CS. Assessment and Management of Pain in Dairy Cows with Clinical Mastitis. Vet. Clin. North Am. Food Anim. Pract. 2012;28:289–305. doi: 10.1016/j.cvfa.2012.04.002. - DOI - PubMed
    1. Hyde RM, et al. Quantitative analysis of antimicrobial use on British dairy farms. Vet. Rec. 2017;181:683. doi: 10.1136/vr.104614. - DOI - PubMed
    1. Todhunter DA, Smith KL, Hogan JS. Environmental Streptococcal Intramammary Infections of the Bovine Mammary Gland. J. Dairy Sci. 1995;78:2366–2374. doi: 10.3168/jds.S0022-0302(95)76864-3. - DOI - PubMed