Abstract:Using ear temperature instead of body temperature to predict and analyze the estrus of sows. To address the issues of high cost and limited scalability in the automated detection of sow estrus, a prediction model (denoted as GA-LightGBM) was proposed based on the improved genetic algorithm (GA) optimizing the light gradient boosting machine (LightGBM). Compared with infrared cameras and infrared imaging equipment, low-cost and low-power electronic ear tags were used to collect real-time ear temperature data from sows, and an hourly average temperature resampling strategy was innovatively proposed. Comparative experiments showed that this strategy significantly reduced the risk of overfitting. To overcome the problems of slow convergence speed and falling into local optima in traditional genetic algorithms, a forced offspring iteration (FOI) mechanism was designed to improve the algorithm, enhancing the convergence efficiency while maintaining the global search capability. In experiments, a LightGBM model optimized by the particle swarm optimization (PSO) (denoted as PSO-LightGBM) was introduced for comparison. After verification using a dataset containing 311 sows provided by Zhejiang Huateng Animal Husbandry Co., Ltd., the improved GA-optimized LightGBM model (denoted as FOI-GA-LightGBM) achieved an accuracy of 83.91% and an AUC of 0.8390 on the test set, significantly outperforming the GA-LightGBM and PSO-LightGBM models. At the same time, FOI-GA-LightGBM was also compared with random forest (RF) and support vector machine (SVM) in terms of performance. The overall performance of FOI-GA-LightGBM was superior to RF and SVM.