Prediction of the growth in grower-finisher pigs using biologically constrained machine learning under small-sample data conditions

Authors

  • Yue Cheng 1. School of Mechanical Engineering, Nanjing University of Science and Technology, Nanjing 210094, China
  • Yifei Tong 1. School of Mechanical Engineering, Nanjing University of Science and Technology, Nanjing 210094, China
  • Honghua Huan 2. Jiangsu Academy of Agricultural Sciences, Nanjing 210014, China

Abstract

Accurate prediction of pig growth is essential for feed planning and market decisions in precision pig farming, but farm data are often small and fragmented. To address this challenge, a biologically constrained machine learning framework is proposed to predict the time required for grower-finisher pigs to reach the target weight of 100 kg under small sample conditions. By applying biologically constrained modifications to machine learning models (SC-GAM and Monotone XGBoost), the constrained models outperformed unconstrained baselines, which achieved higher accuracy (RMSE ≤ 4.73 d, ACC±7d ≥ 92%), greater robustness, and improved biological realism. An evaluation system was developed that combines traditional accuracy indicators with biologically grounded metrics. Practical applicability was examined via an on-farm shadow test on an independent batch. The models delivered reliable predictions that support finishing scheduling and feed-related management decisions. These findings highlight the potential of biologically constrained models to improve operational efficiency and reduce resource wastage in commercial pig farming.      

Keywords: biologically constrained machine learning, pig growth prediction, small-sample data, precision livestock farming

DOI: 10.25165/j.ijabe.20261902.10243

 

Citation: Cheng Y, Tong Y F, Huan H H. Prediction of the growth in grower-finisher pigs using biologically constrained machine learning under small-sample data conditions. Int J Agric & Biol Eng, 2026; 19(2): 88–102.

References

[1] Trabachini A, Moreira M R, Harada E S, Amorim M N, Silva-Miranda K O. Precision livestock farming applied to swine farms—A systematic literature review. Animals, 2025; 15: 2138.

[2] Marić K. Smart pig farms: Integration and application of digital technologies in pig production. Agriculture, 2025; 15: 937.

[3] Zhou R, Gutzwiller A, Hua J, Weary D M, von Keyserlingk M A G, Tullo E. Data recording and use of data tools for pig health management: A review. Front Vet Sci., 2024; 11: 1490770.

[4] Wang Z, Li Q, Yu Q, Qian W, Gao R, Wang R, Wu T, Li X. A review of visual estimation research on live pig weight. Sensors, 2024; 24: 7093. DOI: 10.3390/s24217093

[5] Paudel S, de Sousa R V, Sharma S R, Brown-Brandl T. Deep learning models to predict finishing pig weight using point clouds. Animals, 2024; 14: 31.

[6] Kwon K, Park A, Lee H, Mun D. Deep learning-based weight estimation using a fast-reconstructed mesh model from the point cloud of a pig. Comput Electron Agric., 2023; 210: 107903.

[7] Pya N, Wood S N. Shape constrained additive models. Stat Comput, 2015; 25: 543–559.

[8] XGBoost Developers. XGBoost parameters. Available from: https://xgboost.readthedocs.io/en/release_3.0.0/

[9] Hasan M A, Li F, Gouverneur P, Piet A, Grzegorzek M. A comprehensive survey and comparative analysis of time series data augmentation in medical wearable computing. PLoS One, 2025; 20: e0315343.

[10] Iglesias A, Talavera E, González-Prieto A, Mozo A, Gómez-Canaval S. A survey on data augmentation for time series: Taxonomy, directions, and applications. Neurocomputing, 2023; 558: 126678.

[11] Kotelnikov A, Baranchuk D, Rubachev I, Babenko A. TabDDPM: Modelling tabular data with diffusion models. In: Proceedings of the 40th International Conference on Machine Learning (ICML 2023), PMLR, 2023; Vol. 202. Paper kotelnikov23a.

[12] Sun Q, Zhou X, Zhao S, Gao M, Zhang Q. A comprehensive survey on constrained machine learning: Approaches, models, and applications. Pattern Recognit, 2023; 141: 109529.

[13] Hu Y, Taylor G, Narayan A, Coleman E, Song Y, Sagawa S, et al. Training models that conform to a specification: A practical guide to constrained learning. In: Proceedings of the 40th International Conference on Machine Learning (ICML 2023), PMLR, 2023; pp.14397–14437.

[14] Roberts D R, Bahn V, Ciuti S, Boyce M S, Elith J, Guillera-Arroita G. Cross-validation strategies for data with temporal, spatial, hierarchical, or phylogenetic structure. Ecography, 2017; 40: 913–929.

[15] Angelopoulos A N, Bates S. A gentle introduction to conformal prediction and distribution-free uncertainty quantification. Found Trends Mach Learn, 2023; 16: 1–140.

[16] Camp Montoro J, Solà-Oriol D, Manteca X, Llonch P, Gasa J, Fàbrega E, et al. Predicting productive performance in grow-finisher pigs using birth and weaning body weight. Animals, 2020; 10: 1017.

[17] Yehoshua A, Bechar A, Cohen Y, Shmuel L, Edan Y. Dynamic sampling algorithm for agriculture-monitoring ground robot. Int J Simul Model, 2023; 22: 392–403.

[18] Cleveland W S. Robust locally weighted regression and smoothing scatterplots. J Am Stat Assoc., 1979; 74: 829–836.

[19] Cleveland W S, Devlin S J. Locally weighted regression: An approach to regression analysis by local fitting. J Am Stat Assoc., 1988; 83: 596–610.

[20] Chatfield C. Prediction intervals for the Holt-Winters forecasting procedure. J R Stat Soc Ser C App.Stat, 1978; 27: 264–279.

[21] Besteiro J, Góis Á, Madeira M, Manteca-Vilanova R, Rodríguez M R, Fernández M D. Linear and nonlinear mixed models to determine the growth of weaned piglets. Animals, 2023; 13: 2212.

[22] Che Z X, Qiao J K, Xu F J, Li X Y, Zhao Y X, Zhu M J. Integrated analysis reveals genetic basis of growth curve parameters in an F2 designed pig population based on genome and transcriptome data. Agriculture, 2024; 14(10): 1704.

[23] Henderson C R. Best linear unbiased estimation and prediction under a selection model. Biometrics, 1975; 31: 423–447.

[24] Mrode R A. Linear models for the prediction of animal breeding values. 3rd ed. Wallingford (UK), CABI, 2014.

[25] Akinyemi B E, Vigors B, Turner S P, Akaichi F, Benjamin M, Johnson A K, et al. Precision livestock farming: A qualitative exploration of opportunities and challenges for the commercial pig industry. Front Anim Sci., 2023; 4: 1150528.

[26] Valavi R, Elith J, Lahoz-Monfort J J, Guillera-Arroita G. blockCV: An R package for generating spatially or environmentally separated folds for k-fold cross-validation of species distribution models. Methods Ecol Evol., 2019; 10: 225–232.

[27] Romano Y, Patterson E, Candès E. Conformalized quantile regression. Adv Neural Inf Process Syst., 2019; 32: 3543–3553.

Downloads

Published

2026-05-21

How to Cite

(1)
Cheng, Y.; Tong, Y.; Huan, H. Prediction of the Growth in Grower-Finisher Pigs Using Biologically Constrained Machine Learning under Small-Sample Data Conditions. Int J Agric & Biol Eng 2026, 19, 88-102.

Issue

Section

Animal, Plant and Facility Systems