Machine learning algorithms for clinical mastitis prediction in a dairy herd use automated milking system data

Authors

  • Dina N. Faris Department of Animal Wealth Development (Biostatistics), Faculty of Veterinary Medicine, Benha University, Moshtohor, Toukh, 13736, Qalyubia, Egypt.
  • Ahmed M. Gad Statistics Department, Faculty of Economics and Political Science, Cairo University, Giza, Egypt.
  • Mahmoud S. El-Tarabany Animal Wealth Development Department, Faculty of Veterinary Medicine, Zagazig University, El-Zeraa str. 114, Sharkia, Zagazig 44511, Egypt.
  • Sherif I. Ramadan Animal and poultry production, Department of Animal Wealth Development, Faculty of Veterinary Medicine, Benha University, Moshtohor, Toukh, 13736, Qalyubia, Egypt.
  • Ghada G. Afifi Genetic Engineering and Biotechnology Research Institute, University of Sadat City, El-Monofya, Egypt.
  • Eman A. Manaa Animal and poultry production, Department of Animal Wealth Development, Faculty of Veterinary Medicine, Benha University, Moshtohor, Toukh, 13736, Qalyubia, Egypt.

Keywords:

Automatic milking system, Clinical Mastitis, Decision tree, Machine learning

Abstract

Bovine clinical Mastitis (CM) is the most important disease in the dairy industry affecting both animal welfare and farm profitability. Therefore, early and accurate detection of the disease is a valuable timely intervention. In this article, six different machine learning classification algorithms were compared to obtain a prediction model for early detection of the disease. These algorithms are Support Vector Machine, Logistic Regression, Gaussian Naïve Bayes, K-Nearest Neighbor, Classification and Regression Decision Tree, and Random Forest. The algorithms are applied to the milk production of Holstein Friesian cows milked by an automated milking system using the dairy records and disease events. This includes 1493 cows with clinical Mastitis and 2387 healthy cows. The six models were evaluated based on five performance metrics criteria: accuracy, precision, recall, F1-score, and area under the curve (AUC). The accuracy rate ranged from 62% to 74%. The AUC is used to choose the best model. The Decision Tree algorithm and Gaussian Naïve Bayes scored the highest AUC of 71%. However, the Decision Tree algorithm is more stable with respect to other metrics (73% for accuracy and 64% for Precision, Recall, and F1-score). Hence, it can be considered the best predictive CM model with moderate accuracy. Out of the 15 input features, days in milk, age of the animal, lactation order, 305 days mature herd equivalent, and average daily milk yield were the only important features shared in establishing the Decision Tree model.

Downloads

Published

2024-07-01

How to Cite

Faris, D. ., Gad, A., El-Tarabany, M., Ramadan, S. ., Ghada , G. ., & Eman, E. . (2024). Machine learning algorithms for clinical mastitis prediction in a dairy herd use automated milking system data. Journal of Advanced Veterinary Research, 14(6), 975-981. Retrieved from https://advetresearch.com/index.php/AVR/article/view/1901

Issue

Section

Original Research