Novel Hybrid Prophet-Transformer-XGBoost Model for Indoor Temperature Prediction in Pig Farm

Read full text
Authors: Asim Shakeel, Chengyu Ren, Keren Wang
Cited by: 0

Abstract

Accurate prediction of the indoor temperature in pig housing facilities is vital for the optimization of environmental control and to ensure animal welfare. However, existing models struggle to capture the complex temporal data patterns in pig farm buildings. To overcome this challenge, a novel type of hybrid model is proposed, which combines the strengths of the Prophet, Transformer, and XGBoost models. The proposed framework integrates an adaptive time-delay attention block into the Transformer encoder that automatically extracts and assigns the optimal weight to the lag features. The Prophet component makes use of multiplicative seasonal decomposition in order to capture trend, seasonal, and cyclical patterns. The XGBoost component is the final predictor which makes use of its gradient boosting capabilities to train the nonlinear feature interactions. The performance of the proposed hybrid model is compared to another six machine learning models to assess its effectiveness. Experimental validation on a real-world dataset demonstrates its superior performance, achieving the R2 value of 0.97, a mean absolute error of 0.584, and a root mean squared error of 0.797. It can effectively guide the process of maximizing energy efficiency of modern livestock farms and contributes to cleaner and sustainable pig production systems.

Fields of Study & Subjects

Smart Agriculture and AI Effects of Environmental Stressors on Livestock Building Energy and Comfort Optimization

Publication details

Journal / source
Agriculture
Volume
16
Issue
5
Pages
552–552
Publication date
28 February 2026
Language
EN