Proactive approach to finisher management
Battling wean-to-finish mortality using machine learning prediction models
By Caleb Grohmann
In the global swine industry, it is no secret that wean-to-finish mortality rates are increasing at a concerning rate. From 2019 to 2024, average wean-to-finish mortality rates have risen from 5.95% to 7.33%, according to an analysis of closeout data by Brad Eckberg, a business analyst at MetaFarms, Inc., with each consecutive year reporting a higher value than the previous (Eckberg, 2024). Not only has the average mortality rate increased, but the rising trend for groups of pigs in the 10th percentile (9.76% vs. 12.76% in 2019 and 2024, respectively) is more pronounced than the trend for the average mortality rate (Eckberg, 2024). These patterns indicate that poorer-performing farms have struggled to mitigate losses over time, highlighting the need for approaches that identify the highest-risk groups of pigs and, more specifically, the periods when increased mortality is most likely to occur.
Currently, ventilation controllers, hand-held devices and other "smart-farm" technologies enable real-time collection and visualization of environmental and production data such as temperature, water disappearance and daily mortality. These tools provide unprecedented insight into factors influencing mortality in pig barns. Additionally, this data can be used in statistical and machine learning models to forecast mortality episodes, allowing for timely intervention strategies based on these predictions.
Using statistical models to define mortality episodesDuring my Ph.D. program at the University of Missouri - Columbia, under the supervision of Jared Decker, and in collaboration with The Maschhoffs, LLC, Summit Smart Farms and Boehringer Ingelheim, we developed a novel statistical method to identify mortality episodes in commercial wean-to-finish pig barns (Grohmann et al., 2024). Mortality episodes can be defined as sequences of days (typically 5 to 21 consecutive days) where acute, sustained mortality exceeds expectations for a given age within a group of pigs.
The statistical method is based on the development of a “general mortality curve” for a unique group of pigs (e.g., room, site, barn, etc.; see Figure 1). Peaks and valleys in the general mortality curve are identified (example peak: day 11 in Figure 1; example valley: day 45 in Figure 1). Potential mortality episodes are evaluated within each consecutive valley, and mortality episodes are classified if the following criteria are met:
The average number of dead pigs per episode day is greater than or equal to one.
At least one dead pig was observed on more than or equal to half of the days in the episode.
On the next page, Figure 1 shows an example of mortality episodes identified by the above statistical method in a selected group of pigs in The Maschhoffs' production system. Green, yellow and red indicate the start, peak and end of each mortality episode, respectively. Solid points represent the general mortality curve, and hollow points represent observed daily mortality data (see Figure 1).
Mortality episodes in wean-to-finishUsing daily mortality data collected from December 2020 to October 2023 in six commercial wean-to-finish research barns across Illinois and Iowa that were owned and operated by The Maschhoffs, the statistical method described above was applied to 82 groups of pigs, which represented 10,906 daily mortality observations. Of the 10,906 observation days, only 10% were considered part of a mortality episode. However, 34% of the total number of observed dead pigs died within a mortality episode, which represented a considerable imbalance relative to similar observations on normal days.
While 90% of the total observation days were considered normal, only 66% of the total number of observed dead pigs died on those normal days. Moreover, approximately two more pigs died, on average, during mortality episodes compared to normal days. The marginal economic value of wean-to-finish mortality (i.e., the associated change in profit due to a 1% increase in mortality rate) is significant, estimated at approximately $1.04 per marketed pig according to an economic analysis of wean-to-finish mortality conducted in 2022 by Russ Euken and Lee Schulz. Thus, a notable opportunity exists to reduce overall mortality rates in the swine industry by focusing on timely intervention before a mortality episode starts.
Using predictions from machine learning modelsThe development of a reproducible method for the identification of mortality episodes is a critical first step in mitigating wean-to-finish mortality, as the previously described method produces a measurable outcome for prediction. However, these classifications only describe past trends (what “has happened”) as opposed to forecasts (“what could/will happen”), which allow time for farmers, managers and growers to devise plans to positively reduce mortality. With the wealth of data generated daily in modern pig barns, machine learning models offer an innovative approach to proactively address mortality.
Many different factors influence wean-to-finish mortality, which are usually categorized as infectious (i.e., respiratory, enteric and systemic disease) and noninfectious (i.e., environmental, management and animal factors). Each of these factors directly influences wean-to-finish mortality; however, a single factor can interact with others, forming a complex “causal web” of root causes (Gebhardt et al., 2020a; Gebhardt et al., 2020b). As mentioned previously, sensors can assist farmers in monitoring these factors, but without selecting the correct leading indicators and defining the relationship between variation in indicator variables and the likelihood of a mortality episode, the use of sensor data on-farm can be suboptimal.
The final portion of my Ph.D. program focused on utilizing daily data from ventilation controllers (high and low temperature), water flow meters (room-level water disappearance), barn monitor sheets or electronic data capture systems (treatment administration records), and SoundTalks® sensors (cough incidence) to predict the probability of mortality episodes using a machine learning algorithm, XGBoost. During the model training process, XGBoost automatically accounts for complex interactions and nonlinear relationships between and among indicator and outcome variables. We concentrated on using data collected “today” (i.e., the current production day) and from the past two days to predict the probability of a mortality episode three days in advance.
Overall, the “best” model achieved moderate accuracy, with an 87% overall accuracy rate. This was composed of a 51% true positive rate and a 92% true negative rate. However, the model also reported an 8% false positive rate, meaning that while it was conservative in predicting mortality episodes, it sometimes incorrectly flagged potential episodes. Taken together, when the model predicts a mortality episode, it is correct about 51% of the time, though farmers can be confident that the model tends to avoid predicting an episode when one is unlikely to occur.
Future of mortality predictionWhile the initial findings of this research are promising, they also highlight the importance of expanding data collection efforts across a wider range of farms and environmental conditions. The potential of machine learning models like XGBoost to predict and mitigate wean-to-finish mortality will only be fully realized with larger datasets and more comprehensive information on the factors influencing pig health and well-being and productivity. Nonetheless, potential can be converted into results by committing to proactive management.
For farmers, this means that investing in daily data collection and sensor technologies is no longer just an option, but it has become essential to stay competitive in modern swine production. By capturing daily data points related to temperature, water consumption, treatment records, cough incidence, and most importantly, mortality, producers can leverage advanced models to forecast and prevent mortality episodes before they occur. The tools are available, and as more farms adopt these technologies, the accuracy of mortality predictions will improve, helping the entire industry move toward more sustainable and profitable practices.
The future of pig farming lies in predictive analytics. Taking action today ensures that your operation is equipped to properly manage the challenges of tomorrow.
References:Eckberg, Brad. "What and When: A Deeper Look at Wean-to-Finish Mortality." National Hog Farmer, 1 Mar. 2023, . Accessed 28 Oct. 2024.
Grohmann, Caleb J., et al. "66 A Novel Analytical Method for Identifying Periods of Increased Mortality in Individual Wean-to-Finish Pig Barns." Journal of Animal Science, vol. 102, no. Supplement_2, May 2024, pp. 37–38.
Euken, Russ and Lee Schulz. "Economic Assessment of Mortality in Wean-to-Finish Production." Pork Information Gateway, U.S. Pork Center of Excellence, 12 Mar. 2021. Accessed 28 Oct. 2024
Gebhardt, Jordan T., et al. "Postweaning Mortality in Commercial Swine Production. I: Review of Non-Infectious Contributing Factors." Translational Animal Science, vol. 4, no. 2, Apr. 2020a, pp. 462–484.
Gebhardt, Jordan T., et al. "Postweaning Mortality in Commercial Swine Production II: Review of Infectious Contributing Factors." Translational Animal Science, vol. 4, no. 2, Apr. 2020b, pp. 485–506.
SoundTalks®. Boehringer Ingelheim. Accessed 28 Oct. 2024.
Grohman is a production data scientist at Carthage Innovative Swine Solutions.