Perbandingan Random Forest dan XGBoost Untuk Prediksi Penjualan Produk E-Commerce Rumah Madu
Abstract
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.
Downloads
References
D. Sarah, R. N. Suryana, dan K. Kirbrandoko, “Strategi Bersaing Industri Madu (Studi Kasus: CV Madu Apiari Mutiara),” J. Apl. Bisnis dan Manaj., vol. 5, no. 1, hal. 71–83, 2019, doi: 10.17358/jabm.5.1.71.
G. Ramadhan, A. Faqih, dan F. Sandy Eka Permana, “Analisis Tren Penjualan Menu Seafood Dengan Algoritma Random Forest Untuk Meningkatkan Strategi Pemasaran,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 4, hal. 5942–5949, 2025, doi: 10.36040/jati.v9i4.13911.
B. W. D. Nugroho, N. J. K. Jakti, M. A. N. Rochman, dan A. J. Nugroho, “Analisis Pengendalian Kualitas Produk Gula Dan Biaya Kualitas Dalam Menunjang Efektivitas Produksi (Studi Kasus: PT Madu Baru Pg Madukismo),” J. Teknol. dan Manaj. Ind. Terap., vol. 2, no. 2, hal. 72–81, 2023.
Y. M. N. S. W. I. F. Marisa, “Prediksi Penjualan Warung Kopi Oi Menggunakan Metode Random Forest Dan Xgboost,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 2, hal. 1–7, 2025.
M. S. E. S. A. K. Zyen, “Penerapan Algoritma Random Forest Untuk Prediksi Penjualan Dan Sistem Persediaan Produk,” Rekayasa Tek. Inform. dan Inf., vol. 5, no. September, hal. 1–9, 2024.
S. M. P. Negeri dan T. Barat, “Perbandingan Metode Random Forest Dan Xgboost Dalam Prediksi Harga Jual Rumah Di Wilayah Jabodetabek,” J. Multidisiplin Saintek, vol. 10, no. September, hal. 1–19, 2025, doi: 10.8734/Kohesi.v1i2.365.
D. P. Sari, Bety Wulan, “View of Analisis Perbandingan Prediksi Harga Rumah Dengan Random Forest, Gradient Boosting, dan XGBoost.pdf,” Indones. J. Learn. Technol. Innov., vol. 04, no. juni, hal. 1–10, 2025.
G. Erutjahjo dan A. Supriyanto, “Jurnal Informatika : Jurnal pengembangan IT Prediksi Tinggi Gelombang Laut di Perairan Semarang – Demak dengan Menggunakan Random Forest dan XGBoost,” vol. 10, no. 4, hal. 869–881, 2025, doi: 10.30591/jpit.v10i4.9315.
D. Sangaji dan T. Sutabri, “Analisis XGBoost dan Random Forest untuk Prediksi Curah Hujan dalam Mendukung Mitigasi Karhutla,” J. Pustaka AI (Pusat Akses Kaji. Teknol. Artif. Intell., vol. 5, no. 1, hal. 13–18, 2025, doi: 10.55382/jurnalpustakaai.v5i1.905.
H. N. Heidy et al., “Prediksi Keberhasilan Menindaklanjuti Pelanggan pada Dealer Mobil dengan Komparasi Algoritma Random Forest dan XGBoost,” J. Ilm. Komput., vol. 21, no. Agustus, hal. 933–939, 2025.
M. B. Setiawan dan A. Rahmatulloh, “Analisis Perbandingan Model Random Forest dan XGBoost dalam Memprediksi Turnover Karyawan,” J. Sist. Informasi, Teknol. Inf. dan Komput., vol. 15, no. 2, hal. 393–400, 2025, [Daring]. Tersedia pada: https://jurnal.umj.ac.id/index.php/just-it/index
R. Nurhidayat dan N. Hendrastuty, “Analisis Sentimen Komentar Media Sosial Twitter Terhadap Tes CPNS dengan Algoritma Naive Bayes,” Build. Informatics, Technol. Sci., vol. 6, no. 3, hal. 1477–1489, 2024, doi: 10.47065/bits.v6i3.6148.
M. L. T. Alfianti dan R. Supriyanto, “Perbandingan Kinerja Algoritma Random Forest, AdaBoost, dan XGBoost Dalam Memprediksi Resiko Penyakit Osteoporosis,” J. Ilmu Komput. dan Agri-Informatika, vol. 11, no. 2, hal. 172–184, 2024, doi: 10.29244/jika.11.2.172-184.
R. Hidayat et al., “Implementasi Algoritma Random Forest Regression Untuk Memprediksi Penjualan Produksi di Supermarket,” Simkom, vol. 10, no. 1, hal. 101–109, 2025, doi: 10.51717/simkom.v10i1.703.
M. B. Prayogi, F. Apriani, dan Nirma, “Prediksi Angka Harapan Hidup Menggunakan Random Forest dan XGBoost Regression,” J. Inform. dan Teknol., vol. 2, no. 1, hal. 112–121, 2025.
H. A. N. E. W. Pamungkas, “Perbandingan Algoritma Machine Learning: Svm, Random Forest, Dan Xgboost Untuk Prediksi Stroke,” J. Teknol. dan Sist. Inf. Univrab, vol. 10, no. 2, hal. 1098–1110, 2025.
A. Ananda Surya, D. Rizki Darmawan, dan A. Solichin, “Prediksi Kapabilitas Calon Debitur Menggunakan Analisis Data Machine Learning Dengan Metode Random Forest,” J. Algoritm., vol. 22, no. 1, hal. 777–788, 2025, doi: 10.33364/algoritma/v.22-1.1929.
E. Danuarta dan D. Alita, “Perbandingan Algoritma Naïve Bayes dan Random Forest untuk Melakukan Analisis Sentimen Cyberbullying Generasi Z Pada Twitter,” Build. Informatics, Technol. Sci., vol. 6, no. 4, hal. 2448–2458, 2025, doi: 10.47065/bits.v6i4.6909.
R. W. D. E. Ratnawati, “Peramalan Penjualan Produk Menggunakan Extreme Gradient Boosting (Xgboost) Dan Kerangka Kerja Crisp-Dm Untuk Pengoptimalan Manajemen Persediaan (Studi Kasus: Ub Mart),” J. Teknol. Inf. dan Ilmu Komput., vol. 12, no. 2, hal. 1–12, 2025.
I. G. Ayu, R. Astarani, dan I. G. Surya, “Analisis Perbandingan XGBoost dan LightGBM dalam Prediksi Penjualan Ritel Walmart Store Sales,” J. Nas. Teknol. Inf. dan Apl., vol. 3, no. Ml, hal. 717–728, 2025.
I. M. Sianturi dan D. Harinto, “Prediksi Penetapan Tarif Penerbangan Menggunakan Auto-Ml Dengan Algoritma Random Forest,” J. Sist. Informasi, Tek. Inform. dan Teknol. Pendidik., vol. 2, no. 1, hal. 40–48, 2022, doi: 10.55338/justikpen.v2i1.37.
A. Prayuda dan I. Pratama, “Prediksi Jumlah Kedatangan Wisatawan Mancanegara Di Indonesia Berdasarkan Pintu Masuk Kedatangan Udara,” Rabit J. Teknol. dan Sist. Inf. Univrab, vol. 9, no. 2, hal. 232–241, 2024, doi: 10.36341/rabit.v9i2.4787.
A. Ruliff Brahmantyo, “Perbandingan Hasil Prediksi Harga Properti Di Daerah Brooklyn Menggunakan Metode XGBoost, Random Forest, dan Linear Regression,” J. Komput. dan Inform., vol. 18, no. 2, hal. 124–132, 2023.
S. Fitriani, E. Budiman, M. Fadli, M. Surono, dan H. Sulistiani, “Optimalisasi Metode Random Forest menggunakan Particle Swarm Optimization dalam Prediksi Prestasi Mahasiswa,” Pros. Semin. Nas. Teknol. Komput. dan Sains, vol. 3, no. 1, hal. 406–415, 2025.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Perbandingan Random Forest dan XGBoost Untuk Prediksi Penjualan Produk E-Commerce Rumah Madu
Pages: 1479-1489
Copyright (c) 2025 Destaria Hayatunnisa, Permata Permata, Adhie Thyo Priandika, Rakhmat Dedi Gunawan

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).





















