Comparison of the Accuracy Levels of Naive Bayes, Random Forest, and Long Short-Term Memory (LSTM) Methods in Predicting Gold Jewelry Sales

Authors

  • Muhammad Arfianto Pandu W Magister Ilmu Komputer, Fakultas Ilmu Komputer, Universitas Amikom Purwokerto, Indonesia
  • Rujianto Eko Saputro Magister Ilmu Komputer, Fakultas Ilmu Komputer, Universitas Amikom Purwokerto, Indonesia
  • Purwadi Magister Ilmu Komputer, Fakultas Ilmu Komputer, Universitas Amikom Purwokerto, Indonesia
  • Umdah Aulia Rohmah Ekonomi Syariah, Fakultas Ekonomi dan Bisnis Islam, Universitas Islam Negeri Prof.K.H.Saifuddin Zuhri, Purwokerto, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2026.7.1.5139

Keywords:

Gold Jewelry, Long Short-Term Memory (LSTM), Method Comparison, Model Accuracy, Naive Bayes, Random Forest, Sales Prediction

Abstract

Gold has long been recognized as a safe haven asset, especially during economic uncertainty. Accurate prediction of gold jewelry sales is essential for inventory management and business strategy, particularly in high-demand regions such as Imogiri. This study aims to compare the accuracy levels of three machine learning methods—Naïve Bayes, Random Forest, and Long Short-Term Memory (LSTM)—in predicting gold jewelry sales using historical transaction data from Toko Emas Parimas. The dataset comprises 4,595 records from January 2022 to December 2024. The research employs data preprocessing, including data cleaning, feature transformation, and normalization, followed by classification into sales categories. Two data-splitting schemes (80:20 and 70:30) were implemented to evaluate model generalization. The models were trained and tested using performance metrics such as accuracy, precision, recall, and F1-score. The results show that Random Forest achieved perfect classification with an accuracy of 1.00 in both schemes, outperforming the other models. Naïve Bayes also performed well with accuracy up to 0.98, while LSTM showed moderate results with accuracy ranging from 0.82 to 0.88. These findings indicate that Random Forest is the most reliable model for sales prediction of gold jewelry, especially for static classification tasks. The study provides practical insights for retailers and decision-makers in selecting suitable analytical models, and it highlights the importance of aligning analytical methods with data characteristics to improve decision support systems in retail.

Downloads

Download data is not yet available.

References

N. T. T. Binh, “Comparative Analysis of Gold, Art, and Wheat as Inflation Hedges,” J. Risk Financ. Manag., vol. 17, no. 7, 2024, doi: 10.3390/jrfm17070270.

R. Msi, “Gold Investment Decisions to Anticipate Various Economic Problems in the Future (Study of Generation Z Mothers in Makassar City),” Mediterr. J. Soc. Sci., vol. 15, no. 5, p. 84, 2024, doi: 10.36941/mjss-2024-0047.

B. N. Vu and H. Y. Hoang, “Factors influencing gold demand : Evidence from developing countries,” J. Soc. Sci. Humanit., vol. 66, no. 3, 2024, doi: 10.31276/VMOSTJOSSH.2024.0011.

S. Pachiyappan, G. Chandrakala, A. Mishra, K. Keerthana, S. Kumari, and T. Verma, “Golden Insights: Analyzing the Influence of Economic Indicators on Sovereign Gold Bond Performance in India,” Int. Res. J. Multidiscip. Scope, vol. 6, no. 2, pp. 564–576, 2025, doi: 10.47857/irjms.2025.v06i02.03155.

A. Yavuz and S. Eken, “Gold Returns Prediction: Assessment based on Major Events,” EAI Endorsed Trans. Scalable Inf. Syst., vol. 10, no. 5, pp. 1–10, 2023, doi: 10.4108/eetsis.3323.

S. S. Bannerjee, R. Pillai, M. I. Tabash, and M. S. M. Al-Absy, “Unveiling Inter-Market Reactions to Different Asset Classes/Commodities Pre- and Post-COVID-19: An Exploratory Qualitative Study,” Economies, vol. 13, no. 3, pp. 1–24, 2025, doi: 10.3390/economies13030066.

R. Anggara, “Investing In Gold In Times Of Global Crisis,” Int. Asia Law Money Laund., vol. 1, no. 4, pp. 228–233, 2022, doi: 10.59712/iaml.v1i4.43.

M. F. Ghazali, H. H. Lean, and Z. Bahari, “Does gold investment offer protection against stock market losses? evidence from five countries,” Singapore Econ. Rev., vol. 65, no. 2, pp. 275–301, 2020, doi: 10.1142/S021759081950036X.

T. Bunnag, “The Importance of Gold’s Effect on Investment and Predicting the World Gold Price Using the ARIMA and ARIMA-GARCH Model,” Ekon. J. Econ., vol. 2, no. 1, pp. 38–52, 2024, doi: 10.60084/eje.v2i1.155.

V. Stasytytė, N. Maknickienė, and R. Martinkutė-Kaulienė, “Hedging basic materials equity portfolios using gold futures,” J. Int. Stud., vol. 17, no. 2, pp. 132–145, 2024, doi: 10.14254/2071-8330.2024/17-2/7.

O. Peretz, M. Koren, and O. Koren, “Naive Bayes classifier – An ensemble procedure for recall and precision enrichment,” Eng. Appl. Artif. Intell., vol. 136, no. March, 2024, doi: 10.1016/j.engappai.2024.108972.

H. S. Putra, Vihi Atina, and Dwi Hartanti, “Application of Naive Bayes Algorithm for Sentiment Analysis of Service and Facility Satisfaction (Case Study: PKU Muhammadiyah Sukoharjo General Hospital),” J. Adv. Inf. Ind. Technol., vol. 6, no. 1, pp. 61–72, 2024, doi: 10.52435/jaiit.v6i1.566.

H. Chen, S. Hu, R. Hua, and X. Zhao, “Improved naive Bayes classification algorithm for traffic risk management,” EURASIP J. Adv. Signal Process., vol. 2021, no. 1, 2021, doi: 10.1186/s13634-021-00742-6.

Rais, A. M. Soleh, and B. Susetyo, “Rotation Double Random Forest Algorithm to Predict The Food Insecurity Status of Households,” J. RESTI, vol. 8, no. 1, pp. 33–41, 2024, doi: 10.29207/resti.v8i1.5540.

T. Zhu, “Analysis on the applicability of the random forest,” J. Phys. Conf. Ser., vol. 1607, no. 1, 2020, doi: 10.1088/1742-6596/1607/1/012123.

M. E. Saleh and N. Abd-Alsabour, “Improved Decision Tree, Random Forest, and XGBoost Algorithms for Predicting Client Churn in the Telecommunications Industry,” Int. J. Adv. Comput. Sci. Appl., vol. 15, no. 12, pp. 674–682, 2024, doi: 10.14569/IJACSA.2024.0151268.

H. Chen, G. Zhang, X. Pan, and R. Jia, “Using dual evolutionary search to construct decision tree based ensemble classifier,” Complex Intell. Syst., vol. 9, no. 2, pp. 1327–1345, 2023, doi: 10.1007/s40747-022-00855-x.

I. Malashin, V. Tynchenko, A. Gantimurov, V. Nelyub, and A. Borodulin, “Applications of Long Short-Term Memory (LSTM) Networks in Polymeric Sciences: A Review,” Polymers (Basel)., vol. 16, no. 18, pp. 1–44, 2024, doi: 10.3390/polym16182607.

B. S. S. Ulama, R. A. Putra, F. Hibatullah, M. R. Habibi, and M. A. Nafis, “Comparison of Artificial Neural Network and Long Short-Term Memory for Modelling Crude Palm Oil Production in Indonesia,” Int. J. Adv. Comput. Sci. Appl., vol. 16, no. 1, pp. 741–747, 2025, doi: 10.14569/IJACSA.2025.0160171.

H. Jdi and N. Falih, “Comparison of time series temperature prediction with auto-regressive integrated moving average and recurrent neural network,” Int. J. Electr. Comput. Eng., vol. 14, no. 2, pp. 1770–1778, 2024, doi: 10.11591/ijece.v14i2.pp1770-1778.

I. Abu-Doush, B. Ahmed, M. A. Awadallah, M. A. Al-Betar, and A. R. Rababaah, “Enhancing multilayer perceptron neural network using archive-based harris hawks optimizer to predict gold prices,” J. King Saud Univ. - Comput. Inf. Sci., vol. 35, no. 5, p. 101557, 2023, doi: 10.1016/j.jksuci.2023.101557.

X. Zhao and P. Keikhosrokiani, “Sales prediction and product recommendation model through user behavior analytics,” Comput. Mater. Contin., vol. 70, no. 2, pp. 3855–3874, 2022, doi: 10.32604/cmc.2022.019750.

A. C. Dewi, A. Hermawan, and D. Avianto, “Classification of Customers’ Repeat Order Probability Using Decision Tree, Naïve Bayes and Random Forest,” J. Pilar Nusa Mandiri, vol. 20, no. 1, pp. 52–59, 2024, doi: 10.33480/pilar.v20i1.5243.

K. Nurfebia, “Sentiment Analysis of Skincare Products Using the Naive Bayes Method,” J. Inf. Syst. Informatics Vol., vol. 6, no. 3, pp. 1663–1676, 2024, doi: 10.51519/journalisi.v6i3.817.

A. Ecevit, İ. Öztürk, M. Dağ, and T. Özcan, “Short-Term Sales Forecasting Using LSTM and Prophet Based Models in E-Commerce,” Acta Infologica, vol. 0, no. 0, pp. 0–0, 2023, doi: 10.26650/acin.1259067.

T. de Castro Moraes, X. M. Yuan, and E. P. Chew, “Hybrid convolutional long short-term memory models for sales forecasting in retail,” J. Forecast., vol. 43, no. 5, pp. 1278–1293, 2024, doi: 10.1002/for.3073.

R. Pugliese, S. Regondi, and R. Marini, “Machine learning-based approach: Global trends, research directions, and regulatory standpoints,” Data Sci. Manag., vol. 4, no. November, pp. 19–29, 2021, doi: 10.1016/j.dsm.2021.12.002.

J. Jabbar, “Sistem Informasi Stok Barang Menggunakan Metode Clustering Kmeans (Studi Kasus Rmd Store),” INFOTECH J., vol. 8, no. 1, pp. 70–75, 2022, doi: 10.31949/infotech.v8i1.2280.

A. Agung, A. Daniswara, I. Kadek, and D. Nuryana, “Data Preprocessing Pola Pada Penilaian Mahasiswa Program Profesi Guru,” J. Informatics Comput. Sci., vol. 05, pp. 97–100, 2023.

S. Wiguna, S. P. A. Alkadri, and Istikomah, “Prediksi Harga Smartphone Berdasarkan Fitur Smartphone Dengan Random Forest Regression,” Kohesi J. Multidisiplin Saintek, vol. 6, no. 9, pp. 1–14, 2025, [Online]. Available: https://ejournal.warunayama.org/kohesi.

Slamet Kusworo, Nugroho Adhi Santoso, and Rifki Dwi Kurniawan, “Prediksi Nilai Akhir Semester Siswa Menggunakan Algoritma Random Forest,” J. Sains dan Ilmu Terap., vol. 7, no. 2, pp. 246–256, 2024, doi: 10.59061/jsit.v7i2.918.

D. Arianyah and I. V. Paputungan, “Jurnal Sains, Nalar, dan Aplikasi Teknologi Informasi,” J. Sains, Nalar, dan Apl. Teknol. Inf., vol. 3, no. 2, pp. 50–57, 2024, doi: 10.20885/snati.v4.i2.38599.

F. S. Pamungkas, B. D. Prasetya, and I. Kharisudin, “Perbandingan Metode Klasifikasi Supervised Learning pada Data Bank Customers Menggunakan Python,” Prism. Pros. Semin. Nas. Mat., vol. 3, pp. 692–697, 2020, [Online]. Available: https://journal.unnes.ac.id/sju/index.php/prisma/article/view/37875.

U. L. O. P. N. B. P. Shelke and I. Information Technology, Vishwakarma Institute of Information Technology, Pune, “Gold Price Prediction using Random Forest Algorithm,” Int. Conf. Appl. Artif. Intell. Comput., vol. 3, 2024, [Online]. Available: doi: 10.1109/ICAAIC60222.2024.10575316.

L. Langsetmo et al., “Advantages and Disadvantages of Random Forest Models for Prediction of Hip Fracture Risk Versus Mortality Risk in the Oldest Old,” JBMR Plus, vol. 7, no. 8, pp. 1–11, 2023, doi: 10.1002/jbm4.10757.

S. W. Irwan Syahputra, Muhammad Iqbal, “ANALYSIS OF DATA MINING METHODS IN PALM OIL SALES PREDICTION USING RANDOM FOREST AND XGBOOST ( CASE STUDY : PT GEKA ADHI RAKSA ),” Jatilima J. Multimed. Dan Teknol. Inf., vol. 07, no. 02, pp. 68–79, 2025, [Online]. Available: doi.org/10.54209/jatilima.v7i02.1346.

D. T. Hermanto, A. Setyanto, and E. T. Luthfi, “Algoritma LSTM-CNN untuk Binary Klasifikasi dengan Word2vec pada Media Online,” Creat. Inf. Technol. J., vol. 8, no. 1, p. 64, 2021, doi: 10.24076/citec.2021v8i1.264.

Additional Files

Published

2026-02-15

How to Cite

[1]
M. A. Pandu W, R. E. . Saputro, P. Purwadi, and U. A. . Rohmah, “Comparison of the Accuracy Levels of Naive Bayes, Random Forest, and Long Short-Term Memory (LSTM) Methods in Predicting Gold Jewelry Sales”, J. Tek. Inform. (JUTIF), vol. 7, no. 1, pp. 126–146, Feb. 2026.

Most read articles by the same author(s)