Perbandingan Kinerja Random Forest (RF) dan Long Short-Term Memory (LSTM) untuk Prediksi Penjualan yang Akurat
Downloads
How to Cite
Peramalan penjualan yang akurat adalah kunci untuk mengoptimalkan manajemen rantai pasok dan inventori. Penelitian ini bertujuan untuk membandingkan secara komprehensif kinerja dua algoritma Machine Learning dan Deep Learning terkemuka, yaitu Random Forest (RF) dan Long Short-Term Memory (LSTM), dalam memprediksi penjualan bulanan. Data yang digunakan mencakup periode panjang dari Januari 2021 hingga Agustus 2025. Sebelum pemodelan, data melalui pra-pemrosesan yang meliputi penanganan missing value, menghapus kolom yang tidak seharusnya digunakan dan normalisasi menggunakan MinMaxScaler. Model RF dikonfigurasi dengan estimators = 100 dan random state = 42, sementara model LSTM dibangun dengan look back = 10, unit LSTM = 100, dense =1, i adam epochs = 100 dan batch size = 1. Pengujian dilakukan menggunakan metode Time Series Split dan dievaluasi dengan metrik RMSE, MAE, dan MAPE. Hasil kuantitatif menunjukkan bahwa LSTM memberikan kinerja superior dengan nilai MAE 652,284,90 sedangkan 1,094,017.22 untuk RF, RMSE 851,450.88 sedang 1,668,706.49 untuk RF, MAPE terendah, sebesar 3.21% sedangkan RF sebesar 4.01%. Keunggulan ini disebabkan oleh Kemampuan LSTM menangkap dependensi deret waktu yang panjang.
Performance Comparison of Random Forest (RF) and Long Short-Term Memory (LSTM) for Accurate Sales Prediction
Abstract
Accurate sales forecasting is key to optimizing supply chain and inventory management. This study aims to comprehensively compare the performance of two leading Machine Learning and Deep Learning algorithms, namely Random Forest (RF) and Long Short-Term Memory (LSTM), in predicting monthly sales. The data used covers a long period from January 2021 to August 2025. Before modeling, the data goes through pre-processing which includes handling missing values, removing unnecessary columns and normalization using MinMaxScaler. The RF model is configured with estimators = 100 and random state = 42, while the LSTM model is built with look back = 10, unit LSTM = 100, dense = 1, i adam epochs = 100 and batch size = 1. Testing is carried out using the Time Series Split method and evaluated with RMSE, MAE, and MAPE metrics. Quantitative results show that LSTM provides superior performance with MAE value of 652,284.90 while 1,094,017.22 for RF, RMSE of 851,450.88 while 1,668,706.49 for RF, the lowest MAPE, at 3.21% while RF is 4.01%. This superiority is due to the ability of LSTM to capture long time series dependencies.
Abbasimehr, H., & Paki, R. (2022). Improving time series forecasting using LSTM and attention models. Journal of Ambient Intelligence and Humanized Computing, 13, 673–691. https://doi.org/10.1007/s12652-020-02761-x
Amelia, D., & R, R. K. (2025). Penerapan Algoritma Random Forest Untuk Prediksi Penjualan Dan Persediaan Produk Pada Tok Frozen Food Anisa. Jurnal Informatika Teknologi Dan Sains (Jinteks), 7(2), 843–848. https://doi.org/10.51401/jinteks.v7i2.5760
Butarbutar, W. I., Latuconsina, S. I., Palisoa, N. F., Sasmita, R. A. R., Tuanaya, N. A., Talaud, K. L., & Nanlohy, Y. W. A. (2023). Peramalan Harga Taksiran Emas Dan Uang Pinjaman Pada Pt. Pegadaian Cabang Passo Dengan Menggunakan Metode Double Moving Average. VARIANCE: Journal of Statistics and Its Applications, 5(1), 1–12.
Chicco, D., Warrens, M. J., & Jurman, G. (2021). The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Computer Science, 7, e623. https://doi.org/10.7717/peerj-cs.623
Davis, R. A., & Nielsen, M. S. (2020). Modeling of time series using random forests: Theoretical developments. Electronic Journal of Statistics, 14(2), 3644–3671. https://doi.org/10.1214/20-EJS1758
Diana Tri Susetianingtias, Eka Patriya, & Rodiah. (2022). Model Random Forest Regression Untuk Peramalan Penyebaran Covid-19 Di Indonesia: Random Forest Regression Model for Forecast Of Covid-19 Spread In Indonesia. Decode: Jurnal Pendidikan Teknologi Informasi, 2(2 SE-Articles), 84–95. https://doi.org/10.51454/decode.v2i2.48
Falah, S., Jaka, A. T., & Nada, N. Q. (2025). Penerapan Algoritma Regresi Linear Dan Random Forest Untuk Memprediksi Penjualan Di Uchi Parfume. Jurnal Informatika Teknologi Dan Sains (Jinteks), 7(3), 1317–1326. https://doi.org/10.51401/jinteks.v7i3.6464
Hidayat, R., Saputra, H. T., Husnah, M., Nabila, N., Hidayatullah, M. B., Nazhmi, M. N., Azra, J., & Rana, A. (2025). Implementasi Algoritma Random Forest Regression Untuk Memprediksi Penjualan Produksi di Supermarket. Jurnal Sistem Informasi Dan Sistem Komputer, 10(1), 101–109.
Jannah, U. M., Nurmalitasari, N., & Irawan, R. D. (2025). Analisis Prediksi Penjualan Isi Ulang Air Galon menggunakan Metode LSTM dan SARIMA. JTIM: Jurnal Teknologi Informasi dan Multimedia, 7(3), 626–639. https://doi.org/10.35746/jtim.v7i3.802
Jatte, H., Belattar, S., & Haimoudi, E. K. (2025). Optimization of Forecasting Performance in the Retail Sector Using Artificial Intelligence. Engineering Proceedings, 112(1), 37. https://doi.org/10.3390/engproc2025112037
Krichen, M., & Mihoub, A. (2025). Long Short-Term Memory Networks: A Comprehensive Survey. AI, 6(9), 215. https://doi.org/10.3390/ai6090215
Lara-Benítez, P., Carranza-García, M., & Riquelme, J. C. (2021). An experimental review on deep learning architectures for time series forecasting. International Journal of Neural Systems, 31(3), 2130001. https://doi.org/10.1142/S0129065721300011
Mahbubi, F. A., Hermanto, T. I., & Lestari, C. D. (2025). Peramalan Penjualan Saham Nikel Menggunakan Algoritma Long Short Term Memory (LSTM). IDEALIS: Indonesia JournaL Information System, 8(1), 138–149. https://doi.org/10.36080/idealis.v8i1.3254
Nugroho, K., Dwiati, W. T., & Murti, H. (2023). Sales Conversion Optimization Analysis Using the Random Forest Method. Sinkron : Jurnal Dan Penelitian Teknik Informatika, 7(4), 2699–2705. https://doi.org/10.33395/sinkron.v8i4.12943
Rais, A. N., Warjiyono, W., Alfarobi, I., Hadi, S. W., & Kurniawan, W. (2024). Analisa Prediksi Harga Jual Rumah Menggunakan Algoritma Random Forest Machine Learning. Jurnal Riset Sistem Informasi Dan Teknologi Informasi (JURSISTEKNI), 6(2 SE-Articles). https://doi.org/10.52005/jursistekni.v6i2.323
Sanjaya, D. R., & Surarso, B. (2025). Modification of the LSTM Model in Time Series Data Prediction. Lontar Komputer: Jurnal Ilmiah Teknologi Informasi, 16(01), 14–26.
Sari, B, W., & Prabowo, D. (2025). Analisis Perbandingan Prediksi Harga Rumah Dengan Random Forest, Gradient Boosting, dan XGBoost. Intellect : Indonesian Journal of Learning and Technological Innovation, 4(1 SE-Articles), 42–51. https://doi.org/10.57255/intellect.v4i1.1385
Sunendar, N., Putro, H. P., & Hesananda, R. (2025). Prediksi Penjualan Aerosol Menggunakan Algoritma ARIMA, LSTM dan GRU. INSOLOGI: Jurnal Sains dan Teknologi, 4(1), 113–126. https://doi.org/10.55123/insologi.v4i1.4868
Supriyadi, R., Gata, W., Maulidah, N., & Fauzi, A. (2020). Penerapan Algoritma Random Forest Untuk Menentukan Kualitas Anggur Merah. E-BISNIS: JURNAL ILMIAH EKONOMI DAN BISNIS, 13(2 SE-Articles), 67–75. https://doi.org/10.51903/e-bisnis.v13i2.247
Tamami, G., & Arifin, M. (2024). Penggunaan LSTM dalam Membangun Prediksi Penjualan untuk Aplikasi Laptop Lens. Jurnal Fasilkom, 14(2), 301–308. https://doi.org/10.37859/jf.v14i2.7372
Copyright (c) 2026 Sri Tomo, Bambang Satrio Nugroho, Didik Nugroho

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with Empiricism Journal agree to the following terms:
- For all articles published in Empiricism Journal, copyright is retained by the authors. Authors give permission to the publisher to announce the work with conditions. When the manuscript is accepted for publication, the authors agrees to implement a non-exclusive transfer of publishing rights to the journals.
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlike 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 (See The Effect of Open Access).

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
