A Machine–Learning Approach Reveals That Bacterial Spore Levels in Organic Bulk Tank Milk are Dependent on Farm Characteristics and Meteorological Factors

Bacterial spores in raw milk can lead to quality issues in milk and milk-derived products. As these spores originate from farm environments, it is important to understand the contributions of farm-level factors to spore levels. This study aimed to investigate the impact of farm management practices...

Full description

Saved in:
Bibliographic Details
Main Authors: Chenhao Qian, Renee T. Lee, Rachel L. Weachock, Martin Wiedmann, Nicole H. Martin
Format: Article
Language:English
Published: Elsevier 2025-04-01
Series:Journal of Food Protection
Subjects:
Online Access:http://www.sciencedirect.com/science/article/pii/S0362028X25000298
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850148793675153408
author Chenhao Qian
Renee T. Lee
Rachel L. Weachock
Martin Wiedmann
Nicole H. Martin
author_facet Chenhao Qian
Renee T. Lee
Rachel L. Weachock
Martin Wiedmann
Nicole H. Martin
author_sort Chenhao Qian
collection DOAJ
description Bacterial spores in raw milk can lead to quality issues in milk and milk-derived products. As these spores originate from farm environments, it is important to understand the contributions of farm-level factors to spore levels. This study aimed to investigate the impact of farm management practices and meteorological factors on levels of different spore types in organic raw milk using machine learning models. Raw milk from certified organic dairy farms (n = 102) located across 11 states was collected 6 times over a year and tested for standard plate count, psychrotolerant spore count, mesophilic spore count, thermophilic spore count, and butyric acid bacteria. At each sampling date, a survey about farm management practices was collected and meteorological factors were obtained on the date of sampling as well as 1, 2, and 3 days prior. The dataset was stratified separately based on the use of a parlor for milking, number of years since organic certification, and pasture time into subdatasets to address confounders. We constructed random forest regression models to predict log10 mesophilic spore count, log10 thermophilic spore count, and log10 butyric acid bacteria’s most probable number as well as a random forest classification model to classify the presence of psychrotolerant spores in each raw milk sample. The summary statistics showed that spore levels vary considerably between certified organic farms but were only slightly higher than those from conventional farms in previous longitudinal studies. The variable importance plots from the models suggest that herd size, certification year, employee-related variables, clipping and flaming udders are important for the spore levels in organic raw milk. The small effects of these variables as shown in partial dependence plots suggest a need for individualized risk-based approach to manage spore levels. Incorporating novel data streams has the potential to enhance the performance of the model as a real-time monitoring tool.
format Article
id doaj-art-7216f0db166542e29de0add95ef35408
institution OA Journals
issn 0362-028X
language English
publishDate 2025-04-01
publisher Elsevier
record_format Article
series Journal of Food Protection
spelling doaj-art-7216f0db166542e29de0add95ef354082025-08-20T02:27:07ZengElsevierJournal of Food Protection0362-028X2025-04-0188510047710.1016/j.jfp.2025.100477A Machine–Learning Approach Reveals That Bacterial Spore Levels in Organic Bulk Tank Milk are Dependent on Farm Characteristics and Meteorological FactorsChenhao Qian0Renee T. Lee1Rachel L. Weachock2Martin Wiedmann3Nicole H. Martin4Department of Food Science, Cornell University, Ithaca, New York, United StatesDepartment of Food Science, Cornell University, Ithaca, New York, United StatesDepartment of Food Science, Cornell University, Ithaca, New York, United StatesDepartment of Food Science, Cornell University, Ithaca, New York, United StatesCorresponding author.; Department of Food Science, Cornell University, Ithaca, New York, United StatesBacterial spores in raw milk can lead to quality issues in milk and milk-derived products. As these spores originate from farm environments, it is important to understand the contributions of farm-level factors to spore levels. This study aimed to investigate the impact of farm management practices and meteorological factors on levels of different spore types in organic raw milk using machine learning models. Raw milk from certified organic dairy farms (n = 102) located across 11 states was collected 6 times over a year and tested for standard plate count, psychrotolerant spore count, mesophilic spore count, thermophilic spore count, and butyric acid bacteria. At each sampling date, a survey about farm management practices was collected and meteorological factors were obtained on the date of sampling as well as 1, 2, and 3 days prior. The dataset was stratified separately based on the use of a parlor for milking, number of years since organic certification, and pasture time into subdatasets to address confounders. We constructed random forest regression models to predict log10 mesophilic spore count, log10 thermophilic spore count, and log10 butyric acid bacteria’s most probable number as well as a random forest classification model to classify the presence of psychrotolerant spores in each raw milk sample. The summary statistics showed that spore levels vary considerably between certified organic farms but were only slightly higher than those from conventional farms in previous longitudinal studies. The variable importance plots from the models suggest that herd size, certification year, employee-related variables, clipping and flaming udders are important for the spore levels in organic raw milk. The small effects of these variables as shown in partial dependence plots suggest a need for individualized risk-based approach to manage spore levels. Incorporating novel data streams has the potential to enhance the performance of the model as a real-time monitoring tool.http://www.sciencedirect.com/science/article/pii/S0362028X25000298Dairy farm managementDairy spoilageDecision support toolOrganic milkPredictive model
spellingShingle Chenhao Qian
Renee T. Lee
Rachel L. Weachock
Martin Wiedmann
Nicole H. Martin
A Machine–Learning Approach Reveals That Bacterial Spore Levels in Organic Bulk Tank Milk are Dependent on Farm Characteristics and Meteorological Factors
Journal of Food Protection
Dairy farm management
Dairy spoilage
Decision support tool
Organic milk
Predictive model
title A Machine–Learning Approach Reveals That Bacterial Spore Levels in Organic Bulk Tank Milk are Dependent on Farm Characteristics and Meteorological Factors
title_full A Machine–Learning Approach Reveals That Bacterial Spore Levels in Organic Bulk Tank Milk are Dependent on Farm Characteristics and Meteorological Factors
title_fullStr A Machine–Learning Approach Reveals That Bacterial Spore Levels in Organic Bulk Tank Milk are Dependent on Farm Characteristics and Meteorological Factors
title_full_unstemmed A Machine–Learning Approach Reveals That Bacterial Spore Levels in Organic Bulk Tank Milk are Dependent on Farm Characteristics and Meteorological Factors
title_short A Machine–Learning Approach Reveals That Bacterial Spore Levels in Organic Bulk Tank Milk are Dependent on Farm Characteristics and Meteorological Factors
title_sort machine learning approach reveals that bacterial spore levels in organic bulk tank milk are dependent on farm characteristics and meteorological factors
topic Dairy farm management
Dairy spoilage
Decision support tool
Organic milk
Predictive model
url http://www.sciencedirect.com/science/article/pii/S0362028X25000298
work_keys_str_mv AT chenhaoqian amachinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT reneetlee amachinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT rachellweachock amachinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT martinwiedmann amachinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT nicolehmartin amachinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT chenhaoqian machinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT reneetlee machinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT rachellweachock machinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT martinwiedmann machinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors
AT nicolehmartin machinelearningapproachrevealsthatbacterialsporelevelsinorganicbulktankmilkaredependentonfarmcharacteristicsandmeteorologicalfactors