Using Decision Trees to Extract Patterns for Dairy Culling Management

Conference paper
Part of the IFIP Advances in Information and Communication Technology book series (IFIPAICT, volume 519)


The management of a dairy farm involves taking difficult technical and economic decisions such as the replacement of some cows to either maintain or increase the productivity of the farm. However, there is not a standard method supporting the selection procedure of which animals need to be culled. In the present study we used decision trees to develop a model able to classify a cow according to the average herd productivity. This model, obtained from a data base around 98000 cows, predicts the average milk production of the first lactation of a cow based on the monthly milk controls corresponding to the lactation peak. Our goal is to identify poor productive cows during her first lactation in order to make more accurate selections of which cows should be culled.


Veterinary Dairy farms Milk production Voluntary culling Artificial intelligence Machine learning Decision trees 



The authors acknowledge data support from CONAFE (Confederacion Nacional de la Raza Frisona). This research is partially funded by the projects (Project AGL2015-67409-C2-01-R) from the Spanish Ministry of Economy and Competitiveness; RPREF (CSIC Intramural 201650E044); and the grant 2014-SGR-118 from the Generalitat de Catalunya. Authors also thank to Àngel García-Cerdaña his helpful comments.


  1. 1.
    Ansari-Lari, M., Mohebbi-Fani, M., Rowshan-Ghasrodashti, A.: Causes of culling in dairy cows and its relation to age at culling and interval from calving in Shiraz, Southern Iran. Vet. Res. Forum 3, 233–237 (2012)Google Scholar
  2. 2.
    Calsamiglia, S., Castillejos, L., Astiz, S., Lopez-DeToro, C., Baucells, J.: A dairy farm simulation model as a tool to explore the technical and economical consequences of management decisions. In: Buiatrics, W.A. (ed.) Proceedings of the World Buiatrics Congress 2016, p. 406 (2016)Google Scholar
  3. 3.
    Cavero, D., Tölle, K., Buxadé, C., Krieter, J.: Mastitis detection in dairy cows by application of fuzzy logic. Livestock Sci. 105, 207–213 (2006)CrossRefGoogle Scholar
  4. 4.
    Fetrow, J., Nordlund, K.V., Norman, H.D.: Culling: nomenclature, definitions, and recommendations. J. Dairy Sci. 89, 1896–1905 (2006)CrossRefGoogle Scholar
  5. 5.
    Goel, A., Zobel, C.W., Jones, E.C.: A multi-agent system for supporting the electronic contracting of food grains. Comput. Electr. Agric. 48(2), 123–137 (2005). Scholar
  6. 6.
    Grzesiak, W., Blaszczyk, P., Lacroix, R.: Methods of predicting milk yield in dairy cows: Predictive capabilities of wood’s lactation curve and artificial neural networks (ANNs). Comput. Electron. Agric. 54(2), 69–83 (2006)CrossRefGoogle Scholar
  7. 7.
    Kamphuis, C., Mollenhorst, H., Heesterbeek, J., Hogeveen, H.: Detection of clinical mastitis with sensor data from automatic milking systems is improved by using decision-tree induction. J. Dairy Sci. 93(8), 3616–3627 (2010)CrossRefGoogle Scholar
  8. 8.
    Parrott, L., Lacroix, R., Wade, K.M.: Design considerations for the implementation of multi-agent systems in the dairy industry. Comput. Electr. Agric. 38(2), 79–98 (2003). Scholar
  9. 9.
    Quinlan, J.R.: Induction of decision trees. Mach. Learn. 1(1), 81–106 (1986)Google Scholar
  10. 10.
    Shahinfar, S., Mehrabani-Yeganeh, H., Lucas, C., Kalhor, A., Kazemian, M., Weigel, K.A.: Prediction of breeding values for dairy cattle using artificial neural networks and neuro-fuzzy systems. Comput. Math. Methods Med. (ID 127130) (2012)Google Scholar
  11. 11.
    Sitkowska, B., Piwczyński, D., Aerts, J., Kolenda, M., Özkaya, S.: Detection of high levels of somatic cells in milk on farms equipped with an automatic milking system by decision trees technique. Turkish J. Vet. Anim. Sci. 41, 532–540 (2009)CrossRefGoogle Scholar
  12. 12.
    Sugiono, S., Soenoko, R., Riawati, L.: Investigating the impact of physiological aspect on cow milk production using artificial intelligence. Int. Rev. Mech. Eng. 11(1), 30–36 (2017)Google Scholar
  13. 13.
    Sun, Z., Samarasinghe, S., Jago, J.: Detection of mastitis and its stage of progression by automatic milking systems using artificial neural networks. J. Dairy Res. 77, 168–175 (2009)CrossRefGoogle Scholar
  14. 14.
    Thangaraj, A., Patricia, A., Samarasingh, S.: Modelling a multi agent system for dairy farms for integrated decision making. In: 22nd International Congress on Modelling and Simulation, Hobart, Tasmania, Australia (2017)Google Scholar
  15. 15.
    Wang, E., Samarasinghe, S.: On-line detection of mastitis in dairy herds using artificial neural networks. In: Proceedings of the International Congress on Modelling and Simulation (MODSIM 2005), Melbourne, Australia (2005)Google Scholar

Copyright information

© IFIP International Federation for Information Processing 2018

Authors and Affiliations

  1. 1.Animal Nutrition and Welfare Service, Department of Animal and Food SciencesUniversitat Autonoma de BarcelonaBellaterraSpain
  2. 2.Artificial Intelligence Research Institute (IIIA - CSIC)BellaterraSpain

Personalised recommendations