This study compares the performance of XGBoost and LightGBM models for predicting live weights of Yucatecan Criollo pigs from biometric measurements and examines the structural and algorithmic differences that affect model fit. Detailed analysis of the models’ hyperparameter optimization and variable importance revealed how each model approaches the data and prioritizes features. This study was conducted on 182 Yucatecan Criollo pigs (134 females and 48 males). When model performances were evaluated, the XGBoost model showed superior prediction performance with acceptable accuracy and lower error rates in the test dataset, with R2 = 0.905, RMSE = 5.704, and MAE = 3.636. In contrast, the LightGBM model produced acceptable results under certain hyperparameter combinations with R2 = 0.824, RMSE = 7.772, and MAE = 5.505. While the robust performance of both models requires strategic decisions in model selection and optimization, it is recommended to consider the dataset’s nature in feature selection and hyperparameter settings. This study provides important insights for simplifying the model and improving its efficiency in machine learning applications, and serves as a reference for more effective model use.
Sierra-Vásquez et al. (Wed,) studied this question.