Using Sow Farm Data and Machine Learning to Predict Nursery Mortality

  • | Mateus de Castro Duarte Cardoso

Mateus Cardoso is a research assistant and master’s student in Bioinformatics and Computational Biology at Iowa State University. With a background in computer engineering, he works with the SwinalytIQ team to develop machine learning models that support earlier and more informed decisions in swine production.

Image
Mateus Cardoso headshot
Mateus Cardoso

Nursery mortality is costly, complex, and often recognized only after losses have already begun. Visible clinical signs may not appear until a health or management problem is well established, and in large production systems, the costs can add up quickly. 

The SwinalytIQ team at Iowa State University is evaluating whether information already collected at sow farms can estimate a group’s mortality rate in the nursery prior to visible signs of declining health. The goal is to estimate a nursery group’s mortality risk at or before weaning, or approximately 60 days before the end of the nursery period. This estimate will help producers focus attention and resources on the groups most likely to experience problems.

Building the model

To build a predictive model, records were collected from 2,025 commercial weaning groups. Data included sow farm health information such as porcine reproductive and respiratory syndrome (PRRS), Mycoplasma pneumonia and porcine epidemic diarrhea (PED) status, as well as reproductive and production measures including abortion rate, total pigs born, stillbirths, mummies and wean-to-service intervals. These variables were used to train machine learning models to search for combinations of factors associated with nursery mortality. 

Predictions from multiple algorithms were combined into a single model. Different models identify different patterns and produce different types of errors, so combining them produced more reliable estimates than using the models individually. In an independent test, the final calibrated model achieved a correlation of 0.672 between predicted and observed mortality and correctly identified approximately 82% of the groups.

Image
machine learning data input and output graphic from piglet birth to end of nursery
Graphic illustrating the forecasting workflow from birth through weaning until the end of the nursery period: Multiple types of data from the sow farm including reproductive performance, management, health and disease, production and movement information are integrated into the machine learning model to generate a morality prediction at weaning. The prediction is a continuous estimate of expected mortality at the end of the nursery period, or approximately 60 days post-weaning. 

Producer impact

For producers, the benefit provided by the model is not simply knowing which groups may have higher mortality, but rather having that information early enough to act.

Instead of applying the same level of intervention to every group, farms could direct labor and veterinary resources toward groups of pigs predicted to have the greatest need. Knowing the expected level of mortality could trigger closer observation after placement, additional diagnostic testing, review of vaccination or treatment plans, reinforcement of biosecurity practices, environmental checks, or adjustments in staffing and feed-management strategies. 

The financial benefits will vary among farms, but the principle is straightforward. Preventing even a small number of deaths conserves the production costs already invested in each pig through breeding, farrowing, feed, labor, transportation and healthcare. Earlier identification of groups predicted to experience greater mortality may also reduce emergency treatments, improve labor efficiency and limit the performance losses that often accompany disease challenges.

Future use and development

Machine learning models can help producers transition from reacting to nursery mortality to anticipating it, while utilizing data that they are already collecting. This technology is not intended to replace stockmanship or veterinary judgment but instead offers an additional layer of information.  

As more data becomes available, the SwinalytIQ team will continue evaluating and refining the model to improve its reliability and determine how it can best support decision-making across production systems. Data from additional farms will be used to determine how consistently the model performs across different health conditions, management practices, and levels of data quality. Readers interested in learning more about the project can contact Mateus Cardoso at duarte@iastate.edu.


Contacts

Mateus Cardoso, Graduate Student and Research Assistant, duarte@iastate.edu.

Edison Magalhaes, Animal Science Assistant Professor, edison@iastate.edu

Marta Grant, Iowa Pork Industry Center Communications, mmgrant@iastate.edu