
95% of researchers rate our articles as excellent or good
Learn more about the work of our research integrity team to safeguard the quality of each article we publish.
Find out more
ORIGINAL RESEARCH article
Front. Vet. Sci.
Sec. Animal Behavior and Welfare
Volume 12 - 2025 | doi: 10.3389/fvets.2025.1575525
The final, formatted version of the article will be published soon.
You have multiple emails registered with Frontiers:
Please enter your email address:
If you already have an account, please login
You don't have a Frontiers account ? You can register here
Mastitis is an important disease affecting the global dairy industry, resulting in significant losses to dairies due to reduced milk quality and production. With increasing consumer interest in food safety and the a ppropriate use of antibiotics, early identification of cows at risk for the disease has become an urgent issue. In particular, subclinical mastitis is more difficult to detect due to the lack of visible symptoms, and its early warn ing is particularly important. In this study, a time series prediction method was used to predict the risk of masti tis in dairy cows based on machine learning techniques. The study data were obtained from 4000 cows from la rge farms in the Hexi region of Gansu, and the time series features were constructed to predict the health status of each cow in June by utilizing the production indicators such as milk yield, fat percentage and protein perce ntage in two consecutive months in April and May. To fully utilize the time-series features, we constructed a m ultivariate enlistment including raw indicator values, monthly rates of change, and statistical features. After dat a preprocessing and balancing, data from 2821 cows were selected for model training. By comparing the perfo rmance of several prediction models, including XGBoost, gradient boosting tree, support vector machine, K-ne arest neighbor ,logistic regression and Long Short-Term Memory, it was found that the XGBoost model perfor med the best, with an area under the ROC curve of 0.75 and an accuracy rate of 71.36%. Characteristic import ance analysis showed that May milk yield (22.29%), standard deviation of fat percentage (20.27%) and rate of change of fat percentage (19.87%) were the key time-series indicators affecting the prediction results.The SHa pley Additive exPlanations (SHAP)value analysis further confirmed the predictive value of these time-series c haracteristics, which provided a clear monitoring focus for farm managers. This study provides an effective ear ly warning tool for disease prevention in dairy farms through time series modeling, which has important practi cal application value.
Keywords: time series prediction, Somatic cell count, subclinical mastitis in dairy cows, XGBoost, SHAP value
Received: 12 Feb 2025; Accepted: 28 Mar 2025.
Copyright: Âİ 2025 Guo, Yongqiang and Hu. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
* Correspondence:
Dai Yongqiang, Gansu Agricultural University, Lanzhou, China
Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.
Research integrity at Frontiers
Learn more about the work of our research integrity team to safeguard the quality of each article we publish.