Skip to main content
SLU:s publikationsdatabas (SLUpub)

Doktorsavhandling2021Öppen tillgång

Indicators of mastitis and milk quality in dairy cows : data, modeling, and prediction in automatic milking systems

Anglart, Dorota


Methods for generating predictions of important and generally accepted indicators of udder inflammation and poor milk quality, such as somatic cell count (SCC) or changes in milk homogeneity, are few. The aim of this thesis was to investigate methods to identify indicators of mastitis and poor milk quality in dairy cows using data generated by automatic milking systems (AMS).

The first part of the project investigated the relationship between SCC and data regularly recorded by the AMS using models that could capture nonlinear associations between the explanatory variables and the outcome. This information could be used in modeling the SCC. Furthermore, three statistical methods, generalized additive model, random forest and multilayer perceptron, were compared for their ability to predict SCC using data generated by the AMS. The results showed that equally low prediction error was obtained using generalized additive model or multilayer perceptron for prediction of SCC based on AMS data.

The second part explored the dynamics of changes in milk homogeneity in cows milked in AMS using descriptive statistics for clots collected by inline filters, scored for density. Clots were found among certain cows and cow periods and appeared in new quarters over time. Models were fitted for detecting and predicting clots in single cow milkings as well as for detecting clots in milkings over a longer period. The models successfully distinguished periods of milking free of changes in milk homogeneity, although the detection and prediction performance was poor. The prediction target and severity grade of each density category is discussed.


udder health; somatic cell count; milk homogeneity; generalised additive model; multilayer perceptron; random forest; machine learning

Publicerad i

Acta Universitatis Agriculturae Sueciae
2021, nummer: 2021:5
ISBN: 978-91-7760-688-8, eISBN: 978-91-7760-689-5
Utgivare: Department of Clinical Sciences, Swedish University of Agricultural Sciences