Document Type : Research Paper

Authors

1 Department of Animal Science, Faculty of Agriculture, Abhar Branch, Islamic Azad University, Zanjan, Iran. E-mail: ali.rezazadeh@iau.ac.ir.

2 Corresponding Author, Department of Animal Science, Agricultural Research, Education and Extension Organization (AREEO), Agricultural institute of education and extension (IATE), Tehran, Iran. E-mail: arhb@abc.org.ir

3 Department of Animal Science, Faculty of Agriculture, Varamin Branch, Islamic Azad University Tehran, Iran. E-mail: pahlevanafshar.k@abhariau.ac.ir

4 Department of Animal Science, Faculty of Agriculture, Abhar Branch, Islamic Azad University. Zanjan, Iran. E-mail: m.aboozari1357@iau.ac.ir

Abstract

Objective: This study seeks to identify and systematically analyze key factors affecting the longevity of Holstein dairy cows in the herds, using advanced data mining algorithms. Understanding and predicting longevity is vital because it directly impacts productivity and profitability of dairy farm. Longer-lasting cows tend to produce more calves and produce more milk, thereby increasing the overall economic efficiency of dairy operations. Furthermore, extended longevity is associated with reduced replacement costs.
Methods: In recent years, the integration of machine learning techniques into agricultural and livestock management has gained significant momentum. This study uses detailed phenotypic data collected from 37,009 female animals belonging to 664 sires in 82 separate herds, representing a comprehensive dataset spanning a decade. The data includes eight milk production records, along with other relevant variables such as animal age, sire number, shelf life in months, somatic cell count, days in milk, milk production (kg), protein and fat content, calving cycle length, milking frequency, geographic location (province), birth date, calving date, calving interval, herd code, and age at first calving. The data preparation phase included processing and organizing the dataset using Excel 2016, which ensured data quality and consistency. Subsequent data analyses were conducted using R software (version 4.3.3), and using the relevant specialized packages for machine learning and statistical modeling.
Results: The results showed that, the Support Vector Machine has the best accuracy (0.987). Random Forest was the second most efficient algorithm. The accuracy of the Gradient Boosting Machine was slightly lower than that of the Random Forest, but it still showed good performance. The Decision Tree provided the least accuracy among these algorithms. The Decision Tree and Support Vector Machine achieved this performance with fewer input variables compared to Gradient Boosting Machine and Random Forest.
Conclusion: The results showed that none of the algorithms used for survival classification, despite acceptable accuracy, are error-free, but on the other hand, it was shown that the decision tree is simpler and less expensive. The most important features of these methods are the lack of statistical assumptions and requirements that linear regression and interpolation methods require, the lack of normality assumptions, robustness against missing values ​​ and the ability to detect complex nonlinear relationships between variables and prediction targets, which makes them suitable for various applications in the livestock industry. Accurate data recording protocols as well as precise algorithm settings are essential for accurate prediction.

Keywords

Reference
Bergstra, J., & Yoshua, B. (2012). Random search for hyper-parameter optimization. The Journal of Machine Learning Research,  13, 281-305.
Botchkarev, A. (2018). Performance metrics (error measures) in machine learning regression, forecasting and prognostics: properties and typology. Interdiscipl. J. Inf. Knowl. Manag, 14, 45-79. https://arxiv.org/abs/1809.03006.
Carvalho, T., Soares, F., Vita, R., Francisco, R., Basto, J., & G. Soares Alcalá, S. (2019). A systematic literature review of machine learning methods applied to predictive maintenance. Computers & Industrial Engineering, 137, 106024.
Ransom, C. J., Kitchen, N. R., Camberato, J. J., Carter, P. R., Ferguson, R. B., Fernández, F. G., ... & Shanahan, J. F. (2019). Statistical and machine learning methods evaluated for incorporating soil and weather into corn nitrogen recommendations. Computers and electronics in agriculture, 164, 104872. https://doi.org/10.1016/j.compag.2019.104872.
Torshizi, M. E., Mashhadi, M. H., & Farhangfar, H. (2019). Different aspects of lactation persistency in dairy cows. The Indian Journal of Animal Sciences, 89(6), 607-614.
Fadul-Pacheco, L., Delgado, H., & Cabrera, V. E. (2021). Exploring machine learning algorithms for early prediction of clinical mastitis. International Dairy Journal, 119, 105051.
Hastie, T., Tibshirani, R., Friedman, J., & Franklin, J. (2005). The elements of statistical learning: data mining, inference and prediction. The Mathematical Intelligencer, 27(2), 83-85. https://doi.org/10.1007/978-0-387-84858-7.
Horn, M., Steinwidder, A., Gasteiner, J., Podstatzky, L., Haiger, A., & Zollitsch, W. (2013). Suitability of different dairy cow types for an Alpine organic and low-input milk production system. Livestock Science, 153(1-3), 135-146.
Hu, H., Mu, T., Ma, Y., Wang, X., & Ma, Y. (2021). Analysis of longevity traits in Holstein cattle: A review. Frontiers in genetics, 12, 695543.
Imbayarwo‐Chikosi, V. E., Ducrocq, V., Banga, C. B., Halimani, T. E., Van Wyk, J. B., Maiwashe, A., & Dzama, K. (2017). Estimation of genetic parameters for functional longevity in the South African Holstein cattle using a piecewise Weibull proportional hazards model. Journal of Animal Breeding and Genetics, 134(5), 364-372.
Kuhn, M. (2019). The Caret Package. Available online:  http://topepo.github.io/caret/index.html 
Lantz, B. (2015). Machine learning with R (Vol. 452). Birmingham: Packt publishing. ISBN 978-1-78216-214-8.
Mammadova, N., & Keskin, I. (2013). Application of the support vector machine to predict subclinical mastitis in dairy cattle. The Scientific World Journal, 2013(1), 603897. http://dx.doi.org/10.1155/2013/603897.
Pietersma, D., Lacroix, R., Lefebvre, D., & Wade, K. M. (2003). Performance analysis for machine-learning experiments using small data sets. Computers and electronics in agriculture, 38(1), 1-17.
Robert, B., White, B. J., Renter, D. G., & Larson, R. L. (2009). Evaluation of three-dimensional accelerometers to monitor and classify behavior patterns in cattle. Computers and electronics in agriculture, 67(1-2), 80-84.
Rostellato, R., Lora, I., Promp, J., Cassandro, M., Ducrocq, V., & Cozzi, G. (2022). Factors affecting true and functional productive lifespan in Italian Holstein-Friesian cows. Italian Journal of Animal Science, 21(1), 1268-1276.
Schuster, J. C., Barkema, H. W., De Vries, A., Kelton, D. F., & Orsel, K. (2020). Invited review: Academic and applied approach to evaluating longevity in dairy cows. Journal of Dairy Science, 103(12), 11008-11024.
Shahinfar, S., Khansefid, M., Haile-Mariam, M., & Pryce, J. E. (2021). Machine learning approaches for the prediction of lameness in dairy cows. Animal, 15(11), 100391.
Smola, A. J., & Schölkopf, B. (2004). A tutorial on support vector regression. Statistics and computing, 14(3), 199-222. https://doi.org/10.1023/B:STCO.0000035301.49549.88.
Tamura, T., Okubo, Y., Deguchi, Y., Koshikawa, S., Takahashi, M., Chida, Y., & Okada, K. (2019). Dairy cattle behavior classifications based on decision tree learning using 3‐axis neck‐mounted accelerometers. Animal Science Journal, 90(4), 589-596.
Pelt, M. V., Jong, G. D., & Veerkamp, R. F. (2017). Improving the genetic evaluation for longevity in the Netherlands. Interbull bulletin 51: 33-37, Tallinn, Estonia, August 25-28.
Witten, I. H., Frank, E., Hall, M. A., Pal, C. J., & Data, M. (2005, June). Practical machine learning tools and techniques. In Data mining (Vol. 2, No. 4, pp. 403-413). Amsterdam, The Netherlands: Elsevier.