Stocktake Sale on now: wide range of books at up to 70% off!
Register      Login
Animal Production Science Animal Production Science Society
Food, fibre and pharmaceuticals from animals
RESEARCH ARTICLE

Predicting weaning weight in Hair goat kids: a comparative analysis of tree-based machine learning approaches using environmental and herd data

Necati Esener https://orcid.org/0000-0002-2773-3234 A * and Yavuz Kal A
+ Author Affiliations
- Author Affiliations

A Bahri Dagdas International Agricultural Research Institute, Konya, Türkiye.

* Correspondence to: necati.esener@tarimorman.gov.tr

Handling Editor: Karen Harper

Animal Production Science 65, AN24154 https://doi.org/10.1071/AN24154
Submitted: 9 May 2024  Accepted: 19 May 2025  Published: 10 June 2025

© 2025 The Author(s) (or their employer(s)). Published by CSIRO Publishing

Abstract

Context

The study addresses the need for reliable predictive models to estimate weaning weight in Hair goat kids. Given the importance of weaning weight in livestock management and the evolving landscape of goat farming, this study explores new methodologies to enhance prediction accuracy.

Aims

The primary aim is to investigate the use of tree-based machine learning approaches for early prediction of weaning weight in Hair goat kids. Specifically, this study intends to assess the efficacy of various tree-based algorithms and evaluate their performance using key metrics.

Methods

The study employed multiple tree-based ensemble machine learning algorithms, including bootstrap aggregating (bagging) with random forest and extremely randomized trees, as well as boosting techniques, such as extreme gradient boosting, categorical boosting and light gradient boosting machine. The dataset comprised animal records, herd features and external factors like weather and geographical variables. Model performance was assessed using the coefficient of determination (R2), adjusted coefficient of determination (Adj-R2), mean absolute percentage error, mean absolute error and mean squared error.

Key results

All tree-based ensemble models performed notably, with R2 and Adj-R2 scores ranging between 0.78 and 0.80, mean absolute percentage error score of 0.14, mean absolute error scores between 2.19 and 2.13, and mean squared error scores between 7.80 and 8.36. A key finding was the significant role played by external data, including weather variables (temperature, dew, humidity) and grassland-related features (elevation, longitude, latitude) in predicting weaning weight. This demonstrates that incorporating diverse environmental factors into predictive models can yield accurate results.

Conclusions

The results highlight the success of tree-based ensemble machine learning approaches in predicting weaning weight in Hair goat kids. The inclusion of a broader range of data, particularly environmental factors, contributed to the accuracy of these models.

Implications

The study’s findings offer valuable insights for goat farmers and breeders. The demonstrated effectiveness of machine learning applications provides a pathway for enhanced production management and decision-making, especially in response to changing climate conditions. This research marks a significant advancement in the precision and applicability of predictive models within goat production systems.

Keywords: climate change, early prediction of weaning weight, ensemble machine learning, geographical data, goat breeding, Hair goat kids, livestock management, weather variables.

References

Abdel-Mageed I, Ghanem N (2013) Predicting body weight and longissimus muscle area using body measurements in subtropical goat kids. Egyptian Journal of Sheep and Goat Sciences 8(1), 95-100.
| Crossref | Google Scholar |

Acar R, Koc N, Celik SA, Direk M (2016) The some grasses forage crops grown in arid rangeland of the central anatolian and properties of these plants. In ‘3rd International Conference on Sustainable Agriculture and Environment (3rd ICSAE)’. pp. 26–28. (Eğitim Yayınevi)

Adhianto K, Harris I (2020) Prediction of body weight through body measurements in Boerawa (Boer× Etawah crossbred) bucks at Tanggamus Regency of Indonesia. Bulgarian Journal of Agricultural Science 20(6), 1273-1279.
| Google Scholar |

Aguirre-Gutiérrez CA, Holwerda F, Goldsmith GR, Delgado J, Yepez E, Carbajal N, Escoto-Rodríguez M, Arredondo JT (2019) The importance of dew in the water balance of a continental semiarid grassland. Journal of Arid Environments 168, 26-35.
| Crossref | Google Scholar |

Alibrahim H, Ludwig SA (2021) Hyperparameter optimization: comparing genetic algorithm against grid search and bayesian optimization. In ‘2021 IEEE Congress on Evolutionary Computation (CEC)’. pp. 1551–1559. (IEEE)

Alkoyak K, Güngör I (2022) Effects of environmental factors on growth and survival and certain reproductive traits of hair goats. Journal of Animal and Plant Sciences 32(6), 1527-1534.
| Crossref | Google Scholar |

Altay Y (2022) Prediction of the live weight at breeding age from morphological measurements taken at weaning in indigenous Honamli kids using data mining algorithms. Tropical Animal Health and Production 54(3), 172.
| Crossref | Google Scholar |

Atac FE, Burcu H (2014) The importance of hair goats in Turkey. Journal of Agricultural Science and Technology 4(4), 364-369.
| Google Scholar |

Atac FE, Takma Ç, Gevrekci Y, Öziş Altincekic Ş (2022) Prediction of marketing live weights in Hair goat kids using artificial neural network. Kafkas Üniversitesi Veteriner Fakültesi Dergisi 28(6), 739-746.
| Google Scholar |

Benyi K, Norris D, Karbo N, Kgomo KA (2006) Effects of genetic and environmental factors on pre-weaning and post-weaning growth in West African crossbred sheep. Tropical Animal Health and Production 38(7), 547-554.
| Crossref | Google Scholar |

Berhe WG (2017) Relationship and prediction of body weight from morphometric traits in Maefur goat population in Tigray, Northern Ethiopia. Journal of Biometrics & Biostatistics 8(5), 370.
| Crossref | Google Scholar |

Breiman L (1996) Bagging predictors. Machine Learning 24, 123-140.
| Crossref | Google Scholar |

Breiman L (2001) Random forests. Machine Learning 45(1), 5-32.
| Crossref | Google Scholar |

Breiman L, Friedman J, Stone CJ, Olshen RA (1984) ‘Classification and regression trees.’ (CRC Press)

Cam MA, Olfaz M, Soydan E (2010) Possibilities of using morphometrics characteristics as a tool for body weight prediction in Turkish Hair Goats (Kilkeci). Asian Journal of Animal and Veterinary Advances 5(1), 52-59.
| Crossref | Google Scholar |

Cawley GC, Talbot NLC (2010) On over-fitting in model selection and subsequent selection bias in performance evaluation. Journal of Machine Learning Research 11(Jul), 2079-2107.
| Google Scholar |

Ceyhan A, Cinar M, Serbester U (2022) Kid growth performance and reproductive characteristics of Hair goats raised under breeder conditions. Turkish Journal of Veterinary & Animal Sciences 46(4), 592-598.
| Crossref | Google Scholar |

Chen T, Guestrin C (2016) Xgboost: a scalable tree boosting system. In ‘Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining’. pp. 785–794. (Association for Computing Machinery)

Cheng M, McCarl B, Fei C (2022) Climate change and livestock production: a literature review. Atmosphere 13(1), 140.
| Crossref | Google Scholar |

Daskiran I, Savas T, Koyuncu M, Koluman N, Keskin M, Esenbuga N, Konyali A, Cemal İ, Gül S, Elmaz O, Kosum N, Dellal G, Bingöl M (2018) Goat production systems of Turkey: nomadic to industrial. Small Ruminant Research 163, 15-20.
| Crossref | Google Scholar |

Erduran H, Esener N, Keskin İ, Dağ B (2024) Machine learning-based early prediction of growth and morphological traits at yearling age in pure and hybrid goat offspring. Tropical Animal Health and Production 56(8), 262.
| Crossref | Google Scholar |

Esener N, Maciel-Guerra A, Giebel K, Lea D, Green MJ, Bradley AJ, Dottorini T (2021) Mass spectrometry and machine learning for the accurate diagnosis of benzylpenicillin and multidrug resistance of Staphylococcus aureus in bovine mastitis. PLOS Computational Biology 17(6), e1009108.
| Crossref | Google Scholar |

Eyduran E, Waheed A, Ahmad S, Tariq MM, Iqbal F (2013) Prediction of live weight from morphological characteristics of commercial goat in Pakistan using factor and principal component scores in multiple linear regression. The Journal of Animal & Plant Sciences 23(6), 1532-1540.
| Google Scholar |

Eyduran E, Zaborski D, Waheed A, Celik S, Karadas K, Grzesiak W (2017) Comparison of the predictive capabilities of several data mining algorithms and multiple linear regression in the prediction of body weight by means of body measurements in the indigenous Beetal goat of Pakistan. Pakistan Journal of Zoology 49(1), 257-265.
| Crossref | Google Scholar |

FAO (2022) Production database. Available at https://www.fao.org/faostat/en/#data/QCL [accessed: 30 January 2024]

Freetly HC, Kuehn LA, Thallman RM, Snelling WM (2020) Heritability and genetic correlations of feed intake, body weight gain, residual gain, and residual feed intake of beef cattle as heifers and cows. Journal of Animal Science 98(1), skz394.
| Crossref | Google Scholar |

Friedman JH (2001) Greedy function approximation: a gradient boosting machine. The Annals of Statistics 29, 1189-1232.
| Crossref | Google Scholar |

Geurts P, Ernst D, Wehenkel L (2006) Extremely randomized trees. Machine Learning 63(1), 3-42.
| Crossref | Google Scholar |

Hamadani A, Ganai NA (2023) Artificial intelligence algorithm comparison and ranking for weight prediction in sheep. Scientific Reports 13(1), 13242.
| Crossref | Google Scholar |

Hamadani A, Ganai NA, Mudasir S, Shanaz S, Alam S, Hussain I (2022) Comparison of artificial intelligence algorithms and their ranking for the prediction of genetic merit in sheep. Scientific Reports 12(1), 18726.
| Crossref | Google Scholar |

Iqbal M, Javed K, Ahmad N (2013) Prediction of body weight through body measurements in Beetal goats. Pakistan Journal of Science 65, 458-461.
| Crossref | Google Scholar |

Iqbal F, Waheed A, Zil-e-Huma , Faraz A (2022) Comparing the predictive ability of machine learning methods in predicting the live body weight of beetal goats of Pakistan. Pakistan Journal of Zoology 54(1), 231-238.
| Crossref | Google Scholar |

Johnson JS (2018) Heat stress: impact on livestock well-being and productivity and mitigation strategies to alleviate the negative effects. Animal Production Science 58(8), 1404-1413.
| Crossref | Google Scholar |

Karadavut U, Yıldız Ş, Kökten K, Bakoğlu A (2015) Relationships between fertilizer application and nutritional values of plants in natural pastures. Range Management and Agroforestry 36, 13-18.
| Google Scholar |

Ke G, Meng Q, Finley T, Wang T, Chen W, Ma W, Ye Q, Liu T-Y (2017) LightGBM: a highly efficient gradient boosting decision tree. In ‘31st Conference on Neural Information Processing Systems (NIPS 2017)’, Long Beach, CA, USA. (Curran Associates, Inc.) Available at https://proceedings.neurips.cc/paper_files/paper/2017/file/6449f44a102fde848669bdd9eb6b76fa-Paper.pdf

Keskin M, Gül S, Biçer O, Daşkiran İ (2017) Some reproductive, lactation, and kid growth characteristics ofKilis goats under semiintensive conditions. Turkish Journal of Veterinary and Animal Sciences 41(2), 248-254.
| Crossref | Google Scholar |

Khorshidi-Jalali M, Mohammadabadi MR, Esmailizadeh A, Barazandeh A, Babenko OI (2019) Comparison of artificial neural network and regression models for prediction of body weight in Raini Cashmere goat. Iranian Journal of Applied Animal Science 9, 453-461.
| Google Scholar |

Koluman N (2023) Goats and their role in climate change. Small Ruminant Research 228, 107094.
| Crossref | Google Scholar |

Koluman N, Durmuş M, Güngör İ (2024) Improving reproduction and growth characteristics of indegenous goats in smallholding farming system. Ciência Rural 54, e20230028.
| Crossref | Google Scholar |

Kurşun G, Dengiz O (2020) Assessment of land suitability for the production of major crops in Ayrancı district of Karaman province located at arid terrestrial ecosystem. Eurasian Journal of Soil Science 9(1), 24-33.
| Crossref | Google Scholar |

Li X, Wu J, Zhao Z, Zhuang Y, Sun S, Xie H, Gao Y, Xiao D (2023) An improved method for broiler weight estimation integrating multi-feature with gradient boosting decision tree. Animals 13(23), 3721.
| Crossref | Google Scholar |

Lu CD (1989) Effects of heat stress on goat production. Small Ruminant Research 2(2), 151-162.
| Crossref | Google Scholar |

Lundberg SM, Lee S-I (2017) A unified approach to interpreting model predictions. In ‘31st Conference on Neural Information Processing Systems (NIPS 2017)’, Long Beach, CA, USA. (Curran Associates, Inc.) Available at https://proceedings.neurips.cc/paper_files/paper/2017/file/8a20a8621978632d76c43dfd28b67767-Paper.pdf

Maciel-Guerra A, Esener N, Giebel K, Lea D, Green MJ, Bradley AJ, Dottorini T (2021) Prediction of Streptococcus uberis clinical mastitis treatment success in dairy herds by means of mass spectrometry and machine-learning. Scientific Reports 11(1), 7736.
| Crossref | Google Scholar |

Nair MRR, Sejian V, Silpa MV, Fonsêca VFC, de Melo Costa CC, Devaraj C, Krishnan G, Bagath M, Nameer PO, Bhatta R (2021) Goat as the ideal climate-resilient animal model in tropical environment: revisiting advantages over other livestock species. International Journal of Biometeorology 65, 2229-2240.
| Crossref | Google Scholar | PubMed |

Neethirajan S (2020) The role of sensors, big data and machine learning in modern animal farming. Sensing and Bio-Sensing Research 29, 100367.
| Crossref | Google Scholar |

Nuntapaitoon M, Buranakarl C, Thammacharoen S, Katoh K (2021) Growth performance of Black Bengal, Saanen, and their crossbred F1 as affected by sex, litter size, and season of kidding. Animal Science Journal 92(1), e13571.
| Crossref | Google Scholar |

Pachauri RK, Allen MR, Barros VR, Broome J, Cramer W, Christ R, Church JA, Clarke L, Dahe Q, Dasgupta P (2014) Climate change 2014: synthesis report. Contribution of Working Groups I, II and III to the fifth assessment report of the Intergovernmental Panel on Climate Change. IPCC.

Peña F, Bonvillani A, Freire B, Juárez M, Perea J, Gómez G (2009) Effects of genotype and slaughter weight on the meat quality of Criollo Cordobes and Anglonubian kids produced under extensive feeding conditions. Meat Science 83(3), 417-422.
| Crossref | Google Scholar | PubMed |

Prokhorenkova L, Gusev G, Vorobev A, Dorogush AV, Gulin A (2018) CatBoost: unbiased boosting with categorical features. In ‘Proceedings of the 32nd International Conference on Neural Information Processing Systems’, Montréal, Canada. (Curran Associates, Inc.) Available at https://proceedings.neurips.cc/paper_files/paper/2018/file/14491b756b3a51daac41c24863285549-Paper.pdf

Rashijane LT, Mokoena K, Tyasi TL (2023) Using multivariate adaptive regression splines to estimate the body weight of savanna goats. Animals 13(7), 1146.
| Crossref | Google Scholar |

Ritter F, Berkelhammer M, Beysens D (2019) Dew frequency across the US from a network of in situ radiometers. Hydrology and Earth System Sciences 23(2), 1179-1197.
| Crossref | Google Scholar |

Ruchay A, Gritsenko S, Ermolova E, Bochkarev A, Ermolov S, Guo H, Pezzuolo A (2022a) A Comparative study of machine learning methods for predicting live weight of duroc, landrace, and yorkshire pigs. Animals 12(9), 1152.
| Crossref | Google Scholar |

Ruchay A, Kober V, Dorofeev K, Kolpakov V, Dzhulamanov K, Kalschikov V, Guo H (2022b) Comparative analysis of machine learning algorithms for predicting live weight of Hereford cows. Computers and Electronics in Agriculture 195, 106837.
| Crossref | Google Scholar |

Saatci M, Ap Dewi I, Ulutas Z (1999) Variance components due to direct and maternal effects and estimation of breeding values for 12-week weight of Welsh Mountain lambs. Animal Science 69(2), 345-352.
| Crossref | Google Scholar |

Salama AAK, Contreras-Jodar A, Love S, Mehaba N, Such X, Caja G (2020) Milk yield, milk composition, and milk metabolomics of dairy goats intramammary-challenged with lipopolysaccharide under heat stress conditions. Scientific Reports 10(1), 5055.
| Crossref | Google Scholar |

Sañudo C, Campo MM, Muela E, Olleta JL, Delfa R, Jiménez-Badillo R, Alcalde MJ, Horcada A, Oliveira I, Cilla I (2012) Carcass characteristics and instrumental meat quality of suckling kids and lambs. Spanish Journal of Agricultural Research 10, 690-700.
| Crossref | Google Scholar |

Sarini NP, Dharmawan K (2023) Estimation of Bali cattle body weight based on morphological measurements by machine learning algorithms: random forest, support vector, K-Neighbors, and extra tree regression. Journal of Advanced Zoology 44(3), 1-9.
| Crossref | Google Scholar |

Silanikove N (2000) Effects of heat stress on the welfare of extensively managed domestic ruminants. Livestock Production Science 67(1-2), 1-18.
| Crossref | Google Scholar |

TurkStat (2022) Animal production statistics in Türkiye. Available at https://data.tuik.gov.tr/Bulten/DownloadIstatistikselTablo?p=3meVTlCDY4ZDyrmi8wVTBYdv4nXvOQ6Lu7JuJZEtM1qCf/EhKixVS4aft1zQOLrw [accessed 01 February 2024]

Yilmaz A, Ekiz B, Ozcan M, Kaptan C, Hanoglu H, Yildirir M, Kocak O (2010) Carcass quality characteristics of Hair Goat and Saanen× Hair Goat crossbred kids from intensive production system. Journal of Animal and Feed Sciences 19(3), 368-378.
| Crossref | Google Scholar |

Yilmaz O, Kor A, Ertugrul M, Wilson RT (2012) The domestic livestock resources of Turkey: goat breeds and types and their conservation status. Animal Genetic Resources 51, 105-116.
| Crossref | Google Scholar |