Predicting Nitrogen Excretion of Dairy Cattle with Machine Learning

Herman Mollenhorst*, Yamine Bouzembrak, Michel de Haan, Hans J.P. Marvin, Roel F. Veerkamp, Claudia Kamphuis

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference paperAcademicpeer-review

1 Citation (Scopus)


Several tools were developed during the past decades to support farmers in nutrient management and to meet legal requirements such as the farm specific excretion tool. This tool is used by dairy farmers to estimate the farm specific nitrogen (N) excretion of their animals, which is calculated from farm specific data and some normative values. Some variables, like intake of grazed grass or roughage, are hard to measure. A data driven approach could help finding structures in data, and identifying key factors determining N excretion. The aim of this study was to benchmark machine learning methods such as Bayesian Network (BN) and boosted regression trees (BRT) in predicting N excretion, and to assess how sensitive both approaches are on the absence of hard-to-measure input variables. Data were collected from 25 Dutch dairy farms. In the period 2006–2018, detailed recordings of N intake and output were made during 6–10 weeks distributed over each year. Variables included milk production, feed intake and their composition. Calculated N excretion was categorized as low, medium, and high, with limits of 300 and 450 g/day/animal. Accuracy of prediction of the farm specific N excretion, and distinguishing the low and high cases from the medium ones, was slightly better with BRT than with BN. Leaving out information on intake during grazing did not negatively influence validation performance of both models, which opens opportunities to diminish data collection efforts on this aspect. Further analyses are required to confirm these results, such as cross-validation.
Original languageEnglish
Title of host publicationInternational Symposium on Environmental Software Systems (ISESS 2020)
Subtitle of host publicationEnvironmental Software Systems. Data Science in Action
Place of PublicationWageningen
ISBN (Electronic)9783030398156
ISBN (Print)9783030398149
Publication statusPublished - 5 Feb 2020

Publication series

NameIFIP Advances in Information and Communication Technology
ISSN (Print)1868-4238
ISSN (Electronic)1868-422X


  • Bayesian networks
  • Boosted regression trees
  • Dairy cows
  • Nitrogen excretion


Dive into the research topics of 'Predicting Nitrogen Excretion of Dairy Cattle with Machine Learning'. Together they form a unique fingerprint.

Cite this