Comparison of Machine Learning and Deep Learning Algorithms for Daily Retail Sales Forecasting - Eko Purwanto; Bangun Prajadi Cipto Utomo; Hanifah Permatasari; Farahwahida Mohd (Universitas Negeri Semarang, 2025)
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.