Comparison of Machine Learning and Deep Learning Algorithms for Daily Retail Sales Forecasting

Authors

  • Eko Purwanto Universitas Duta Bangsa Author
  • Bangun Prajadi Cipto Utomo Universitas Duta Bangsa Author
  • Hanifah Permatasari Universitas Duta Bangsa Author
  • Farahwahida Mohd Universiti Kuala Lumpur Author

DOI:

https://doi.org/10.15294/edukom.v12i2.32773

Keywords:

Convolutional Neural Network, Deep Learning, Long Short-Term Memory, Machine Learning, Random Forest, Support Vector Machine

Abstract

This study presents a comparative analysis of four machine learning (ML) and deep learning (DL) algorithms: Random Forest (RF), Support Vector Machine (SVM), Convolutional Neural Network (CNN), and Long Short-Term Memory (LSTM) for predicting daily retail sales time series. The models were evaluated using key metrics, such as Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R-squared (R²). Results show that RF and SVM outperformed both CNN and LSTM in terms of MAE (3500.28 and 3325.11, respectively) and RMSE (4660.60 and 4293.42, respectively). However, all models had negative R² values, indicating none could explain the variation in the data. LSTM, in particular, was the least efficient model, with an MAE of 54087.25, RMSE of 54257.51, and R² of -158.59. The poor performance of LSTM can be attributed to overfitting, improper model configuration, and misalignment with the nature of the data. The dataset used includes over 1,000 daily retail sales transaction records collected over one year, with key attributes like CustomerID, ProductID, Quantity, Price, TransactionDate, PaymentMethod, StoreLocation, ProductCategory, DiscountApplied, and TotalAmount. While the dataset is representative, its size and complexity may not have been sufficient for deep learning models like LSTM and CNN, which generally require larger datasets for optimal performance. This study highlights the challenges of using deep learning for retail forecasting and suggests future research should focus on refining models and incorporating external datasets to improve prediction accuracy.

References

Ahmed, R., Hasnain, M., Mahmood, M. H., & Mehmood, M. (2024). Comparison of Deep Learning Algorithms for Retail Sales Forecasting. 1(3), 112–126. https://doi.org/10.62762/tis.2024.300700

Cao, X., & Sun, J. (2021). Convolutional Neural Networks (CNN). 83–109. https://doi.org/10.1007/978-3-030-82184-5_6

Chebli, A., Daas, S., & Hafs, T. (2024). Evaluating the impact of data imputation on model precision in machine learning. Studies in Engineering and Exact Sciences, 5(2), e8310. https://doi.org/10.54021/seesv5n2-256

de Castro Moraes, T., Yuan, X.-M., & Chew, E. P. (2024). Hybrid convolutional long short‐term memory models for sales forecasting in retail. Journal of Forecasting. https://doi.org/10.1002/for.3073

Eglite, L., & Birzniece, I. (2022). Retail Sales Forecasting Using Deep Learning: Systematic Literature Review. Complex Systems Informatics and Modeling Quarterly, 30(30), 53–62. https://doi.org/10.7250/csimq.2022-30.03

Fukai, F. M., Cavalieri, D. C., & de Castro, F. Z. (2024). Long short-term memory neural networks applied in demand forecast in the retail market. https://doi.org/10.55592/cilamce.v6i06.10158

Ganguly, P., & Mukherjee, I. (2024). Enhancing Retail Sales Forecasting with Optimized Machine Learning Models. https://doi.org/10.48550/arxiv.2410.13773

Haque, M. S., Amin, M. S. A., & Miah, J. (2023). Retail Demand Forecasting: A Comparative Study for Multivariate Time Series. https://doi.org/10.21203/rs.3.rs-3280263/v1

Kaneko, H. (2021). Support vector regression that takes into consideration the importance of explanatory variables. Journal of Chemometrics, 35(4). https://doi.org/10.1002/CEM.3327

Khine, M. T. (2023). Retail Demand Forecasting Using Sequence to Sequence Long Short-Term Memory Networks. International Conferences on Computing Advancements, 208–213. https://doi.org/10.1109/ICCA51723.2023.10181450

Makinde, A. S. (2024). Optimizing Time Series Forecasting: A Comparative Study of Adam and Nesterov Accelerated Gradient on LSTM and GRU networks Using Stock Market data. https://doi.org/10.48550/arxiv.2410.01843

Meenakshi, M. (2024). Enhanced Retail Sales Forecasting Using Optimized CNN-LSTM Hybrid Model: A Time Series-Based Analysis. Deleted Journal, 32(2s), 514–537. https://doi.org/10.52783/cana.v32.2485

Murray, C., Chaurasia, P., Hollywood, L., & Coyle, D. (2022). A Comparative Analysis of State-of-the-Art Time Series Forecasting Algorithms. 89–95. https://doi.org/10.1109/csci58124.2022.00021

Naskinova, I., Kolev, M., & Lazarova, M. (2024). Forecasting Strategies in Retail: Utilizing Advanced Machine Learning Methods while Safeguarding Privacy. Journal of Physics, 2910(1), 12008. https://doi.org/10.1088/1742-6596/2910/1/012008

Nasseri, M., Falatouri, T., Brandtner, P., & Darbanian, F. (2023). Applying Machine Learning in Retail Demand Prediction—A Comparison of Tree-Based Ensembles and Long Short-Term Memory-Based Deep Learning. Applied Sciences. https://doi.org/10.3390/app131911112

Pindiyan, A. V., & M., P. (2024). Machine Learning-Based Imputation Techniques Analysis and Study. 1–6. https://doi.org/10.1109/iceect61758.2024.10739330

Pustokhina, I. V, & Pustokhin, D. A. (2023). A Comparative Analysis of Traditional Forecasting Methods and Machine Learning Techniques for Sales Prediction in E-commerce. American Journal of Business and Operations Research, 10(2), 39–51. https://doi.org/10.54216/ajbor.100205

Ravikumar, A., & Sriraman, H. (2023). A Deep Understanding of Long Short-Term Memory for Solving Vanishing Error Problem (pp. 74–90). IGI Global. https://doi.org/10.4018/978-1-6684-8531-6.ch004

Shak, M. S., Mozumder, M. S. A., Hasan, M. A., Das, A. C., Miah, M. R., Akter, S., & Hossain, M. N. (2024). Optimizing retail demand forecasting: a performance evaluation of machine learning models including lstm and gradient boosting. https://doi.org/10.37547/tajet/volume06issue09-09

Sharma, H., Kumar, D., Baskar, S., Shukla, D., Singh, D., Tiwari, S., & Danish, M. (2024). Enhancement of Sales Forecasting and Prediction with Machine Learning Methods. International Research Journal of Computer Science, 11(11), 641–644. https://doi.org/10.26562/irjcs.2024.v1111.02

Suzuki, J. (2020). Support Vector Machine (pp. 171–192). Springer, Singapore. https://doi.org/10.1007/978-981-15-7568-6_9

Velasco, L. C. P., Polestico, D. L. L., Abella, D. M. M., Alegata, G. T., & Luna, G. C. (2020). Performance Analysis of Support Vector Regression Machine Models in Day-Ahead Load Forecasting (pp. 541–555). Springer, Cham. https://doi.org/10.1007/978-3-030-39442-4_40

Wibawa, A. P., Utama, A. B. P., Elmunsyah, H., Pujianto, U., Dwiyanto, F. A., & Hernandez, L. (2022). Time-series analysis with smoothed Convolutional Neural Network. Journal of Big Data, 9(1). https://doi.org/10.1186/s40537-022-00599-y

Yu, C. (2024). Walmart Sales Forecasting using Different Models. Highlights in Science Engineering and Technology, 92, 302–307. https://doi.org/10.54097/kqf76062

Zhao, J., Lee, C.-D., Chen, G., & Zhang, J. (2024). Research on the Prediction Application of Multiple Classification Datasets Based on Random Forest Model. 156–161. https://doi.org/10.1109/icpics62053.2024.10795875

Zhao, Y., Ren, X., & Zhang, X. (2021). Optimization of a Comprehensive Sequence Forecasting Framework Based on DAE-LSTM Algorithm. 1746(1), 12087. https://doi.org/10.1088/1742-6596/1746/1/012087

Downloads

Published

2025-12-31

Article ID

32773

How to Cite

Purwanto, E., Utomo, B. P. C., Permatasari, H., & Mohd, F. (2025). Comparison of Machine Learning and Deep Learning Algorithms for Daily Retail Sales Forecasting. Edu Komputika Journal, 12(2), 136-144. https://doi.org/10.15294/edukom.v12i2.32773