November 20, 2024 | 23:39 GMT +7

  • Click to copy
Tuesday- 09:02, 10/10/2023

Machine learning uses feeding data to detect illness in pigs

(VAN) Researchers from Finland used machine learning methods applied on feeding behaviour data to detect pigs that may be ill.
Photo: Herbert Wiiggerman

Photo: Herbert Wiiggerman

That became clear in a recent publication by researchers from the University of Helsinki and Finland’s Natural Resources Institute, which was shared in the peer-reviewed journal Biosystems Enginering.

In pig production systems, alteration in feeding behaviour can be used as an early sign of discomfort and illness. However, in a commercial farm, there is a limited time to observe and detect the individual behavioural changes to avoid delayed treatment of sick animals, economic losses, and impaired welfare. Automatic data collection using sensors and feeders provides valuable information regarding early signs of disease.

Data collection

The team collected the feeding behaviour data of 10,261 pigs (Finnish Yorkshire, Finnish Landrace, and F1-crossbred) from the central test station in Finland from 2011 to 2016. They grouped the pigs into different pens according to their arrival age, weight, and sex. Pigs were provided with water and feed ad libitum.

The researchers recorded the number of visits per day, time spent feeding per day, and daily feed intake. The illness data included symptoms such as coughing, a limp, loss of appetite, skin damage, and a bitten tail. In the machine learning models, pigs with any of the recorded symptoms were classified as “ill” for that given day. Pigs with no recorded symptoms were classified as “healthy”.

New features

The absolute values of time spent feeding per day and daily feed intake were not optimal features for predicting the illness status of pigs due to their strong relationship to the animal’s age. Therefore, the team created new features including daily ranks and residuals. Daily ranks related the rank of an animal’s observation compared to other pigs within a pen in each day. Residuals described the animals’ difference from the expected value for a pig of same age. Then, the team predicted the health status of a pig based on features including the original feeding behaviour traits and features derived using a machine learning algorithm.

They based their predictions either on the features from the same day (one-day window), from the same day and 2 previous days (3-day window), or from the same day and 6 previous days (7-day window).

Performance of the models

The researchers obtained the best performance with the model applied in the 7-day window with 67% sensitivity and 73% specificity. However, the precision was quite low. This may be due to overlooking mild symptoms by station staff during the daily routine check. In addition, low precision could be due to a highly imbalanced dataset causing biased classification in machine learning.

Behavioural changes in pigs may indicate illness. However, these changes may be rapid and indicate illness immediately or the changes may begin several days prior to illness. In this study therefore, models with various window lengths were applied to find the optimal data recording length based on the features and nature of the data. Hyperparameters are optimisation parameters that tune the performance of machine learning algorithms. The best hyperparameters were obtained based on data that was provided during training and used in prediction of the models. The sensitivity and specificity of the models were acceptable with all window lengths. In addition, increasing the window length enhanced the performance of the classification models.

The features of the model

Using features that indicate a difference in a pig’s an feeding behaviour from its pen mates (rank) or from pigs of the same age (residual) was more beneficial in predicting pig sickness than absolute values. Therefore, a deviation from a typical daily feeding time or daily feed intake compared to the feeding time and daily feed intake of an average pig at the same age is a good indication of a possible health problem. In addition, using the 7-day window model with only the best 10 important features instead of all 40 features increased model performance slightly and reduced the model’s run time.

Conclusions

The authors concluded that “pig illness is detectable by applying a machine learning algorithm to the feeding behaviour data; however, the results can be improved by calculating new features, considering interactions between features, using different window length(s), and different methods.

HD

(PP)

Small farms key to taking on hunger

Small farms key to taking on hunger

(VAN) Modest operations account for more than 90% of global food producers.

What the farmers' protest tells us about their argument with the government

What the farmers' protest tells us about their argument with the government

(VAN) The farmers' demonstration was best summed up in two images: real tractors being driven by farmers around Parliament Square, and beside them a collection of toy tractors being peddled around by their children.

FAO urges all its Members and partners to join the Global Alliance against Hunger and Poverty

FAO urges all its Members and partners to join the Global Alliance against Hunger and Poverty

(VAN) G20’s initiative is officially launched in Brazil. FAO will host the Global Alliance’s Support Mechanism.

COP29 showcases China’s progress in green transition

COP29 showcases China’s progress in green transition

(VAN) China has provided and mobilized more than 177 billion yuan of project funds since 2016 in support of other developing countries' climate response, the Xinhua News Agency reported.

US agriculture exporters fear trade war 2.0 will ‘kill’ China business

US agriculture exporters fear trade war 2.0 will ‘kill’ China business

(VAN) Mr Manuel Garibay travelled from the American north-west to Shanghai in early November, hoping to sell dried cherries to Chinese consumers.

China can help ensure future food security

China can help ensure future food security

(VAN) China's recent experience of extreme weather is a powerful reminder of the urgent need for more resilient agricultural systems.

Addressing evolving velogenic Newcastle disease virus strains

Addressing evolving velogenic Newcastle disease virus strains

(VAN)While vaccines have reduced the incidence and virulence of Newcastle disease, outbreaks are prevalent, leading to high rates of mortality and culling of infected birds, along with associated negative impacts on food_security and economic stability.

Read more