Related Experiment Video
Updated: Jun 15, 2026

Milk Collection in the Rat Using Capillary Tubes and Estimation of Milk Fat Content by Creamatocrit
Published on: December 16, 2015
Plasma and Milk Variables Classify Diet, Dry Period Length, and Lactation Week of Dairy Cows Using a Machine Learning
Xiaodan Wang1,2,3, Sanjeevan Jahagirdar2, Bas Kemp1
1Adaptation Physiology Group, Department of Animal Sciences, Wageningen University & Research, 6708 WE Wageningen, The Netherlands.
Abstract:
Background/Objectives: The aim of this study was to classify cows with respect to different diets, dry period (DP) lengths, and lactation weeks based on body weight, milk variables, and plasma metabolites measured in early lactation. Methods: Holstein-Friesian cows (n = 95) were randomly assigned to three DP lengths (0, 30, or 60 d; n = 31, 34, and 30) and two early-lactation diets (lipogenic: n = 47; glucogenic: n = 48) in a 3 × 2 factorial design. From 10 d pre-calving to 8 weeks postpartum, cows received experimental diets. An XGBoost model was trained for classification using weekly body weight, milk variables, and plasma metabolites, validated via 1000 repeated hold-out partitions with stratified sampling. Results: Classification performance for lactation week, relative to week 1 in lactation, was good, with an area under the curve (AUC) > 0.9, independent of diet or DP length. The classification for 0 d vs. 60 d DP length was better than that for 0 d vs. 30 d or 30 d vs. 60 d DP length, showing an AUC > 0.8, independent of diet or lactation week. The top features to classify diet were plasma urea and milk fat content. Milk yield and protein content were the important features for classifying lactation weeks regardless of diet, while milk fat content was a critical predictor specific to the glucogenic diet. Conclusions: Our findings demonstrate that milk and plasma features can retrospectively classify management groups in early lactation using machine learning approaches.

