Skip to main content Accessibility help

Principal component analysis for the early detection of mastitis and lameness in dairy cows

  • Bettina Miekley (a1), Imke Traulsen (a1) and Joachim Krieter (a1)


This investigation analysed the applicability of principal component analysis (PCA), a latent variable method, for the early detection of mastitis and lameness. Data used were recorded on the Karkendamm dairy research farm between August 2008 and December 2010. For mastitis and lameness detection, data of 338 and 315 cows in their first 200 d in milk were analysed, respectively. Mastitis as well as lameness were specified according to veterinary treatments. Diseases were defined as disease blocks. The different definitions used (two for mastitis, three for lameness) varied solely in the sequence length of the blocks. Only the days before the treatment were included in the blocks. Milk electrical conductivity, milk yield and feeding patterns (feed intake, number of feeding visits and time at the trough) were used for recognition of mastitis. Pedometer activity and feeding patterns were utilised for lameness detection. To develop and verify the PCA model, the mastitis and the lameness datasets were divided into training and test datasets. PCA extracted uncorrelated principle components (PC) by linear transformations of the raw data so that the first few PCs captured most of the variations in the original dataset. For process monitoring and disease detection, these resulting PCs were applied to the Hotelling's T2 chart and to the residual control chart. The results show that block sensitivity of mastitis detection ranged from 77·4 to 83·3%, whilst specificity was around 76·7%. The error rates were around 98·9%. For lameness detection, the block sensitivity ranged from 73·8 to 87·8% while the obtained specificities were between 54·8 and 61·9%. The error rates varied from 87·8 to 89·2%. In conclusion, PCA seems to be not yet transferable into practical usage. Results could probably be improved if different traits and more informative sensor data are included in the analysis.


Corresponding author

*For correspondence; e-mail:


Hide All
Abdi, H & Williams, LJ 2010 Principal component analysis. Wiley Interdisciplinary Reviews: Computational Statistics 2 433459
Bareille, N, Beaudeau, F, Billon, S, Robert, A & Faverdin, P 2003 Effects of health disorders on feed intake and milk production in dairy cows. Livestock Production Science 83 5362
Brandt, M, Haeussermann, A & Hartung, E 2010 Invited review: technical solutions for analysis of milk constituents and abnormal milk. Journal of Dairy Science 93 427436
Burstyn, I 2004 Principal component analysis is a powerful Instrument in occupational hygiene inquiries. Annals of Occupational Hygiene 48 655661
Cavero, D, Tölle, KH, Rave, G, Buxadé, C & Krieter, J 2007 Analysing serial data for mastitis detection by means of local regression. Livestock Science 110 101110
Cavero, D, Tölle, KH, Henze, C, Buxadé, C & Krieter, J 2008 Mastitis detection in dairy cows by application of Neural Networks. Livestock Science 114 280286
Chagunda, MGG, Friggens, NC, Rasmussen, MD & Larsen, T 2006 A model for detection of individual cow mastitis based on an indicator measured in milk. Journal of Dairy Science 89 29802998
Choi, SW, Lee, C, Lee, J-M, Park, JH & Lee, I-B 2005 Fault detection and identification of nonlinear processes based on kernel PCA. Chemometrics and Intelligent Laboratory Systems 75 5567
de Mol, RM & Woldt, WE 2001 Application of fuzzy logic in automated cow status monitoring. Journal of Dairy Science 84 400410
de Mol, RM, Kroeze, GH, Achten, JMFH, Maatje, K & Rossing, W 1997 Results of a multivariate approach to automated oestrus and mastitis detection. Livestock Production Science 48 219227
de Mol, RM, Keen, A, Kroeze, GH & Achten, JMFH 1999 Description of a detection model for oestrus and diseases in dairy cattle based on time series analysis combined with a Kalman filter. Computers and Electronics in Agriculture 22 171185
Dohoo, I 2001 Setting SCC cutpoints for cow and herd interpretation. In National Mastitis Council 2001-Annual Meeting Proceedings: Somatic Cell Count Symposium (Ed. Ontario Ministry of Agriculture, F.a.R.A., Fergus, Ontario, Canada), Ferguson, Canada
Gonzalez, LA, Tolkamp, BJ, Coffey, MP, Ferret, A & Kyriazakis, I 2008 Changes in feeding behavior as possible indicators for the automatic monitoring of health disorders in dairy cows. Journal of Dairy Science 91 10171028
Hogeveen, H, Kamphuis, C, Steeneveld, W & Mollenhorst, H 2010 Sensors and clinical mastitis—the quest for the perfect alert. Sensors 10 79918009
Hojsgaard, S & Friggens, NC 2010 Quantifying degree of mastitis from common trends in a panel of indicators for mastitis in dairy cows. Journal of Dairy Science 93 582592
ISO 2007 Automatic milking systems—requirements and testing. Annex C: Example of methods of evaluating detection systems for milk deemed as abnormal due to blood or to changes in homogeneity. ISO 20966:2007, International Organization for Standardization, Geneva, Switzerland.
Kamphuis, C, Mollenhorst, H, Feelders, A, Pietersma, D & Hogeveen, H 2010 Decision-tree induction to detect clinical mastitis with automatic milking. Computers and Electronics in Agriculture 70 6068
Kourti, T 2002 Process analysis and abnormal situation detection: from theory to practice. Control Systems Magazine, IEEE 22 1025
Kourti, T 2006 The Process Analytical Technology initiative and multivariate process analysis, monitoring and control. Analytical and Bioanalytical Chemistry 384 10431048
Kourti, T & MacGregor, JF 1995 Process analysis, monitoring and diagnosis, using multivariate projection methods. Chemometrics and Intelligent Laboratory Systems 28 321
Kourti, T, Brown, SD, Tauler, R, Walczak, B 2009 4.02—Multivariate statistical process control and process control, using latent variables. In Brown, SD, Tauler, R & Walczak, B, Comprehensive Chemometrics, pp. 2154. Oxford: Elsevier
Kramer, E, Cavero, D, Stamer, E & Krieter, J 2009 Mastitis and lameness detection in dairy cows by application of Fuzzy Logic. Livestock Science 125 9296
Lukas, JM, Reneau, JK & Linn, JG 2008 Water intake and dry matter intake changes as a feeding management tool and indicator of health and estrus status in dairy cows. Journal of Dairy Science 91 33853394
Lukas, JM, Reneau, JK, Wallace, R, Hawkins, D & Munoz-Zanzi, C 2009 A novel method of analyzing daily milk production and electrical conductivity to predict disease onset. Journal of Dairy Science 92 59645976
MacGregor, JF & Kourti, T 1995 Statistical process control of multivariate processes. Control Engineering Practice 3 403414
MacGregor, JF, Yu, H, García Muñoz, S & Flores-Cerrillo, J 2005 Data-based latent variable methods for process analysis, monitoring and control. Computers and Chemical Engineering 29 12171223
Matlab 2010 MathWorks, Release Notes for use with MATLAB® 7.10.0
Miekley, B, Traulsen, I & Krieter, J 2012 Detection of mastitis and lameness in dairy cows using wavelet analysis. Journal of Livestock Science 148 227236
Milner, P, Page, KL & Hillerton, JE 1997 The effects of early antibiotic treatment following diagnosis of mastitis detected by a change in the electrical conductivity of milk. Journal of Dairy Science 80 859863
Mollenhorst, H, van der Tol, PPJ & Hogeveen, H 2010 Somatic cell count assessment at the quarter or cow milking level. Journal of Dairy Science 93 33583364
Montgomery, DC 2009 Statistical Quality Control: A Modern Introduction. Arizona: John Wiley and Sons, Inc.
Nielen, M, Schukken, YH, Brand, A, Haring, S & Ferwerda-Van Zonneveld, RT 1995 Comparison of analysis techniques for on-line detection of clinical mastitis. Journal of Dairy Science 78 10501061
Pastell, ME & Kujala, M 2007 A probabilistic neural network model for lameness detection. Journal of Dairy Science 90 22832292
Petersen, HH, Gardner, IA, Rossitto, P, Larsen, HD & Heegard, PMH 2005 Milk amyloid A (MAA) concentration and somatic cell count (SCC) in the diagnosis of bovine mastitis. In Mastitis in Dairy Production: Current Knowledge and Future Solutions. Wageningen, The Netherlands: Wageningen Academic Publishers 473476
Pyörälä, S 2003 Indicators of inflammation in the diagnosis of mastitis. Veterinary Research 34 565578
Sloth, KHMN, Friggens, NC, Lovendahl, P, Andersen, PH, Jensen, J & Ingvartsen, KL 2003 Potential for improving description of bovine udder health status by combined analysis of milk parameters. J. Dairy Sci 86 12211232
Venkatasubramanian, V, Rengaswamy, R & Kavuri, SN 2003 A review of process fault detection and diagnosis: Part II: qualitative models and search strategies. Computers and Chemical Engineering 27 313326
Windig, JJ, Calus, MPL, de Jong, G & Veerkamp, RF 2005 The association between somatic cell count patterns and milk production prior to mastitis. Livestock Production Science 96 291299
Zhang, Y-W, Zhou, H & Qin, SJ 2010 Decentralized fault diagnosis of large-scale processes using multiblock kernel principal component analysis. Acta Automatica Sinica 36 593597


Principal component analysis for the early detection of mastitis and lameness in dairy cows

  • Bettina Miekley (a1), Imke Traulsen (a1) and Joachim Krieter (a1)


Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed