A Hybrid Model for Temperature Prediction in a Sheep House

Animals (Basel). 2022 Oct 17;12(20):2806. doi: 10.3390/ani12202806.

Abstract

Too high or too low temperature in the sheep house will directly threaten the healthy growth of sheep. Prediction and early warning of temperature changes is an important measure to ensure the healthy growth of sheep. Aiming at the randomness and empirical problem of parameter selection of the traditional single Extreme Gradient Boosting (XGBoost) model, this paper proposes an optimization method based on Principal Component Analysis (PCA) and Particle Swarm Optimization (PSO). Then, using the proposed PCA-PSO-XGBoost to predict the temperature in the sheep house. First, PCA is used to screen the key influencing factors of the sheep house temperature. The dimension of the input vector of the model is reduced; PSO-XGBoost is used to build a temperature prediction model, and the PSO optimization algorithm selects the main hyperparameters of XGBoost. We carried out a global search and determined the optimal hyperparameters of the XGBoost model through iterative calculation. Using the data of the Xinjiang Manas intensive sheep breeding base to conduct a simulation experiment, the results show that it is different from the existing ones. Compared with the temperature prediction model, the evaluation indicators of the PCA-PSO-XGBoost model proposed in this paper are root mean square error (RMSE), mean square error (MSE), coefficient of determination (R2), mean absolute error (MAE) , which are 0.0433, 0.0019, 0.9995, 0.0065, respectively. RMSE, MSE, and MAE are improved by 68, 90, and 94% compared with the traditional XGBoost model. The experimental results show that the model established in this paper has higher accuracy and better stability, can effectively provide guiding suggestions for monitoring and regulating temperature changes in intensive housing and can be extended to the prediction research of other environmental parameters of other animal houses such as pig houses and cow houses in the future.

Keywords: XGBoost algorithm; intensive culture; particle swarm optimization; principal component analysis; temperature prediction.

Grants and funding

This paper was supported partly by the National Natural Science Foundation of China under Grant 61871475, Special Project of Laboratory Construction of Guangzhou Innovation Platform Construction Plan under Grant 201905010006, Guangzhou Key Research and Development Project under Grant 202103000033, 201903010043, Guangdong Science and Technology Planning Project under Grant 2020A1414050060, 2020B0202080002, 2016A020210122, 2015A040405014, Innovation Team Project of Universities in Guangdong Province under Grant 2021KCXTD019, Characteristic Innovation Project of Universities in Guangdong Province under Grant KA190578826, Guangdong Province Enterprise Science and Technology Commissioner Project under Grant GDKTP2021004400, Meizhou City Science and Technology Planning Project under Grant 2021A0305010, Rural Science and Technology Correspondent Project of Zengcheng District, Guangzhou City under Grant 2021B42121631, Educational Science Planning Project of Guangdong Province under Grant 2020GXJK102, 2018GXJK072, Guangdong Province Graduate Education Innovation Program Project under Grant 2022XSLT056, 2022JGXM115.