The Use of Machine Learning to Predict Prevalence of Subclinical Mastitis in Dairy Sheep Farms
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. Field Data and Dataset Used for the Construction of the Computational Model
2.2. Implementation of Machine Learning Algorithms
2.3. Evaluation for Construction of Computational Model by Means of Supervised Learning
2.4. Evaluation for Construction of Computational Model by Means of Unsupervised Learning
2.5. Selection and Application of Computational Model
2.5.1. Procedures
2.5.2. Data Management
2.6. Assessment (Verification) and Evaluation of Results of Computational Model
2.6.1. Field Data and Datasets Used for the Construction of the Assessment (Verification) of Computational Model
2.6.2. Procedures
2.6.3. Data Management
2.6.4. Analysis of the Importance of the 17 Independent Variables in Predicting the Prevalence of Subclinical Mastitis—Interpretation of Findings
3. Results
3.1. Selection of Best Computational Model
3.2. Assessment (Verification) of the Previously Selected Computational Model
4. Discussion
4.1. Preamble
4.2. Development of the Model
4.3. Assessment (Verification) of the Model
4.4. Overall View of the Procedure for Model Development and Assessment (Verification)
4.5. Potential Constraints of the Proposed Model
- Data quality issues, for example, missing data (i.e., incomplete records, which can skew the model’s understanding and performance), outlying values (i.e., extreme values, which may influence a model disproportionately), or biased data (especially in models sensitive to anomalies). In our case, the use of a structured questionnaire for the collection of detailed information from farmers [20], the high number of farms considered for the construction and the assessment (verification) of the model, and the countrywide location of the farms have minimized such issues. In particular, findings from farms in all regions of Greece were taken into account during all stages of this study; this way, conditions prevailing throughout the country were taken into account, and factors of regional importance weighed less.
- Model overfitting (when a model ‘learns’ the training data too well and cannot discriminate ‘noise’ values and outliers, its performance on new data is harmed) or underfitting (when the principles for the development of a model are too simplistic to capture the underlying patterns within the data, leading to poor performance even on the training data). In our case, the use of variables with confirmed scientific significance for the development of mastitis has reduced those risks. In this context, many health-related factors have thus been assessed and included in the model that was finally developed.
- Model selection issues, for example, inappropriate model choice (i.e., use of a model unsuitable for the type of data available or the specific problem under investigation) or hyperparameter tuning (i.e., use of suboptimal hyperparameter settings) can lead to poor performance of a model. In our case, the use of supervised and unsupervised learning methodologies and the evaluation of a variety of tools and methodologies have lowered the relevant risks.
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Giadinis, N.D.; Arsenos, G.; Tsakos, P.; Psychas, V.; Dovas, C.I.; Papadopoulos, E.; Karatzias, H.; Fthenakis, G.C. ‘Milk-drop syndrome of ewes’: Investigation of the causes in dairy sheep in Greece. Small Rumin. Res. 2012, 106, 33–35. [Google Scholar] [CrossRef]
- European Food Safety Authority. Scientific opinion on the welfare risks related to the farming of sheep for wool, meat and milk production. EFSA J. 2014, 12, 3933–4060. [Google Scholar]
- Zufferey, R.; Minnig, A.; Thomann, B.; Zwygart, S.; Keil, N.; Schüpbach, G.; Miserez, R.; Zanolari, P.; Stucki, D. Animal-based indicators for on-farm welfare assessment in sheep. Animals 2021, 11, 2973. [Google Scholar] [CrossRef] [PubMed]
- Russell, S.J.; Norvig, P. Artificial Intelligence a Modern Approach, 3rd ed.; Prentice Hall: Upper Saddle River, NJ, USA, 2010; p. 1132. [Google Scholar]
- Arrieta, A.B.; Díaz-Rodríguez, N.; Del Ser, J.; Bennetot, A.; Tabik, S.; Barbado, A.; Garcia, S.; Gil-Lopez, S.; Molina, D.; Benjamins, R.; et al. Explainable artificial intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Inf. Fusion 2020, 58, 82–115. [Google Scholar] [CrossRef]
- Sarker, I.H. AI-based modeling: Techniques, applications and research issues towards automation, intelligent and smart systems. SN Comp. Sci. 2022, 3, 158. [Google Scholar] [CrossRef] [PubMed]
- Ahsan, M.M.; Luna, S.A.; Siddique, Z. Machine-learning-based disease diagnosis: A comprehensive review. Healthcare 2022, 10, 541. [Google Scholar] [CrossRef]
- Ahsan, M.M.; Siddique, Z. Machine learning-based heart disease diagnosis: A systematic literature review. Artif. Intellig. Med. 2022, 128, 102289. [Google Scholar] [CrossRef] [PubMed]
- Bourganou, M.V.; Kiouvrekis, Y.; Chatzopoulos, D.C.; Zikas, S.; Katsafadou, A.I.; Liagka, D.V.; Vasileiou, N.G.C.; Fthenakis, G.C.; Lianou, D.T. Assessment of published papers on the use of machine learning in diagnosis and treatment of mastitis. Information 2024, 15, 428. [Google Scholar] [CrossRef]
- Fadul-Pacheco, L.; Delgado, H.; Cabrera, V.E. Exploring machine learning algorithms for early prediction of clinical mastitis. Int. Dairy J. 2021, 119, 105051. [Google Scholar] [CrossRef]
- Maciel-Guerra, A.; Esener, N.; Giebel, K.; Lea, D.; Green, M.J.; Bradley, A.J.; Dottorini, T. Prediction of Streptococcus uberis clinical mastitis treatment success in dairy herds by means of mass spectrometry and machine-learning. Sci. Rep. 2021, 11, 7736. [Google Scholar] [CrossRef]
- Ebrahimie, E.; Ebrahimi, F.; Ebrahimi, M.; Tomlinson, S.; Petrovski, K.R. Hierarchical pattern recognition in milking parameters predicts mastitis prevalence. Comp. Electron. Agric. 2018, 147, 6–11. [Google Scholar] [CrossRef]
- Pakrashi, A.; Ryan, C.; Gueret, C.; Berry, D.P.; Corcoran, M.; Keane, M.T.; Mac Namee, B. Early detection of subclinical mastitis in lactating dairy cows using cow-level features. J. Dairy Sci. 2023, 106, 4978–4990. [Google Scholar] [CrossRef] [PubMed]
- Parker Gaddis, K.L.; Cole, J.B.; Clay, J.S.; Maltecca, C. Benchmarking dairy herd health status using routinely recorded herd summary data. J. Dairy Sci. 2016, 99, 1298–1314. [Google Scholar] [CrossRef] [PubMed]
- Post, C.; Rietz, C.; Büscher, W.; Müller, U. Using sensor data to detect lameness and mastitis treatment events in dairy cows: A comparison of classification models. Sensors 2020, 14, 3863. [Google Scholar] [CrossRef] [PubMed]
- Esener, N.; Maciel-Guerra, A.; Giebel, K.; Lea, D.; Green, M.J.; Bradley, A.J.; Dottorini, T. Mass spectrometry and machine learning for the accurate diagnosis of benzylpenicillin and multidrug resistance of Staphylococcus aureus in bovine mastitis. PLoS Comput. Biol. 2021, 17, e1009108. [Google Scholar] [CrossRef] [PubMed]
- Vasileiou, N.G.C.; Cripps, P.J.; Ioannidi, K.S.; Chatzopoulos, D.C.; Gougoulis, D.A.; Sarrou, S.; Orfanou, D.C.; Politis, A.P.; Calvo Gonzalez-Valerio, T.; Argyros, S.; et al. Extensive countrywide field investigation of subclinical mastitis in sheep in Greece. J. Dairy Sci. 2018, 101, 7297–7310. [Google Scholar] [CrossRef] [PubMed]
- Fragkou, I.A.; Boscos, C.M.; Fthenakis, G.C. Diagnosis of clinical or subclinical mastitis in ewes. Small Rumin. Res. 2014, 118, 86–92. [Google Scholar] [CrossRef]
- Kaskous, S.; Farschtschi, S.; Pfaffl, M.W. Physiological aspects of milk somatic cell count in small ruminants—A review. Dairy 2023, 4, 26–42. [Google Scholar] [CrossRef]
- Lianou, D.T.; Chatziprodromidou, I.P.; Vasileiou, N.G.C.; Michael, C.K.; Mavrogianni, V.S.; Politis, A.P.; Kordalis, N.G.; Billinis, C.; Giannakopoulos, A.; Papadopoulos, E.; et al. A detailed questionnaire for the evaluation of health management in dairy sheep and goats. Animals 2020, 10, 1489. [Google Scholar] [CrossRef]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- McCulloch, W.S.; Pitts, W.H. A logical calculus of the ideas immanent in nervous activity. Bull. Mathem. Biophys. 1943, 5, 115–133. [Google Scholar] [CrossRef]
- Berner, J.; Grohs, P.; Kutyniok, G.; Petersen, P. The modern mathematics of deep learning. In Mathematical Aspects of Deep Learning; Grohs, P., Kutyniok, G., Eds.; Cambridge University Press: Cambridge, UK, 2022; pp. 1–111. [Google Scholar]
- Michael, C.K.; Lianou, D.T.; Vasileiou, N.G.C.; Mavrogianni, V.S.; Petinaki, E.; Fthenakis, G.C. Longitudinal study of subclinical mastitis in sheep in Greece: An investigation into incidence risk, associations with milk quality and risk factors of the infection. Animals 2023, 13, 3295. [Google Scholar] [CrossRef] [PubMed]
- Lianou, D.T.; Michael, C.K.; Vasileiou, N.G.C.; Petinaki, E.; Cripps, P.J.; Tsilipounidaki, K.; Katsafadou, A.I.; Politis, A.P.; Kordalis, N.G.; Ioannidi, K.S.; et al. Extensive countrywide field investigation of somatic cell counts and total bacterial counts in bulk-tank raw milk in sheep flocks in Greece. Foods 2021, 10, 268. [Google Scholar] [CrossRef] [PubMed]
- Fthenakis, G.C. Correspondence of somatic cell counts in bulk-tank milk to prevalence of subclinical mastitis in sheep flocks. Animals 2023, 13, 3541. [Google Scholar] [CrossRef] [PubMed]
- Lundberg, S.M.; Lee, S.I. A unified approach to interpreting model predictions. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS’17), Long Beach, CA, USA, 4–9 December 2017; pp. 4768–4777. [Google Scholar]
- Ebrahimie, E.; Ebrahimi, F.; Ebrahimi, M.; Tomlinson, S.; Petrovski, K.R. A large-scale study of indicators of sub-clinical mastitis in dairy cattle by attribute weighting analysis of milk composition features: Highlighting the predictive power of lactose and electrical conductivity. J. Dairy Sci. 2018, 85, 193–200. [Google Scholar] [CrossRef] [PubMed]
- Lianou, D.T.; Michael, C.K.; Fthenakis, G.C. Data on mapping 444 dairy small ruminant farms during a countrywide investigation performed in Greece. Animals 2023, 13, 2044. [Google Scholar] [CrossRef] [PubMed]
- Gelasakis, A.I.; Mavrogianni, V.S.; Petridis, I.G.; Vasileiou, N.G.C.; Fthenakis, G.C. Mastitis in sheep—The last 10 years and the future of research. Vet. Microbiol. 2015, 185, 136–146. [Google Scholar] [CrossRef] [PubMed]
- Jones, J.E.T.; Watkins, G.H. Mastitis and contagious agalactia. In Diseases of Sheep, 3rd ed.; Martin, W.B., Aitken, I.D., Eds.; Blackwell Science: Oxford, UK, 2000; pp. 75–80. [Google Scholar]
- Arteche-Villasol, N.; Fernández, M.; Gutiérrez-Expósito, D.; Pérez, V. Pathology of the mammary gland in sheep and goats. J. Comp. Pathol. 2022, 193, 37–49. [Google Scholar] [CrossRef] [PubMed]
- Conington, J.; Cao, G.; Stott, A.; Bünger, L. Breeding for resistance to mastitis in United Kingdom sheep, a review and economic appraisal. Vet. Rec. 2008, 162, 369–376. [Google Scholar] [CrossRef]
- Oget, C.; Tosser-Klopp, G.; Rupp, R. Genetic and genomic studies in ovine mastitis. Small Rumin. Res. 2019, 176, 55–64. [Google Scholar] [CrossRef]
- Tassi, R.; Schiavo, M.; Filipe, J.; Todd, H.; Ewing, D.; Ballingal, K.T. Intramammary immunisation provides short term protection against Mannheimia haemolytica mastitis in sheep. Front. Vet. Sci. 2021, 8, 659803. [Google Scholar] [CrossRef] [PubMed]
- Vasileiou, N.G.C.; Lianou, D.T.; Michael, C.K.; Fthenakis, G.C.; Mavrogianni, V.S. Vaccination against bacterial mastitis in sheep. Vaccines 2022, 10, 2088. [Google Scholar] [CrossRef]
- Ruegg, P.L. Mastitis in small ruminants. Am. Assoc. Bov. Pr. Conf. Proc. 2011, 44, 111–119. [Google Scholar] [CrossRef]
- Petridis, I.G.; Fthenakis, G.C. Administration of antibiotics to ewes at the beginning of the dry-period. J. Dairy Res. 2014, 81, 9–15. [Google Scholar] [CrossRef] [PubMed]
- Petridis, I.G.; Fthenakis, G.C. Mammary involution and relevant udder health management in sheep. Small Rumin. Res. 2019, 181, 66–75. [Google Scholar] [CrossRef]
- Fthenakis, G.C. Prevalence and aetiology of subclinical mastitis in ewes of southern Greece. Small Rumin. Res. 1994, 13, 293–300. [Google Scholar] [CrossRef]
- Bergonier, D.; de Cremoux, R.; Rupp, R.; Lagriffoul, G.; Berthelot, X. Mastitis of dairy small ruminants. Vet. Res. 2003, 34, 689–716. [Google Scholar] [CrossRef]
- Leyshon, W.J. An examination of a number of cases of ovine mastitis. Vet. J. 1929, 85, 286–300, 331–344. [Google Scholar]
- Arcaro, J.R.P.; Matarazzo, S.V.; Pozzi, C.R.; Arcaro, J.I.; de Toledo, L.; Costa, E.O.; de Miranda, M.S. Effects of environmental modification on mastitis occurrence and hormonal changes in Holstein cows. Pesq. Vet. Brasil. 2013, 33, 826–830. [Google Scholar] [CrossRef]
- El-Tarabany, M.S.; El-Tarabany, A.A.; Atta, M.A. Physiological and lactation responses of Egyptian dairy Baladi goats to natural thermal stress under subtropical environmental conditions. Int. J. Biometeorol. 2017, 61, 61–68. [Google Scholar] [CrossRef]
- Lacetera, N.; Scalia, N.; Bernabucci, U.; Ronchi, B.; Pirazzi, D.; Nardone, A. Lymphocyte functions in overconditioned cows around parturition. J. Dairy Sci. 2005, 88, 2010–2016. [Google Scholar] [CrossRef] [PubMed]
- Lecchi, C.; Rota, N.; Vitali, A.; Ceciliani, F.; Lacetera, N. In vitro assessment of the effects of temperature on phagocytosis, reactive oxygen species production and apoptosis in bovine polymorphonuclear cells. Vet. Immunol. Immunopathol. 2016, 182, 89–94. [Google Scholar] [CrossRef] [PubMed]
- Vasileiou, N.G.C.; Giannakopoulos, A.; Cripps, P.J.; Ioannidi, K.S.; Chatzopoulos, D.C.; Gougoulis, D.A.; Billinis, C.; Mavrogianni, V.S.; Petinaki, E.; Fthenakis, G.C. Study of potential environmental factors predisposing ewes to subclinical mastitis in Greece. Comp. Immunol. Microbiol. Inf. Dis. 2019, 62, 40–45. [Google Scholar] [CrossRef] [PubMed]
- Bergonier, D.; Berthelot, X. New advances in epizootiology and control of ewe mastitis. Liv. Prod. Sci. 2003, 79, 1–16. [Google Scholar] [CrossRef]
- Kuhn, M.; Johnson, K. Applied Predictive Modeling; Springer: New York, NY, USA, 2013; p. 598. [Google Scholar]
- Ranganathan, S.; Gribskov, M.; Nakai, K.; Schönbach, C. Encyclopedia of Bioinformatics and Computational Biology; Elsevier: Amsterdam, The Netherlands, 2019; Volume 3, p. 3280. [Google Scholar]
- Sullivan, R. Introduction to Data Mining for the Life Sciences; Springer: New York, NY, USA, 2012; p. 635. [Google Scholar]
1. Target Value |
Level of prevalence of subclinical mastitis in farm (%) (binary) |
2. Independent Variables |
Number of ewes available in the flock (numeric) |
Management system applied in the farm (categorical) |
Breed of ewes (categorical) |
Month of lactation period (numeric) |
Application of reproductive control (categorical) |
Vaccination against staphylococcal mastitis (categorical) |
Milking status of the ewes in the farm (categorical) |
Application of teat dipping (categorical) |
Application of measures for mastitis control at the end of the lactation period (categorical) |
Administration of antibiotics at the end of the lactation period (categorical) |
Minimum temperature of coldest month at farm location (numeric) |
Annual precipitation at farm location (numeric) |
Wind speed at farm location (numeric) |
Altitude of farm location (numeric) |
Distance of farm from other sheep farms (numeric) |
Land use at farm location (categorical) |
Microhabitat at farm location (categorical) |
Supervised Learning Tool | Hyperparameters | No. of Different Models Produced |
---|---|---|
Decision trees | maximum depth, minimum number of split samples | 1 |
k-NN | distance metric, K, weight function | 10 |
Neural networks | activation function, hidden layers, learning rate, solver | 60 |
Support vector machines | kernel, regularization parameter | 12 |
Supervised Learning Tool | Details of Models Employed | Measures of Quality of Models Employed | ||
---|---|---|---|---|
Accuracy 1 | Precision | Recall | ||
Decision trees |
| 0.878 ± 0.015 0.909 (0.159) 0.909 | 0.927 ± 0.017 1.000 (0.143) 1.000 | 0.874 ± 0.017 0.917 (0.217) 1.000 |
k-NN |
| 0.653 ± 0.019 0.636 (0.182) 0.727 | 0.742 ± 0.024 0.777 (0.226) 1.000 | 0.703 ± 0.024 0.690 (0.175) 0.667 |
Neural networks |
| 0.844 ± 0.014 0.818 (0.159) 0.818 | 0.842 ± 0.017 0.857 (0.222) 1.000 | 0.940 ± 0.013 1.000 (0.125) 1.000 |
Support vector machines |
| 0.947 ± 0.010 1.000 (0.091) 1.000 | 0.960 ± 0.011 1.000 (0.111) 1.000 | 0.961 ± 0.010 1.000 (0.083) 1.000 |
p value | <0.0001 | <0.0001 | <0.0001 |
Categorization of Farms by Means of the Computational Model | ||||
---|---|---|---|---|
Allocation into ‘High’ Prevalence Category | Allocation into ‘Low’ Prevalence Category | Total | ||
Prevalence of subclinical mastitis in farm | ≥20.0% | 118 | 19 | 137 |
<20.0% | 1 | 235 | 236 | |
Total | 119 | 254 | 373 | |
≥25.0% | 117 | 12 | 129 | |
<25.0% | 2 | 242 | 244 | |
Total | 119 | 254 | 373 | |
≥30.0% | 80 | 0 | 80 | |
<30.0% | 39 | 254 | 293 | |
Total | 119 | 254 | 373 |
Independent Variables |
---|
Breed of ewes |
Vaccination against staphylococcal mastitis |
Management system applied in farm |
Administration of antibiotics at the end of the lactation period |
Application of measures for mastitis control at the end of the lactation period |
Application of reproductive control |
Altitude of farm location |
Wind speed at farm location |
Month of lactation period |
Annual precipitation at farm location |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kiouvrekis, Y.; Vasileiou, N.G.C.; Katsarou, E.I.; Lianou, D.T.; Michael, C.K.; Zikas, S.; Katsafadou, A.I.; Bourganou, M.V.; Liagka, D.V.; Chatzopoulos, D.C.; et al. The Use of Machine Learning to Predict Prevalence of Subclinical Mastitis in Dairy Sheep Farms. Animals 2024, 14, 2295. https://doi.org/10.3390/ani14162295
Kiouvrekis Y, Vasileiou NGC, Katsarou EI, Lianou DT, Michael CK, Zikas S, Katsafadou AI, Bourganou MV, Liagka DV, Chatzopoulos DC, et al. The Use of Machine Learning to Predict Prevalence of Subclinical Mastitis in Dairy Sheep Farms. Animals. 2024; 14(16):2295. https://doi.org/10.3390/ani14162295
Chicago/Turabian StyleKiouvrekis, Yiannis, Natalia G. C. Vasileiou, Eleni I. Katsarou, Daphne T. Lianou, Charalambia K. Michael, Sotiris Zikas, Angeliki I. Katsafadou, Maria V. Bourganou, Dimitra V. Liagka, Dimitris C. Chatzopoulos, and et al. 2024. "The Use of Machine Learning to Predict Prevalence of Subclinical Mastitis in Dairy Sheep Farms" Animals 14, no. 16: 2295. https://doi.org/10.3390/ani14162295
APA StyleKiouvrekis, Y., Vasileiou, N. G. C., Katsarou, E. I., Lianou, D. T., Michael, C. K., Zikas, S., Katsafadou, A. I., Bourganou, M. V., Liagka, D. V., Chatzopoulos, D. C., & Fthenakis, G. C. (2024). The Use of Machine Learning to Predict Prevalence of Subclinical Mastitis in Dairy Sheep Farms. Animals, 14(16), 2295. https://doi.org/10.3390/ani14162295