Agriculture and Biomedical | Open Access |

A Predictive Analytics Architecture Integrating Machine Learning and Collaborative Filtering for Accurate Detection of Mastitis in Dairy Cows

Dr. Michael Anderson , Department of Agricultural Engineering Faculty of Engineering and Information Technologies The University of Melbourne Melbourne, Victoria, Australia
Dr. Emily Thompson , Department of Agricultural and Biosystems Engineering Faculty of Science and Engineering The University of Western Australia Perth, Western Australia, Australia

Abstract

Mastitis remains one of the most prevalent and economically significant diseases affecting dairy cattle worldwide, resulting in substantial reductions in milk production, deterioration of milk quality, increased veterinary expenditures, premature culling, and diminished animal welfare. Although conventional diagnostic techniques such as somatic cell count analysis, bacterial culture, and clinical examination remain widely adopted, these approaches often identify the disease after physiological damage has already occurred. The increasing availability of precision livestock farming technologies, automatic milking systems, wearable sensors, and continuous physiological monitoring has created unprecedented opportunities for developing intelligent predictive systems capable of identifying mastitis before the appearance of obvious clinical symptoms. Recent advances in artificial intelligence have demonstrated considerable success in disease prediction through machine learning algorithms; however, existing systems frequently rely on isolated predictive models that inadequately exploit multidimensional relationships among cows, environmental variables, production characteristics, and historical disease patterns. This study proposes a predictive analytics architecture integrating machine learning and collaborative filtering to improve the accuracy and reliability of mastitis detection in dairy cows. The proposed conceptual architecture combines heterogeneous sensor data, historical herd records, behavioral monitoring, milk quality parameters, and collaborative similarity learning to generate individualized disease-risk assessments. Machine learning algorithms perform nonlinear pattern recognition, while collaborative filtering captures latent similarities among animals exhibiting comparable physiological and production characteristics. Together, these complementary mechanisms enhance prediction robustness and reduce false-positive and false-negative classifications. The paper synthesizes recent developments in machine learning, automated milking systems, risk assessment methodologies, ensemble learning, deep learning, and sensor-based monitoring exclusively from the provided literature. A comprehensive methodological framework is developed to explain data acquisition, preprocessing, feature engineering, collaborative similarity modeling, predictive analytics, validation strategies, and deployment considerations. The study further evaluates the theoretical advantages, implementation challenges, and practical implications of integrating collaborative intelligence into livestock disease prediction. The proposed architecture contributes a generalized decision-support framework capable of supporting veterinarians, dairy producers, and precision livestock management systems in achieving earlier intervention, improved herd health, optimized resource utilization, and enhanced sustainability within modern dairy farming.

Keywords

Mastitis prediction, Machine learning, Collaborative filtering, Precision livestock farming

References

Bobbo T, Biffani S, Taccioli C, Penasa M, Cassandro M. Comparison of machine learning methods to predict udder health status based on somatic cell counts in dairy cows. Sci. Rep., 2021; 11: 13642.

Bonestroo J, van der Voort M, Hogeveen H, Emanuelson U, Klaas I C, Fall N. Forecasting chronic mastitis using automatic milking system sensor data and gradient-boosting classifiers. Comput. Electron. Agric., 2022; 198: 107002.

Chen L J. Cow mastitis and scientific prevention and control measures. China Anim. Health, 2023; 25: 40–41. (in Chinese)

Chu M Y, Liu X W, Zeng X T, Wang Y C, Liu G. Research advances in the automatic detection technology for mastitis of dairy cows. Trans. Chin. Soc. Agric. Eng., 2023; 39(11): 1–12. (in Chinese)

Ebrahimi M, Mohammadi-Dehcheshmeh M, Ebrahimie E, Petrovski K R. Comprehensive analysis of machine learning models for prediction of subclinical mastitis: Deep learning and gradient-boosted trees outperform other models. Comput. Biol. Med., 2019; 114: 103456.

Fan X, Watters R D, Nydam D V, Virkler P D, Wieland M, Reed K F. Multivariable time series classification for clinical mastitis detection and prediction in automated milking systems. J. Dairy Sci., 2023; 106(5): 3448–3464.

Li W L, Zhao T T, Da R, Shi Y L, Guo G, Wang Y C, et al. Application and optimization of dairy cow mastitis risk assessment system in Chinese Holstein. Chin. J. Anim. Sci., 2021; 57(10): 65–72.

Liebe D M, Steele N M, Petersson-Wolfe C S, De Vries A, White R R. Practical challenges and potential approaches to predicting low-incidence diseases on farm using individual cow data: A clinical mastitis example. J. Dairy Sci., 2022; 105(3): 2369–2379.

Luo W K, Dong Q, Feng Y. Risk prediction model of clinical mastitis in lactating dairy cows based on machine learning algorithms. Prev. Vet. Med., 2023; 221: 106059.

Ma R J, Du L, Ma W D, Zhao J H, Li Q C, Lei C Z, et al. Study on the general situation and prevention and control measures of subclinical mastitis. China Cattle Sci., 2023; 49(4): 47–50. (in Chinese)

Naqvi S A, King M T M, Matson R D, Devries T J, Deardon R, Barkema H W. Mastitis detection with recurrent neural networks in farms using automated milking systems. Comput. Electron. Agric., 2022; 192: 106618.

Ozella L, Brotto R K, Forte C, Giacobini M. A literature review of modeling approaches applied to data collected in automatic milking systems. Animals, 2023; 13(12): 1916.

Pakrashi A, Ryan C, Guéret C, Berry D P, Corcoran M, Keane M T, et al. Early detection of subclinical mastitis in lactating dairy cows using cow-level features. J. Dairy Sci., 2023; 106(7): 4978–4990.

Satola A, Satola K. Performance comparison of machine learning models used for predicting subclinical mastitis in dairy cows: bagging, boosting, stacking, and super-learner ensembles versus single machine learning models. J. Dairy Sci., 2024; 107(6): 3959–3972.

Shi Y L, Li W L, Tang Y J, Mi S Y, Xiao W, Liu L, et al. Studies on risk-assessment-model establishment and prediction of mastitis in Chinese Holstein cattle. Chin. J. Anim. Sci., 2021; 57(3): 84–90. (in Chinese)

Sun Y, Zhou G Y, Wu T B, Li Y L, Ji S Q, Zhang T. Recent research progress of cow mastitis in China. China Dairy, 2022(4): 43–51. (in Chinese)

Tian H, Zhou X J, Wang H, Xu C, Zhao Z X, Xu W, et al. The prediction of clinical mastitis in dairy cows based on milk yield, rumination time, and milk electrical conductivity using machine learning algorithms. Animals, 2024; 14(3): 427.

Wang A H, Yang L F. Causes, clinical symptoms, diagnosis and treatment of cow mastitis. Mod. Anim. Husb. Sci. Technol., 2023(10): 94–96. (in Chinese)

Ye W, Ma Z, Yu Y, Han B. Incidence status of mastitis in dairy cows and its prevention and treatment measures in China. Chin. J. Anim. Sci., 2023; 59(9): 343–348. (in Chinese)

Zhai Y, Zhou B, Zhou F Z, Dai X, Liang Y, Zhang H R, et al. Analysis of factors affecting milk yield, conductivity, and activity level in Holstein cows. Chin. J. Anim. Sci., 2024; 60(6): 148–153. (in Chinese)

Zhang C S, Chen J, Li Q L, Deng B Q, Wang J, Chen C G. Deep contrastive learning: A survey. Acta Autom. Sin., 2023; 49(1): 15–39.

Zhang Y, Shi Q, Zhou Q M, Feng W Y, Xu X, Wu X. Isolation, identification, drug sensitivity and pathogenicity of pathogenic bacteria in dairy cow mastitis. Heilongjiang Anim. Sci. Vet. Med., 2020; (23): 85–88, 167–168. (in Chinese)

Zhou X J, Xu C, Wang H, Xu W, Zhao Z X, Chen M X, et al. The early prediction of common disorders in dairy cows monitored by automatic systems with machine learning algorithms. Animals, 2022; 12(10): 1251.

Zhou X Z, Wen H J, Zhang Y L, Xu J H, Zhang W G. Landslide susceptibility mapping using hybrid random forest with Geo Detector and RFE for factor optimization. Geosci. Front., 2021; 12(5): 101211.

Download and View Statistics

Views: 0   |   Downloads: 0

Copyright License

Download Citations

How to Cite

Anderson , D. M., & Thompson , D. E. (2026). A Predictive Analytics Architecture Integrating Machine Learning and Collaborative Filtering for Accurate Detection of Mastitis in Dairy Cows. The American Journal of Agriculture and Biomedical Engineering, 8(07), 1–12. Retrieved from https://theamericanjournals.com/index.php/tajabe/article/view/8201