Palm oil production is a strategic commodity in global trade, with a trend showing an increase from year to year. This study aims to optimize the Random Forest algorithm in predicting the amount of global palm oil production based on historical data. The dataset used consists of 12,458 observations with one dependent variable (Palm_Oil_00002577_) representing the amount of palm oil production, and four independent variables: country, Code, Year, and Palm_Oil_00002577_log. The data is divided into 80% for training (9,966 observations) and 20% for testing (2,492 observations). The model optimization process is carried out by adjusting the key parameters of Random Forest using Grid Search and Cross-Validation. The initial Random Forest model (without optimization) produces a Root Mean Squared Error (RMSE) value of 115.27 and an R-squared (R²) value of 0.9824 on the test data. After optimization using Grid Search and Cross-Validation on key parameters (n_estimators, max_depth, and max_features), the optimized model showed significant performance improvements, with the RMSE decreasing to 103.54 and the R² increasing to 0.9984. The decrease in the RMSE indicates a reduction in the model's average prediction error, while the increase in R² approaching 1 indicates the model's ability to explain almost all of the variation in global palm oil production data. These results indicate that parameter optimization in Random Forest can substantially improve prediction accuracy, enabling the model to be used as a production planning tool and strategic decision-making tool in the palm oil commodity trading sector.
Copyrights © 2025