Palm oil production is influenced by various factors, such as plant age, land area, the number of productive trees, and fertilizer usage. Production fluctuations make it difficult for companies to formulate optimal plans for production, distribution, and fertilization strategies. Unlike previous studies, this research utilizes a dataset obtained directly from the company to compare the performance of Random Forest and XGBoost algorithms in predicting palm oil production, while also analyzing which variables most significantly influence prediction results using SHAP (SHapley Additive exPlanations). The study employs historical palm oil production data from PT XYZ covering the period from January 2020 to December 2025 comprising 588 data points using a multivariate time series approach. The research stages include data preprocessing, the creation of sliding windows with sequence lengths of 3 and 6 months, model training, hyperparameter tuning, evaluation using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and the Coefficient of Determination (R²), as well as model interpretation using SHAP. The results indicate that both models achieved their best performance with a sequence length of 3 months. The XGBoost model outperformed Random Forest, achieving an MAE of 553,293, an RMSE of 1,496,990, and an R² of 0.877, whereas Random Forest recorded an MAE of 1,283,547, an RMSE of 1,792,539, and an R² of 0.824. SHAP analysis revealed that month was the most influential factor in predicting palm oil production, followed by lag_1, lag_3, and land area. This research contributes a comparison of Random Forest and XGBoost on primary palm oil production data obtained directly from the company, as well as a SHAP-based interpretation that can serve as a practical reference for PT XYZ in production planning and corporate strategy. These findings demonstrate that the combination of XGBoost and SHAP can generate accurate predictions while providing insights into the factors influencing production, thereby supporting decision-making in palm oil production management.
Copyrights © 2026