高级检索

    基于机器学习的奶牛发情识别方法研究

    Research on Machine Learning-Based for Detecting Estrus in Dairy Cows

    • 摘要: 针对奶牛发情监测中人工观察获取标签成本高、主观性强,以及模型特征维度高导致的计算功耗大的问题,本研究提出一种基于无监督聚类与可解释性特征选择的发情识别方法。该方法通过K-means对奶牛颈部加速度计采集的数据进行聚类,生成发情标签。通过对比K近邻(K-Nearest Neighbors, KNN)、支持向量机(Support Vector Machine, SVM)与随机森林(Random Forest, RF)3种模型在10、30 s和50 s窗口下的性能,结合Friedman检验和Nemenyi检验确定最佳模型。进一步结合沙普利加性解释(Shapely Additive Explanations, SHAP)方法量化模型特征贡献度,筛选出最优特征子集。研究结果表明,基于10 s时间窗口的随机森林模型性能最优,经SHAP方法筛选后,特征从25维降至3维,且降维后的模型性能未出现显著性差异,其准确率、精确率、召回率和F1分数分别达0.99110.93700.99550.9654。在基于奶牛三轴加速度数据的独立泛化试验中,降维后10 s窗口的RF模型的发情检出准确率达0.9090。本研究提出的方法实现了发情标签的生成与特征的降维,且模型具有可解释性,为研发低功耗、长续航的奶牛发情监测设备提供了技术支撑。

       

      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 utilized the K-means algorithm to cluster raw activity time series data collected by neck-mounted accelerometer on dairy cows to automatically generate estrus behavior labels. The study compared three models: K-Nearest Neighbors (KNN), Support Vector Machine (SVM), and Random Forest (RF). These models were evaluated under time windows of 10 s, 30 s, and 50 s. Finally, the optimal model was determined by the Friedman test and the Nemenyi post-hoc test. And the Shapley Additive Explanations (SHAP) method was introduced to quantify feature contributions and screen for the key feature. The results indicated that the RF model based on a 10 s time window is the best. Through SHAP selection, the feature was reduced from 25 to 3. The performance of the dimension-reduced model showed 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 achieved an estrus detection accuracy of 0.9090 using a 10-second window following dimensionality reduction. The proposed method enables both estrus label generation and feature dimensionality reduction, whilst maintaining model interpretability. This provides technical support for developing low-power, long-endurance estrus monitoring devices for dairy cows.

       

    /

    返回文章
    返回