December 23, 2024 | 18:54 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)

US poultry sector prepares for mass deportations

US poultry sector prepares for mass deportations

(VAN) The US poultry processing industry has long relied on illegal workers, but huge adjustments are going to have to be made after President-elect Donald Trump takes power on 20 January 2025.

The future is dry: Why soil is the sexiest climate solution

The future is dry: Why soil is the sexiest climate solution

(VAN) Drought is projected to affect 75% of the world's population by 2050. Take that in.

Environmentalists call for a revision of poultry welfare standards

Environmentalists call for a revision of poultry welfare standards

(VAN) Voice of Animals, a Russian NGO, has prepared amendments to the draft veterinary regulation in the poultry industry, which is scheduled to come into force on 1 August 2025.

Hunger in the Arab region reaches a new height as challenges intensify

Hunger in the Arab region reaches a new height as challenges intensify

(VAN) From the FAO Regional Office for the Near East and North Africa.

A year of change for the UK poultry industry

A year of change for the UK poultry industry

(VAN) A year of change for both the UK’s broiler and egg sectors is highlighted in this year’s Andersons annual Outlook report.

Incredible results of pairing solar panels with agriculture:'We were able to get more from the land'

Incredible results of pairing solar panels with agriculture:'We were able to get more from the land'

(VAN) Agriculture is a necessary part of human existence; on a global scale, unfortunately, it contributes to the climate crisis.

How the Amazon's 'Boiling River' foreshadows a warmer world

How the Amazon's 'Boiling River' foreshadows a warmer world

(VAN) The Boiling River regularly reaches 86oC - with drastic consequences for the surrounding rainforest.

Read more