Abstract Accurate prediction of feed intake (FI) in lactating sows is essential for precision nutrition, welfare monitoring, and sustainable production. Feed intake during lactation is influenced by a combination of physiological and environmental factors, but the complexity of individual eating behavior challenges traditional modeling approaches. Machine learning (ML) offers flexible tools to capture the nonlinear dynamics in sow feeding datasets. This study applied and evaluated multiple ML algorithms to predict daily feed intake and forecast short-term intake trends in lactating sows. Data consisted of 17,190 daily observations from 898 sows collected over an eight-week summer period (22–34 °C). Five ML algorithms were tested: Generalized Additive Model (GAM), Elastic Net, Random Forest (RF), XGBoost (XGB), and LightGBM (LGB). The dataset included environmental variables (maximum air temperature, dew point), biological factors (parity, lactation day), and behavioral features derived from historical intake (moving averages, lag variables, and intake variability). An 8:2 train-test split with sow-level cross-validation ensured independence between training and test sets, avoiding data leakage. Model performance was evaluated using R² and mean absolute error (MAE). Feature importance was assessed via Shapley additive explanation (SHAP). The GAM model achieved the highest predictive performance (R² = 0.997; MAE = 0.073 kg), corresponding to predictions within ±130 g of observed daily feed intake. Elastic Net also performed well (R² = 0.987), while the tree-based models (RF, XGB, LGB) exhibited moderate overfitting (train–test gaps of 5–13 points). All models successfully captured the characteristic FI pattern of rapid intake increase in early lactation, peaking around day 18-20 with subsequent decline. Forecasting performance remained robust for 1- to 3-days ahead (R² = 0.80–0.72; MAE = 0.74–0.86 kg) but declined beyond five days (R² = 0.52; MAE = 0.98 kg), indicating that ML models effectively capture short-term individual dynamics but gradually revert toward parity-specific averages over longer windows. Feature importance analyses revealed that recent feed intake accounted for 85% of total predictive power. The three-day moving average of intake was 3.6 times more influential than any other feature (SHAP = 1.286 vs 0.357). Behavioral variability, lag features, and intake stability followed in importance, whereas environmental and biological variables contributed 5% collectively. Models excluding historical intake showed a marked performance drop (R² = 0.73; MAE = 0.73 kg), emphasizing the critical role of continuous data collection for accurate individual-level prediction. Residual diagnostics confirmed unbiased and homoscedastic errors across lactation stages. Overall, this study demonstrates that ML, particularly GAM models, can achieve near-perfect prediction of daily feed intake when historical intake data are integrated. These findings highlight the potential of ML-driven forecasting to enable personalized, data-responsive feeding strategies in precision swine production systems.
Building similarity graph...
Analyzing shared references across papers
Loading...
Maria Victoria Souza
Purdue University West Lafayette
Alex Trentin
Purdue University West Lafayette
Qianqian Huang
Purdue University West Lafayette
Journal of Animal Science
Purdue University West Lafayette
Siga Technologies (United States)
Building similarity graph...
Analyzing shared references across papers
Loading...
Souza et al. (Wed,) studied this question.
synapsesocial.com/papers/69fed090b9154b0b82877ad4 — DOI: https://doi.org/10.1093/jas/skag107.001
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: