Perbandingan Random Forest dan XGBoost Untuk Prediksi Penjualan Produk E-Commerce Rumah Madu - Hayatunnisa, Destaria; Permata, Permata; Priandika, Adhie Thyo; Gunawan, Rakhmat Dedi (Building of Informatics, Technology and Science (BITS), 2025)
Inventory management is one of the main challenges for small and medium enterprises (SMEs), including Rumah Madu in Bandar Lampung, where honey stock levels are often determined based on estimation rather than precise calculation. This study aims to analyze and compare the performance of the Random Forest and XGBoost algorithms in predicting honey sales to achieve more measurable stock management. The dataset consists of 1,699 honey sales transactions that have undergone cleaning, feature transformation, and standardization processes. The variables used include honey type, unit price, day, month, holiday status, and promotion indicators. Modeling was conducted using a time-series split approach, where historical data served as the training set and recent data as the testing set. The evaluation results show that Random Forest achieved an MAE of 24.35, RMSE of 29.04, and R² of -0.9685, while XGBoost achieved an MAE of 25.50, RMSE of 30.58, and R² of -1.1825. The negative R² values indicate that both models were unable to explain data variation optimally, with performance falling below a simple baseline. Nevertheless, the feature importance analysis revealed that unit price and honey type were the dominant factors influencing sales. This study highlights the need for further model development through parameter optimization and improved data quality to enhance prediction accuracy.