Machine learning-based clinical mastitis detection in dairy cows using milk electrical conductivity and somatic cell count
Bovine mastitis, a prevalent disease causing substantial economic losses in dairy production, requires accurate and robust detection methods. Traditional threshold-based approaches using electrical conductivity (EC) are limited by low specificity and farm-specific variability. While somatic cell count (SCC) offers a more reliable biomarker for intramammary inflammation, current SCC sensors often yield imprecise data and are costly to implement, resulting in a lack of accurate, quantitative, and widely applicable models for mastitis monitoring. This study presents an machine learning-based diagnostic framework integrating logistic regression (LR), support vector machines (SVM), and feedforward neural networks (FNN) to evaluate mastitis detection performance with EC, SCC, and their combined inputs. Using data from 93 cows across four dairy farms, we demonstrate that SCC-based models consistently outperform EC-based approaches. The SVM model achieved 95.6% accuracy and 100% sensitivity when utilizing SCC as input feature. The FNN model attained the highest AUC (0.981), highlighting neural networks' capability to capture complex patterns. Although the addition of EC to SCC did not improve performance across all metrics, it showed potential to enhance robustness in contexts where accurate SCC data are limited. These findings underscore the diagnostic superiority of SCC and the potential of tailored machine learning solutions in modern dairy production settings. Future work should focus on expanding datasets across multiple regions and integrating high-precision SCC sensors for real-time deployment in automated detection systems.
Authors
- Xiaoye Huo (ORCID: https://orcid.org/0000-0001-8309-8637)
- Chen Jian (ORCID: https://orcid.org/0000-0002-7633-570X)
- Xiao Chen (ORCID: https://orcid.org/0000-0002-1824-1473)
- Deyong Chen (ORCID: https://orcid.org/0000-0001-5856-3592)
- Han Ding
- Lihong Pan (ORCID: https://orcid.org/0000-0002-1995-2373)
- Nan Li (ORCID: https://orcid.org/0000-0001-8065-2452)
- Junbo Wang (ORCID: https://orcid.org/0009-0006-9955-7838)
Institutions
- Chinese Academy of Sciences (CN)
- State Key Laboratory of Transducer Technology (CN)
- Aerospace Information Research Institute (CN)
- University of Chinese Academy of Sciences (CN)
Publication Details
- Journal
- Frontiers in Veterinary Science
- Published
- 2025-11-14
- DOI
- https://doi.org/10.3389/fvets.2025.1671186
- Primary Topic
- Milk Quality and Mastitis in Dairy Cows
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China
- National Key Research and Development Program of China