Application of XGBoost and Random Forest algorithms for body weight prediction in Blackbelly sheep using biometric measurements

Reliable and cost-effective live weight determination is critical for improving both management and selection efficiency in small-scale sheep farming. In recent years, machine learning approaches based on phenotypic biometric measurements have emerged as a practical alternative for producers with limited access to weighing infrastructure. This study aimed to compare the performance of two machine learning algorithms (XGBoost and Random Forest) for estimating live weight based on biometric measurements in Blackbelly sheep (60 females, 60 males) raised in humid tropical climates. Using the obtained biometric measurements, both algorithms were evaluated separately for training and test sets. The XGBoost algorithm demonstrated high accuracy on the training data (R2 = 0.981; MSE = 0.416; RMSE = 0.645; MAE = 0.486; AIC = 150.513 and BIC = 157.841) but had limited generalization to the test data (R2 = 0.813; MSE = 3.296; RMSE = 1.816; MAE = 1.440; AIC = 146.125 and BIC = 150.791). In contrast, the Random Forest algorithm produced more balanced and stable predictions on both training (R2 = 0.969; MSE = 0.630; RMSE = 0.794; MAE = 0.617; AIC = -31.230 and BIC = -21.459) and test data (R2= 0.873; MSE = 2.188; RMSE = 1.479; MAE = 1.105; AIC = 35.401 and BIC = 41.623). Optimal hyperparameters were determined for both models, and model fit criteria were compared. The results revealed that Random Forest offers a more reliable and stable option for estimating live weight. The current study demonstrates that machine learning models based on phenotypic biometric measurements can be used in decision-support processes in small-scale sheep farming operations. The Random Forest algorithm stands out as a suitable tool for improving production and selection efficiency in live weight estimation. Furthermore, validation studies encompassing different sheep breeds and larger data sets will strengthen the reliability and generalizability of the developed models.

Authors

Institutions

Publication Details

Journal
BMC Veterinary Research
Published
2026-03-05
DOI
https://doi.org/10.1186/s12917-026-05349-3
Primary Topic
Animal Behavior and Welfare Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Application of XGBoost and Random Forest algorithms for body weight prediction in Blackbelly sheep using biometric measurements

Hilal Tozlu Çelık, Kadyrbai Chekirov, Hasan Önder, Rosa Inés Parra-Cortés et al.
BMC Veterinary Research
Animal Behavior and Welfare Studies
article

Application of XGBoost and Random Forest algorithms for body weight prediction in Blackbelly sheep using biometric measurements

Hilal Tozlu Çelık, Kadyrbai Chekirov, Hasan Önder, Rosa Inés Parra-Cortés, Dany Alejandro Dzib-Cauich, Cem Tırınk, O. Odu, M. A. Segura Delgado, Enrique Camacho-Perez, Alfonso Juventino Chay-Canul, Ignacio Vázquez Martínez, Uğur Şen, Armando Gomez-Vazquez, Yüksel Aksoy, Aldenamar Cruz-Hernandez
article en

Abstract

Reliable and cost-effective live weight determination is critical for improving both management and selection efficiency in small-scale sheep farming. In recent years, machine learning approaches based on phenotypic biometric measurements have emerged as a practical alternative for producers with limited access to weighing infrastructure. This study aimed to compare the performance of two machine learning algorithms (XGBoost and Random Forest) for estimating live weight based on biometric measurements in Blackbelly sheep (60 females, 60 males) raised in humid tropical climates. Using the obtained biometric measurements, both algorithms were evaluated separately for training and test sets. The XGBoost algorithm demonstrated high accuracy on the training data (R2 = 0.981; MSE = 0.416; RMSE = 0.645; MAE = 0.486; AIC = 150.513 and BIC = 157.841) but had limited generalization to the test data (R2 = 0.813; MSE = 3.296; RMSE = 1.816; MAE = 1.440; AIC = 146.125 and BIC = 150.791). In contrast, the Random Forest algorithm produced more balanced and stable predictions on both training (R2 = 0.969; MSE = 0.630; RMSE = 0.794; MAE = 0.617; AIC = -31.230 and BIC = -21.459) and test data (R2= 0.873; MSE = 2.188; RMSE = 1.479; MAE = 1.105; AIC = 35.401 and BIC = 41.623). Optimal hyperparameters were determined for both models, and model fit criteria were compared. The results revealed that Random Forest offers a more reliable and stable option for estimating live weight. The current study demonstrates that machine learning models based on phenotypic biometric measurements can be used in decision-support processes in small-scale sheep farming operations. The Random Forest algorithm stands out as a suitable tool for improving production and selection efficiency in live weight estimation. Furthermore, validation studies encompassing different sheep breeds and larger data sets will strengthen the reliability and generalizability of the developed models.

BMC Veterinary Research
University of Ibadan (NG), Ondokuz Mayıs University (TR), Instituto Tecnológico Superior de Xalapa (MX), University of Applied and Environmental Sciences (CO), Iğdır Üniversitesi (TR), Autonomous University of Yucatán (MX), Kyrgyz-Türkish Manas Üniversity (KG), Eskişehir Osmangazi University (TR), Ordu University (TR), Universidad Juárez Autónoma de Tabasco (MX)
Openalex Percentile: Top 32%
Animal Behavior and Welfare Studies
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.