Machine Learning-Based for Detecting Estrus in Dairy Cows
-
-
Abstract
To address the issues of high cost and strong subjectivity associated with manual observation in dairy cow estrus detection, as well as the high computational power consumption caused by high-dimensional model features, this study proposes a dairy cow estrus detection method based on unsupervised clustering and interpretable feature selection. The method utilizes the K-means algorithm to cluster raw activity time series data collected by neck-mounted accelerometers on dairy cows to automatically generate estrus behavior labels. Three models are compared: K-Nearest Neighbors (KNN), Support Vector Machine (SVM), and Random Forest (RF). These models are evaluated under time windows of 10 , 30 s, and 50 s. Finally, the optimal model is determined by the Friedman test and the Nemenyi post-hoc test. The Shapley Additive Explanations (SHAP) method is introduced to quantify feature contributions and screen for the key feature. The results indicate that the RF model based on a 10 s time window achieves the best performance. Through SHAP selection, the feature is reduced from 25 to 3. The performance of the dimension-reduced model shows no significant deviation, with accuracy, precision, recall, and F1 score reaching 0.9911, 0.9370, 0.9955, and 0.9654, respectively. In independent trials based on three-axis acceleration data from dairy cows, the RF model achieves an estrus detection accuracy of 0.9090 using a 10 s window following dimensionality reduction. The proposed method enables both estrus label generation and feature dimensionality reduction, while maintaining model interpretability. This provides technical support for developing low-power, long-endurance estrus monitoring devices for dairy cows.
-
-