MasPA: A Machine Learning Application to Predict Risk of Mastitis in Cattle from AMS Sensor Data
Abstract
:1. Introduction
2. Materials and Methods
3. Results
3.1. Data Preprocessing
3.2. Model Fitting and Hyperparameter Optimization
3.3. Web App Usage and Local Deployment
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Shahbandeh, M. Statista. Global Dairy Industry—Statistics & Facts. 2021. Available online: https://0-www-statista-com.brum.beds.ac.uk/topics/4649/dairy-industry/ (accessed on 14 June 2021).
- Gill, R.; Howard, W.H.; Leslie, K.E.; Lissemore, K. Economics of Mastitis Control. J. Dairy Sci. 1990, 73, 3340–3348. [Google Scholar] [CrossRef]
- Miller, R.; Paape, M.; Fulton, L.; Schutz, M. The Relationship of Milk Somatic Cell Count to Milk Yields for Holstein Heifers After First Calving. J. Dairy Sci. 1993, 76, 728–733. [Google Scholar] [CrossRef]
- Shim, E.; Shanks, R.; Morin, D. Milk Loss and Treatment Costs Associated with Two Treatment Protocols for Clinical Mastitis in Dairy Cows. J. Dairy Sci. 2004, 87, 2702–2708. [Google Scholar] [CrossRef]
- Hortet, P.; Seegers, H. Loss in milk yield and related composition changes resulting from clinical mastitis in dairy cows. Prev. Vet. Med. 1998, 37, 1–20. [Google Scholar] [CrossRef]
- Rollin, E.; Dhuyvetter, K.C.; Overton, M.W. The cost of clinical mastitis in the first 30 days of lactation: An economic modeling tool. Prev. Vet. Med. 2015, 122, 257–264. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Dadgostar, P. Antimicrobial Resistance: Implications and Costs. Infect. Drug Resist. 2019, 12, 3903–3910. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Rana, S.; Lee, S.Y.; Kang, H.J.; Hur, S.J. Reducing Veterinary Drug Residues in Animal Products: A Review. Food Sci. Anim. Resour. 2019, 39, 687–703. [Google Scholar] [CrossRef]
- Jayalakshmi, K.; Paramasivam, M.; Sasikala, M.; Tamilam, T.; Sumithra, A. Review on antibiotic residues in animal products and its impact on environments and human health. J. Entomol. Zool. Stud. 2017, 5, 1446–1451. [Google Scholar]
- Bianchi, R.M.; Schwertz, C.I.; De Cecco, B.S.; Panziera, W.; De Lorenzo, C.; Heck, L.C.; Snel, G.G.M.; Lopes, B.C.; Da Silva, F.S.; Pavarini, S.P.; et al. Pathological and microbiological characterization of mastitis in dairy cows. Trop. Anim. Health Prod. 2019, 51, 2057–2066. [Google Scholar] [CrossRef]
- Benites, N.R.; Guerra, J.L.; Melville, P.A.; Costa, E.O. Aetiology and Histopathology of Bovine Mastitis of Espontaneous Occurrence. J. Veter. Med. Ser. B 2002, 49, 366–370. [Google Scholar] [CrossRef]
- Pyörälä, S. New Strategies to Prevent Mastitis. Reprod. Domest. Anim. 2002, 37, 211–216. [Google Scholar] [CrossRef]
- Koba, I.S.; Lysenko, A.A.; Koshchaev, A.G.; Shantyz, A.K.; Donnik, I.M.; Dorozhkin, V.I.; Shabunin, S.V. Prevention of Mastitis in Dairy Cows on Industrial Farms. J. Pharm. Sci. Res. 2018, 10, 2582–2585. Available online: https://www.jpsr.pharmainfo.in/Documents/Volumes/vol10Issue10/jpsr10101840.pdf (accessed on 14 July 2021).
- Van Soest, F.; Santman-Berends, I.M.; Lam, T.J.; Hogeveen, H. Failure and preventive costs of mastitis on Dutch dairy farms. J. Dairy Sci. 2016, 99, 8365–8374. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Hogeveen, H.; Kamphuis, C.; Steeneveld, W.; Mollenhorst, H. Sensors and Clinical Mastitis—The Quest for the Perfect Alert. Sensors 2010, 10, 7991. [Google Scholar] [CrossRef] [Green Version]
- Hovinen, M.; Siivonen, J.; Taponen, S.; Hänninen, L.; Pastell, M.; Aisla, A.-M.; Pyörälä, S. Detection of Clinical Mastitis with the Help of a Thermal Camera. J. Dairy Sci. 2008, 91, 4592–4598. [Google Scholar] [CrossRef] [PubMed]
- Chagunda, M.G.; Larsen, T.; Bjerring, M.; Ingvartsen, K.L. L-lactate dehydrogenase and N-acetyl-β-D-glucosaminidase activities in bovine milk as indicators of non-specific mastitis. J. Dairy Res. 2006, 73, 431–440. [Google Scholar] [CrossRef]
- Martins, S.; Martins, V.C.; Cardoso, F.A.; Germano, J.; Rodrigues, M.; Duarte, C.; Bexiga, R.; Cardoso, S.; Freitas, P.P. Biosensors for On-Farm Diagnosis of Mastitis. Front. Bioeng. Biotechnol. 2019, 7, 186. [Google Scholar] [CrossRef]
- Ankitha, K.; Manjaiah, D.H. Comparison of KNN and SVM Algorithms to Detect Clinical Mastitis in Cows Using Internet of Animal Health Things. Adv. Intell. Syst. Comput. 2020, 51–60. [Google Scholar] [CrossRef]
- Vijayakumar, M.; Park, J.H.; Ki, K.S.; Lim, D.H.; Kim, S.B.; Park, S.M.; Jeong, H.Y.; Park, B.Y.; Kim, T.I. The effect of lactation number, stage, length, and milking frequency on milk yield in Korean Holstein dairy cows using automatic milking system. Asian Australas. J. Anim. Sci. 2017, 30, 1093–1098. [Google Scholar] [CrossRef]
- Steeneveld, W.; Tauer, L.; Hogeveen, H.; Lansink, A.O. Comparing technical efficiency of farms with an automatic milking system and a conventional milking system. J. Dairy Sci. 2012, 95, 7391–7398. [Google Scholar] [CrossRef] [PubMed]
- Castro, A.; Pereira, J.M.; Amiama, C.; Bueno, J. Estimating efficiency in automatic milking systems. J. Dairy Sci. 2012, 95, 929–936. [Google Scholar] [CrossRef]
- Gay, W. SD Card Storage. In Raspberry Pi Hardware Reference; Apress: Berkeley, CA, USA, 2014; pp. 81–88. [Google Scholar]
- Ankitha, K.; Manjaiah, M.; Kartik, M. Data for: Clinical mastitis in cows based on udder parameter using Internet of Things (IoT). Mendeley Data 2020, V2. [Google Scholar] [CrossRef]
- Virtanen, P.; Gommers, R.; Oliphant, T.E.; Haberland, M.; Reddy, T.; Cournapeau, D.; Burovski, E.; Peterson, P.; Weckesser, W.; Bright, J.; et al. SciPy 1.0: Fundamental algorithms for scientific computing in Python. Nat. Methods 2020, 17, 261–272. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- 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]
- Mansour, R.F.; El Amraoui, A.; Nouaouri, I.; Diaz, V.G.; Gupta, D.; Kumar, S. Artificial Intelligence and Internet of Things Enabled Disease Diagnosis Model for Smart Healthcare Systems. IEEE Access 2021, 9, 45137–45146. [Google Scholar] [CrossRef]
- Prabhakar, B.; Singh, R.K.; Yadav, K.S. Artificial intelligence (AI) impacting diagnosis of glaucoma and understanding the regulatory aspects of AI-based software as medical device. Comput. Med. Imaging Graph. 2021, 87, 101818. [Google Scholar] [CrossRef]
- Sujatha, R.; Chatterjee, J.M.; Jhanjhi, N.; Brohi, S.N. Performance of deep learning vs machine learning in plant leaf disease detection. Microprocess. Microsyst. 2021, 80, 103615. [Google Scholar] [CrossRef]
- McKinney, S.M.; Sieniek, M.; Godbole, V.; Godwin, J.; Antropova, N.; Ashrafian, H.; Back, T.; Chesus, M.; Corrado, G.S.; Darzi, A.; et al. International evaluation of an AI system for breast cancer screening. Nat. Cell Biol. 2020, 577, 89–94. [Google Scholar] [CrossRef]
- Ebrahimi, M.; Mohammadi-Dehcheshmeh, M.; Ebrahimie, E.; Petrovski, K.R. Comprehensive analysis of machine learning models for prediction of sub-clinical mastitis: Deep Learning and Gradient-Boosted Trees outperform other models. Comput. Biol. Med. 2019, 114, 103456. [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]
Model Name M | Accuracy (%) L | Time Taken (s) |
---|---|---|
RandomForestClassifier | 99.12 | 0.60 |
XGBClassifier | 98.68 | 0.38 |
LGBMClassifier | 98.61 | 0.17 |
BaggingClassifier | 98.55 | 0.17 |
DecisionTreeClassifier | 97.85 | 0.07 |
ExtraTreeClassifier | 96.97 | 0.04 |
KNeighborsClassifier | 93.56 | 0.13 |
AdaBoostClassifier | 93.19 | 0.50 |
LabelPropagation | 91.74 | 1.82 |
LabelSpreading | 91.48 | 2.65 |
SupportVectorClassifier | 87.89 | 0.61 |
QuadraticDiscriminantAnalysis | 87.63 | 0.05 |
NuSupportVectorClassifier | 87.44 | 1.55 |
SGDClassifier | 87.13 | 0.09 |
RidgeClassifier | 86.69 | 0.05 |
LinearDiscriminantAnalysis | 86.62 | 0.07 |
RidgeClassifierCV | 86.62 | 0.10 |
CalibratedClassifierCV | 86.50 | 1.25 |
LinearSVC | 86.44 | 0.32 |
LogisticRegression | 86.06 | 0.11 |
Perceptron | 83.41 | 0.05 |
PassiveAggressiveClassifier | 71.67 | 0.05 |
GaussianNB | 69.34 | 0.04 |
BernoulliNB | 67.89 | 0.04 |
NearestCentroid | 62.08 | 0.05 |
DummyClassifier | 49.21 | 0.03 |
Model name | Parameters |
---|---|
Random Forest Classifier | bootstrap=True, ccp_alpha=0.0, class_weight=None, criterion='entropy', max_depth=None, max_features='auto', max_leaf_nodes=None, max_samples=None, min_impurity_decrease=0.0, min_impurity_split=None, min_samples_leaf=1, min_samples_split=2, min_weight_fraction_leaf=0.0, n_estimators=100, n_jobs=None, oob_score=False, random_state=1000, verbose=0, warm_start=False |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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
Abdul Ghafoor, N.; Sitkowska, B. MasPA: A Machine Learning Application to Predict Risk of Mastitis in Cattle from AMS Sensor Data. AgriEngineering 2021, 3, 575-583. https://0-doi-org.brum.beds.ac.uk/10.3390/agriengineering3030037
Abdul Ghafoor N, Sitkowska B. MasPA: A Machine Learning Application to Predict Risk of Mastitis in Cattle from AMS Sensor Data. AgriEngineering. 2021; 3(3):575-583. https://0-doi-org.brum.beds.ac.uk/10.3390/agriengineering3030037
Chicago/Turabian StyleAbdul Ghafoor, Naeem, and Beata Sitkowska. 2021. "MasPA: A Machine Learning Application to Predict Risk of Mastitis in Cattle from AMS Sensor Data" AgriEngineering 3, no. 3: 575-583. https://0-doi-org.brum.beds.ac.uk/10.3390/agriengineering3030037