ASABE Technical Library - Abstract
Member and Access Notice
Predicting stillbirth rates in commercial pig herds using machine learning: Random Forest, SVR, and XGBoost.
Published by the American Society of Agricultural and Biological Engineers, St. Joseph, Michigan www.asabe.org
Citation: 2026 ASABE Annual International Meeting 2601561.(doi:10.13031/aim.202601561)Authors: Serena Cosendey Toledo Mello Peixoto, Júlia Diehl Marcio, Mamunur Rahman, Isabella Cardoso Ferreira Silva Condotta, Marcos Augusto Alves Alves, Késia Oliveira Miranda
Keywords: Machine learning; Prediction; Pigs; Stillbirth.
Abstract.
Swine production is a strategic livestock sector, but reproductive inefficiencies, particularly stillbirth, remain a major constraint to productivity and economic performance in commercial systems. This study aimed to predict the number of stillborn piglets in a commercial farm using machine learning models applied to sow reproductive records. Data were collected from a farrowing unit in São Paulo, Brazil, between August and October 2024 and included 423 sows. Three input scenarios were evaluated: historical reproductive averages (A), data from the most recent farrowing (B), and the combination of both datasets (A+B). Random Forest, Support Vector Regression, and XGBoost were trained and tuned using cross-validation. Predictive performance was limited when models were trained with isolated datasets, indicating low explanatory power and reduced generalization. The combined scenario (A+B) produced the best overall performance, with moderate predictive capacity (R² approximately 0.30 to 0.35 in the test set) and more stable error patterns. Even so, variation across segmentations and signs of mild overfitting indicate that stillbirth remains difficult to model because of its multifactorial biological basis and the limited dataset size. Overall, combining historical and recent reproductive information improved predictive performance, although larger datasets and additional explanatory variables are still needed to strengthen model robustness.Therefore, the objective of this study was to predict stillbirth in a commercial swine herd using machine learning techniques applied to reproductive data from sows.
(Download PDF) (Export to EndNotes)