PMID- 32664417 OWN - NLM STAT- MEDLINE DCOM- 20210324 LR - 20210324 IS - 1424-8220 (Electronic) IS - 1424-8220 (Linking) VI - 20 IP - 14 DP - 2020 Jul 10 TI - Using Sensor Data to Detect Lameness and Mastitis Treatment Events in Dairy Cows: A Comparison of Classification Models. LID - 10.3390/s20143863 [doi] LID - 3863 AB - 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 Naive 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. FAU - Post, Christian AU - Post C AUID- ORCID: 0000-0001-5746-7830 AD - Physiology Unit, Institute of Animal Science, University of Bonn, 53115 Bonn, Germany. FAU - Rietz, Christian AU - Rietz C AD - Department of Educational Science, Faculty of Educational and Social Sciences, University of Education Heidelberg, 69120 Heidelberg, Germany. FAU - Buscher, Wolfgang AU - Buscher W AUID- ORCID: 0000-0002-7212-7639 AD - Livestock Technology Section, Institute for Agricultural Engineering, University of Bonn, 53115 Bonn, Germany. FAU - Muller, Ute AU - Muller U AD - Physiology Unit, Institute of Animal Science, University of Bonn, 53115 Bonn, Germany. LA - eng GR - 2815710515/Bundesministerium fur Ernahrung und Landwirtschaft/ PT - Journal Article DEP - 20200710 PL - Switzerland TA - Sensors (Basel) JT - Sensors (Basel, Switzerland) JID - 101204366 SB - IM MH - Animals MH - Bayes Theorem MH - Cattle MH - Dairying MH - Female MH - Lameness, Animal/*diagnosis/*therapy MH - *Machine Learning MH - Mastitis/*diagnosis/*therapy MH - Milk MH - Sensitivity and Specificity PMC - PMC7411665 OTO - NOTNLM OT - classification OT - lameness OT - machine learning OT - mastitis OT - sensor data COIS- The authors declare no conflict of interest. EDAT- 2020/07/16 06:00 MHDA- 2021/03/25 06:00 PMCR- 2020/07/01 CRDT- 2020/07/16 06:00 PHST- 2020/04/30 00:00 [received] PHST- 2020/07/01 00:00 [revised] PHST- 2020/07/09 00:00 [accepted] PHST- 2020/07/16 06:00 [entrez] PHST- 2020/07/16 06:00 [pubmed] PHST- 2021/03/25 06:00 [medline] PHST- 2020/07/01 00:00 [pmc-release] AID - s20143863 [pii] AID - sensors-20-03863 [pii] AID - 10.3390/s20143863 [doi] PST - epublish SO - Sensors (Basel). 2020 Jul 10;20(14):3863. doi: 10.3390/s20143863.