Suitability of different machine learning algorithms for the classification of the proportion of grassland-based forages at the herd level using mid-infrared spectral information from routine milk control

As the call for an international standard for milk from grassland-based production systems continues to grow, so too do the monitoring and evaluation policies surrounding this topic. Individual stipulations by countries and milk producers to market their milk under their own grass-fed labels include a compulsory number of grazing days per year (ranging from 120 d for certain labels to 180 d for others), a specified amount of herbage in the diet, or a prescribed dietary proportion of grassland-based forages (GBF) fed and produced on-farm. As these multifarious policy and label requirements are laborious and costly to monitor on-farm, fast economical proxies would be advantageous to verify the proportion of GBF consumed by the cows in the final product. With this in mind, we employed readily available mid-infrared spectral data (n = 1,132 spectra) from routine milk controls to develop binary classification models for 4 main feed groups from a primarily forage-based diet: total GBF (≥50% [n = 955], ≥75% [n = 599], ≥85% [n = 356]), pasture (≥20% [n = 451], ≥50% [n = 284], ≥70% [n = 152]), fresh herbage (pasture + fresh herbage indoor feeding; ≥20% [n = 517], ≥50% [n = 325], ≥70% [n = 182]), and whole plant corn (fresh + conserved; ≥10% [n = 646], ≥30% [n = 187]), with the latter as a negative control. We compared 4 machine learning methods to assess which statistical model performs best at discriminating these classes. Three of these models have not yet been tested for herd-level dietary proportion classification, and all 4 follow completely different approaches: least absolute shrinkage and selection operator (LASSO), partial least squares discriminant analysis (PLS-DA), random forest (RF), and support vector machines (SVM). Seasonality has been a missing element from previous dietary herbage proportion classification models. As grazing and fresh herbage indoor feeding are highly dependent on the season, we developed an indicator to incorporate seasonality in a consistent, unbiased manner into our models. We also tested 3 sets of covariates. The first set included only mid-infrared spectra derived data, the second included mid-infrared spectra derived data plus seasonality indices and the third included mid-infrared spectra derived data, seasonality indices and additional herd specific information (DIM, breed, and parity). Of the 4 machine learning algorithms tested for the binary classification of GBF proportion at herd level, LASSO and PLS-DA performed best according to evaluation metrics; however, the RF and SVM models were not far behind the best performing model evaluation metrics in each feed category. Our best performing model, the LASSO model containing seasonality indices and herd specific information, classified total GBF ≥50% with an accuracy of 78.6%, precision of 85.1%, sensitivity of 90.6%, specificity of 14.1%, and F1 score (harmonic mean of precision and sensitivity) of 87.7%; this was very similar to the PLS-DA model. Our results suggest that in general, LASSO and PLS-DA machine learning algorithms perform better for dietary GBF classification than RF or SVM algorithms.

Authors

Institutions

Publication Details

Journal
Journal of Dairy Science
Published
2024-08-30
DOI
https://doi.org/10.3168/jds.2024-25090
Citations
4
Primary Topic
Spectroscopy and Chemometric Analyses
Type
article
Field-Weighted Citation Impact
0.94

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Suitability of different machine learning algorithms for the classification of the proportion of grassland-based forages at the herd level using mid-infrared spectral information from routine milk control

Madlene Nussbaum, Michael Sutter, Michael Kreuzer, Amy Birkinshaw et al.
4 citations
Journal of Dairy Science
Spectroscopy and Chemometric Analyses
0.94
article

Suitability of different machine learning algorithms for the classification of the proportion of grassland-based forages at the herd level using mid-infrared spectral information from routine milk control

Madlene Nussbaum, Michael Sutter, Michael Kreuzer, Amy Birkinshaw, Beat Reidy
article en
4 citations

Abstract

As the call for an international standard for milk from grassland-based production systems continues to grow, so too do the monitoring and evaluation policies surrounding this topic. Individual stipulations by countries and milk producers to market their milk under their own grass-fed labels include a compulsory number of grazing days per year (ranging from 120 d for certain labels to 180 d for others), a specified amount of herbage in the diet, or a prescribed dietary proportion of grassland-based forages (GBF) fed and produced on-farm. As these multifarious policy and label requirements are laborious and costly to monitor on-farm, fast economical proxies would be advantageous to verify the proportion of GBF consumed by the cows in the final product. With this in mind, we employed readily available mid-infrared spectral data (n = 1,132 spectra) from routine milk controls to develop binary classification models for 4 main feed groups from a primarily forage-based diet: total GBF (≥50% [n = 955], ≥75% [n = 599], ≥85% [n = 356]), pasture (≥20% [n = 451], ≥50% [n = 284], ≥70% [n = 152]), fresh herbage (pasture + fresh herbage indoor feeding; ≥20% [n = 517], ≥50% [n = 325], ≥70% [n = 182]), and whole plant corn (fresh + conserved; ≥10% [n = 646], ≥30% [n = 187]), with the latter as a negative control. We compared 4 machine learning methods to assess which statistical model performs best at discriminating these classes. Three of these models have not yet been tested for herd-level dietary proportion classification, and all 4 follow completely different approaches: least absolute shrinkage and selection operator (LASSO), partial least squares discriminant analysis (PLS-DA), random forest (RF), and support vector machines (SVM). Seasonality has been a missing element from previous dietary herbage proportion classification models. As grazing and fresh herbage indoor feeding are highly dependent on the season, we developed an indicator to incorporate seasonality in a consistent, unbiased manner into our models. We also tested 3 sets of covariates. The first set included only mid-infrared spectra derived data, the second included mid-infrared spectra derived data plus seasonality indices and the third included mid-infrared spectra derived data, seasonality indices and additional herd specific information (DIM, breed, and parity). Of the 4 machine learning algorithms tested for the binary classification of GBF proportion at herd level, LASSO and PLS-DA performed best according to evaluation metrics; however, the RF and SVM models were not far behind the best performing model evaluation metrics in each feed category. Our best performing model, the LASSO model containing seasonality indices and herd specific information, classified total GBF ≥50% with an accuracy of 78.6%, precision of 85.1%, sensitivity of 90.6%, specificity of 14.1%, and F1 score (harmonic mean of precision and sensitivity) of 87.7%; this was very similar to the PLS-DA model. Our results suggest that in general, LASSO and PLS-DA machine learning algorithms perform better for dietary GBF classification than RF or SVM algorithms.

Journal of Dairy ScienceVol. 107(12)
Bern University of Applied Sciences (CH), Utrecht University (NL), ETH Zurich (CH), Swiss Federal University for Vocational Education and Training SFUVET (CH)
Innosuisse - Schweizerische Agentur für Innovationsförderung
Openalex Percentile: Top 29%
Spectroscopy and Chemometric Analyses
0.94
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.