A new prediction model based on deep learning for pig house environment

Sci Rep. 2024 Dec 28;14(1):31141. doi: 10.1038/s41598-024-82492-7.

Abstract

A prediction model of the pig house environment based on Bayesian optimization (BO), squeeze and excitation block (SE), convolutional neural network (CNN) and gated recurrent unit (GRU) is proposed to improve the prediction accuracy and animal welfare and take control measures in advance. To ensure the optimal model configuration, the model uses a BO algorithm to fine-tune hyper-parameters, such as the number of GRUs, initial learning rate and L2 normal form regularization factor. The environmental data are fed into the SE-CNN block, which extracts the local features of the data through convolutional operations. The SE block further learns the weights of the feature channels, highlights the important features and suppresses the unimportant ones, improving the feature discrimination ability. The extracted local features are fed into the GRU network to capture the long-term dependency in the sequence, and this information is used to predict future values. The indoor environmental parameters of the pig house are predicted. The prediction performance is evaluated through comparative experiments. The model outperforms other models (e.g., CNN-LSTM, CNN-BiLSTM and CNN-GRU) in predicting temperature, humidity, CO2 and NH3 concentrations. It has higher coefficient of determination (R2), lower mean absolute error (MSE), and mean absolute percentage error (MAPE), especially in the prediction of ammonia, which reaches R2 of 0. 9883, MSE of 0.03243, and MAPE of 0.01536. These data demonstrate the significant advantages of the BO-SE-CNN-GRU model in prediction accuracy and stability. This model provides decision support for environmental control of pig houses.

Keywords: Bayesian optimization algorithm; Convolutional neural network; Environmental prediction model; Gated recurrent unit; Pig house; Squeeze and excitation.

MeSH terms

  • Algorithms
  • Ammonia / analysis
  • Animal Welfare
  • Animals
  • Bayes Theorem
  • Deep Learning*
  • Housing, Animal*
  • Neural Networks, Computer
  • Swine
  • Temperature

Substances

  • Ammonia