Effects of hyperparameter tuning on random forest regressor in the beef quality prediction model - Ridwan Raafi'udin; Yohanes Aris Purwanto; Imas Sukaesih Sitanggang; Dewi Apri Astuti (Computer Science and Information Technologies, 2025)
Prediction models for beef meat quality are necessary because production and consumption were significant and increasing yearly. This study aims to create a prediction model for beef freshness quality using the random forest regressor (RFR) algorithm and to improve the accuracy of the predictions using hyperparameter tuning. The use of near-infrared spectroscopy (NIRS) in predicting beef quality is an easy, cheap, and fast technique. This study used six meat quality parameters as prediction target variables for the test. The R² metric was used to evaluate the prediction results and compare the performance of the RFR with default parameters versus the RFR with hyperparameter tuning (RandomSearchCV). Using default parameters, the R-squared (R²) values for color (L*), drip loss (%), pH, storage time (hour), total plate colony (TPC in cfu/g), and water moisture (%) were 0.789, 0.839, 0.734, 0.909, 0.845, and 0.544, respectively. After applying hyperparameter tuning, these R² scores increased to 0.885, 0.931, 0.843, 0.957, 0.903, and 0.739, indicating an overall improvement in the model’s performance. The average performance increase for prediction results for all beef quality parameters is 0.0997 or 14% higher than the default parameters.