Next Article in Journal
Ambulatory Electrocardiographic Monitoring and Ectopic Beat Detection in Conscious Mice
Previous Article in Journal
A Computational Method to Assist the Diagnosis of Breast Disease Using Dynamic Thermography
Article

Using Sensor Data to Detect Lameness and Mastitis Treatment Events in Dairy Cows: A Comparison of Classification Models

1
Physiology Unit, Institute of Animal Science, University of Bonn, 53115 Bonn, Germany
2
Department of Educational Science, Faculty of Educational and Social Sciences, University of Education Heidelberg, 69120 Heidelberg, Germany
3
Livestock Technology Section, Institute for Agricultural Engineering, University of Bonn, 53115 Bonn, Germany
*
Author to whom correspondence should be addressed.
Sensors 2020, 20(14), 3863; https://doi.org/10.3390/s20143863
Received: 30 April 2020 / Revised: 1 July 2020 / Accepted: 9 July 2020 / Published: 10 July 2020
(This article belongs to the Section Physical Sensors)
The aim of this study was to develop classification models for mastitis and lameness treatments in Holstein dairy cows as the target variables based on continuous data from herd management software with modern machine learning methods. Data was collected over a period of 40 months from a total of 167 different cows with daily individual sensor information containing milking parameters, pedometer activity, feed and water intake, and body weight (in the form of differently aggregated data) as well as the entered treatment data. To identify the most important predictors for mastitis and lameness treatments, respectively, Random Forest feature importance, Pearson’s correlation and sequential forward feature selection were applied. With the selected predictors, various machine learning models such as Logistic Regression (LR), Support Vector Machine (SVM), K-nearest neighbors (KNN), Gaussian Naïve Bayes (GNB), Extra Trees Classifier (ET) and different ensemble methods such as Random Forest (RF) were trained. Their performance was compared using the receiver operator characteristic (ROC) area-under-curve (AUC), as well as sensitivity, block sensitivity and specificity. In addition, sampling methods were compared: Over- and undersampling as compensation for the expected unbalanced training data had a high impact on the ratio of sensitivity and specificity in the classification of the test data, but with regard to AUC, random oversampling and SMOTE (Synthetic Minority Over-sampling) even showed significantly lower values than with non-sampled data. The best model, ET, obtained a mean AUC of 0.79 for mastitis and 0.71 for lameness, respectively, based on testing data from practical conditions and is recommended by us for this type of data, but GNB, LR and RF were only marginally worse, and random oversampling and SMOTE even showed significantly lower values than without sampling. We recommend the use of these models as a benchmark for similar self-learning classification tasks. The classification models presented here retain their interpretability with the ability to present feature importances to the farmer in contrast to the “black box” models of Deep Learning methods. View Full-Text
Keywords: classification; sensor data; lameness; mastitis; machine learning classification; sensor data; lameness; mastitis; machine learning
Show Figures

Figure 1

MDPI and ACS Style

Post, C.; Rietz, C.; Büscher, W.; Müller, U. Using Sensor Data to Detect Lameness and Mastitis Treatment Events in Dairy Cows: A Comparison of Classification Models. Sensors 2020, 20, 3863. https://doi.org/10.3390/s20143863

AMA Style

Post C, Rietz C, Büscher W, Müller U. Using Sensor Data to Detect Lameness and Mastitis Treatment Events in Dairy Cows: A Comparison of Classification Models. Sensors. 2020; 20(14):3863. https://doi.org/10.3390/s20143863

Chicago/Turabian Style

Post, Christian; Rietz, Christian; Büscher, Wolfgang; Müller, Ute. 2020. "Using Sensor Data to Detect Lameness and Mastitis Treatment Events in Dairy Cows: A Comparison of Classification Models" Sensors 20, no. 14: 3863. https://doi.org/10.3390/s20143863

Find Other Styles
Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Access Map by Country/Region

1
Search more from Scilit
 
Search
Back to TopTop