Abstract:To improve the prediction accuracy of beef freshness using near-infrared (NIR) spectroscopy, we proposed a predictive model based on the combination of grid search (GS), random forest (RF) and adaptive boosting (AdaBoost). Initially, RF and AdaBoost were employed to establish a NIR spectroscopy prediction model, followed by an analysis of the prediction accuracy for total volatile base nitrogen (TVB-N) content in beef. Subsequently, the RF model, composed of multiple weak learners, was trained using the training set, and AdaBoost was used to integrate these weak learners into a strong learner through varying weights to build an ensemble model. RF was then optimized using GS to develop an AdaBoost model that integrates GS-RF as its weak learner for predicting the TVB-N content in beef. Finally, the prediction performance of the GS-RF-AdaBoost model based on NIR spectroscopy was analyzed and compared with that of the partial least square regression, RF, AdaBoost and RF-AdaBoost models. The results indicated that the GS-RF-AdaBoost model outperformed in predicting the TVB-N content in beef with the lowest root mean square error of predicyion set and the highest correlation coefficient, coefficient of determination and residual prediction deviation of predicyion set, which were 1.731, 0.969, 0.924 and 4.331, respectively. These findings confirm that integrating GS-RF-AdaBoost model based on NIR spectroscopy can effectively enhance predictive performance regarding TVB-N content in beef.