Related Experiment Video
Updated: Oct 28, 2026

The Use of an Automated System (GreenFeed) to Monitor Enteric Methane and Carbon Dioxide Emissions from Ruminant Animals
Published on: September 7, 2015
Predicting the Distribution and Dry Matter Intake of Cow Pens with Machine Learning
Padraig M Lucey1, Ian J Lean2, Nadiia Stepanchenko3
1Veterinary Medicine Teaching and Research Center, School of Veterinary Medicine, University of California, Davis, Tulare, CA 93274, USA.
Abstract:
Current rations are formulated on the requirements of a representative cow plus a correction factor. This is not precision feeding because in practice cows are fed as a pen, and within a pen, dry matter intake (DMI) among cows is not uniform and has skew or kurtosis. Since ration formulation depends on DMI as a binding constraint, rations formulated to the pen DMI could be more precise if the distribution of DMI is better described. The objectives of this study were to: 1. Develop an algorithm, the distribution shape model (DSM), to predict pen DMI based on the distribution of cow measures which could easily be estimated on a commercial dairy farm; and 2. Compare predictions of pen DMI from the DSM to predictions of pen DMI based on a representative cow using the National Academies of Sciences, Engineering, and Medicine (NASEM) equation model (NSM). Individual cow DMI from previously published studies was used to train an Extreme Gradient Boosting (XGB) algorithm to predict the distribution shape of pen DMI (Beta or Generalized Normal) from parity, week in milk, and descriptive statistics of milk yield. The NSM predicted DMI for a representative cow from pen-average inputs, and this prediction was multiplied by the number of cows, simulating the scenario where DMI is assumed to be uniform across a pen. Both models were tested by comparing predicted with observed total pen DMI using an independent testing dataset of 229,909 pens generated from previously collected cow observations. For pens classified as Beta, the mean squared error of prediction (MSEP) of pen DMI from the DSM and NSM was 5249 and 9736 kg2, respectively (root mean squared error of prediction, RMSEP, 72.5 and 98.7 kg/d), with 3.0% and 80.2% due to mean bias, 5.4% and 8.3% due to regression slope not equal to 1, and 91.6% and 11.5% due to random variation. For pens classified as Generalized Normal, MSEP was 2086 and 6431 kg2 (RMSEP 45.7 and 80.2 kg/d), with 0.8% and 73.2% due to mean bias, 7.6% and 4.7% due to slope not equal to 1, and 91.6% and 22.1% due to random variation. The NSM consistently overpredicted pen DMI, contributing to its higher error. Including the distribution shape in the prediction of DMI improved precision and accuracy of pen DMI prediction and should be considered when estimating the total daily DMI fed to a pen.