PSVII-13 Prediction of feed efficiency in finishing pigs using different machine learning algorithms and growth time intervals.

Abstract Feed efficiency is a very important trait in the pig industry, but measuring it can be relatively expensive. Utilizing machine learning (ML) to predict feed efficiency can reduce measurement costs and provide valuable insights into feeding patterns. Comparing different algorithms in the ML process helps to ensure that the chosen algorithm is accurate, efficient, interpretable, and well-suited to the specific characteristics of the data. Additionally, predicting feed efficiency using different time intervals can help to identify the optimal time points for measurement, saving time and resources while ensuring accurate and effective feeding practices. For this purpose, 1,480,103 daily feed intake records from 19,591 Canadian Duroc pigs from weeks 9 to 25 of age at the growing period were used. Due to differences in the starting ages, the animal records with more than 30% missing daily records were removed before analysis. Data preprocessing included imputing missing data with the K-nearest neighbours method, removing outliers, and centering and scaling data using the R Caret Package. After data filtering and editing, the daily feed intake records of 14,325 pigs from five consecutive two-week intervals (weeks 11-12, 13-14, 15-16, 17-18, and 19-20) were used jointly with other factors (sex, dam, sire, herd-year-season, pen, common litter, starting age and weight) to predict residual feed intake (RFI) and feed conversion ratio (FCR). The performance of Decision Tree (DEC), Gradient Boosting Method (GBM), K-Nearest Neighbors (KNN), Support Vector Machines (SVM) with a linear kernel, Lasso Regression using the glmnet method (GLMNET), and Random Forest (RF) were tested to identify the best method for predicting feed efficiency using 5-fold cross-validation. Mean absolute error (MAE), root mean square error (RMSE), R², and Pearson’s correlation between predicted and actual data were used to evaluate the model performance. Overall, RF achieved the lowest MAE (0.034 for RFI, 0.037 for FCR) and the highest correlation (0.985 for RFI, 0.986 for FCR) in the training data set, demonstrating superior predictive ability. However, its testing performance declined (MAE: 0.089 for RFI, 0.095 for FCR; correlation: 0.816 for RFI, 0.852 for FCR), suggesting potential overfitting. Additionally, GBM, SVM, and GLMNET also showed strong predictive accuracy, with testing MAE values around 0.072–0.077 for RFI and 0.052–0.073 for FCR, while maintaining correlations above 0.85. In contrast, DEC and KNN exhibited higher error values for MAE and RMSE and lower correlations, highlighting the effectiveness of ensemble-based methods for this predictive task. For predicting RFI and FCR, among the scenarios with two-week intervals, weeks 17-18 were the closest to the complete data scenario. Overall, these results suggest that ensemble-based methods can be used for predicting feed efficiency in pigs, and collecting data in weeks 17-18 of age might reduce the costs of feed intake measurement.

Authors

Institutions

Publication Details

Journal
Journal of Animal Science
Published
2025-10-01
DOI
https://doi.org/10.1093/jas/skaf300.747
Primary Topic
Effects of Environmental Stressors on Livestock
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

PSVII-13 Prediction of feed efficiency in finishing pigs using different machine learning algorithms and growth time intervals.

Deborah I. Adewole, Brian Sullivan, Dan Tulpan, Younes Miar et al.
Journal of Animal Science
Effects of Environmental Stressors on Livestock
article

PSVII-13 Prediction of feed efficiency in finishing pigs using different machine learning algorithms and growth time intervals.

Deborah I. Adewole, Brian Sullivan, Dan Tulpan, Younes Miar, Laurence Maignel, Graham Stuart Plastow, Duy Ngoc, Mohsen Jafarikia, Justin W. Holl
article en

Abstract

Abstract Feed efficiency is a very important trait in the pig industry, but measuring it can be relatively expensive. Utilizing machine learning (ML) to predict feed efficiency can reduce measurement costs and provide valuable insights into feeding patterns. Comparing different algorithms in the ML process helps to ensure that the chosen algorithm is accurate, efficient, interpretable, and well-suited to the specific characteristics of the data. Additionally, predicting feed efficiency using different time intervals can help to identify the optimal time points for measurement, saving time and resources while ensuring accurate and effective feeding practices. For this purpose, 1,480,103 daily feed intake records from 19,591 Canadian Duroc pigs from weeks 9 to 25 of age at the growing period were used. Due to differences in the starting ages, the animal records with more than 30% missing daily records were removed before analysis. Data preprocessing included imputing missing data with the K-nearest neighbours method, removing outliers, and centering and scaling data using the R Caret Package. After data filtering and editing, the daily feed intake records of 14,325 pigs from five consecutive two-week intervals (weeks 11-12, 13-14, 15-16, 17-18, and 19-20) were used jointly with other factors (sex, dam, sire, herd-year-season, pen, common litter, starting age and weight) to predict residual feed intake (RFI) and feed conversion ratio (FCR). The performance of Decision Tree (DEC), Gradient Boosting Method (GBM), K-Nearest Neighbors (KNN), Support Vector Machines (SVM) with a linear kernel, Lasso Regression using the glmnet method (GLMNET), and Random Forest (RF) were tested to identify the best method for predicting feed efficiency using 5-fold cross-validation. Mean absolute error (MAE), root mean square error (RMSE), R², and Pearson’s correlation between predicted and actual data were used to evaluate the model performance. Overall, RF achieved the lowest MAE (0.034 for RFI, 0.037 for FCR) and the highest correlation (0.985 for RFI, 0.986 for FCR) in the training data set, demonstrating superior predictive ability. However, its testing performance declined (MAE: 0.089 for RFI, 0.095 for FCR; correlation: 0.816 for RFI, 0.852 for FCR), suggesting potential overfitting. Additionally, GBM, SVM, and GLMNET also showed strong predictive accuracy, with testing MAE values around 0.072–0.077 for RFI and 0.052–0.073 for FCR, while maintaining correlations above 0.85. In contrast, DEC and KNN exhibited higher error values for MAE and RMSE and lower correlations, highlighting the effectiveness of ensemble-based methods for this predictive task. For predicting RFI and FCR, among the scenarios with two-week intervals, weeks 17-18 were the closest to the complete data scenario. Overall, these results suggest that ensemble-based methods can be used for predicting feed efficiency in pigs, and collecting data in weeks 17-18 of age might reduce the costs of feed intake measurement.

Journal of Animal ScienceVol. 103(Supplement_3)
Dalhousie University (CA), University of Alberta (CA), University of Saskatchewan (CA), Improvement Service (GB), Food & Nutrition (NL), University of Guelph (CA)
Openalex Percentile: Top 69%
Effects of Environmental Stressors on Livestock
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.