Forecasting Coffee Sales Using Time-Based Features and Machine Learning Models
DOI:
https://doi.org/10.47738/ijiis.v9i1.294Keywords:
Sales Forecasting, Machine Learning, Time Series Analysis, Coffee Retail, Data AnalyticsAbstract
Sales forecasting is a critical component of operational and strategic decision-making in retail and coffee businesses, where demand exhibits strong temporal variability and product-level heterogeneity. Accurate hourly-level forecasts enable effective inventory management, workforce scheduling, and data-driven promotional strategies. However, existing studies predominantly rely on aggregated sales data and provide limited comparative analyses between traditional statistical models and machine learning approaches using real transaction-level data. This study addresses this gap by conducting an empirical comparison between a traditional ARIMA model and ensemble machine learning models, namely Random Forest and XGBoost, for hourly coffee sales forecasting. The analysis is based on a real-world dataset comprising 3,547 transaction records enriched with temporal and product-related features. Model performance was evaluated using Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the coefficient of determination (R²). The results demonstrate that machine learning models significantly outperform the ARIMA baseline, with XGBoost achieving the best performance and explaining approximately 83% of the variance in sales data, while ARIMA shows limited explanatory power due to its inability to capture non-linear and highly volatile demand patterns. Feature importance analysis further reveals that product-specific attributes are the dominant drivers of sales predictions, complemented by seasonal and intra-day temporal effects. These findings provide both scientific and practical contributions by offering empirical evidence on the superiority of machine learning models for granular sales forecasting and supporting data-driven decision-making in coffee retail analyticsReferences
P. Ramos and J. M. Oliveira, “Robust Sales Forecasting Using Deep Learning with Static and Dynamic Covariates,” Appl. Syst. Innov., vol. 6, no. 5, pp. 85, 2023, doi: 10.3390/asi6050085.
E. Obermair, A. Holzapfel, and H. Kühn, “Operational Planning for Public Holidays in Grocery Retailing - managing the Grocery Retail Rush,” Oper. Manag. Res., vol. 16, no. 2, pp. 931–948, 2023, doi: 10.1007/s12063-022-00342-z.
Y. Zhao, W. Liu, Y. Yan, and F. Li, “Navigating the confluence of econometrics and data science: Implications for economic analysis and policy,” Theor. Nat. Sci., vol. 38, no. 1, pp. 26–31, 2024, doi: 10.54254/2753-8818/38/20240551.
M. R. Amin, M. Younus, S. Hossen, and A. Rahman, “Enhancing Fashion Forecasting Accuracy Through Consumer Data Analytics: Insights from Current Literature,” Acad. J. Bus. Adm. Innov. Sustain., vol. 4, no. 2, pp. 54–66, 2024, doi: 10.69593/ajbais.v4i2.69.
A.-F. A. Adetula and T. Akanbi, “Beyond Guesswork: Leveraging AI-driven Predictive Analytics for Enhanced Demand Forecasting and Inventory Optimization in SME Supply Chains,” Int. J. Sci. Res. Arch., vol. 10, no. 2, pp. 1389–1406, 2023, doi: 10.30574/ijsra.2023.10.2.0988.
N. I. Okeke, O. A. Bakare, and G. O. Achumie, “Artificial Intelligence in SME Financial Decision-Making: Tools for Enhancing Efficiency and Profitability,” Open Access Res. J. Multidiscip. Stud., vol. 8, no. 1, pp. 150–163, 2024, doi: 10.53022/oarjms.2024.8.1.0056.
G. Theodoridis and A. Tsadiras, “Retail Demand Forecasting: A Comparative Analysis of Deep Neural Networks and the Proposal of LSTMixer, a Linear Model Extension,” Information, vol. 16, no. 7, pp. 596, 2025, doi: 10.3390/info16070596.
E. Martins and N. V Galegale, “Sales Forecasting Using Machine Learning Algorithms,” Rev. Gestão E Secr., vol. 14, no. 7, pp. 11294–11308, 2023, doi: 10.7769/gesec.v14i7.1670.
R. Saranya, “Big Mart Sales Predictive Analysis Using Machine Learning,” Int. Sci. J. Eng. Manag., vol. 02, no. 04, pp. 1–4, 2023, doi: 10.55041/ISJEM00338.
A. Zhu, “VMD-SVM-based Retail Product Demand Forecasting Model,” Sci. J. Econ. Manag. Res., vol. 7, no. 2, pp. 24–31, 2025, doi: 10.54691/g7pfr887.
A. G. Hapsani, “Comparison Various Analytical Approaches to Find the Most Efficient and Effective Method for Peak Hour Identification,” J. Comput. Sci. Inf. Technol., vol. 17, no. 2, pp. 89–95, 2025, doi: 10.18860/mat.v17i2.29193.
C. Kuo and S. Tsang, “Detection of Price Manipulation Fraud Through Rational Choice Theory: Evidence for the Retail Industry in Taiwan,” Secur. J., vol. 36, no. 4, pp. 712–731, 2022, doi: 10.1057/s41284-022-00360-3.
T. Berger and J. Koubová, “Forecasting Bitcoin Returns: Econometric Time Series Analysis vs. Machine Learning,” J. Forecast., vol. 43, no. 7, pp. 2904–2916, 2024, doi: 10.1002/for.3165.
M. U. Ashraf, “A Predictive Analysis of Retail Sales Forecasting Using Machine Learning Techniques,” Lahore Garrison Univ. Res. J. Comput. Sci. Inf. Technol., vol. 6, no. 04, pp. 23–33, 2022, doi: 10.54692/lgurjcsit.2022.0604399.
A. Manoj, A. Baby, and F. S. Devaraj, “Enhancing Enterprise Performance Through Forecasting: A Deep RNN Approach,” Iraqi J. Sci., vol. 66, no. 10, pp. 4502–4516, 2025, doi: 10.24996/ijs.2025.66.10.36.
A. R. Chowdhury, R. Paul, and F. Z. Rozony, “A Systematic Review Of Demand Forecasting Models for Retail E-Commerce Enhancing Accuracy in Inventory and Delivery Planning,” Int. J. Sci. Interdiscip. Res., vol. 06, no. 01, pp. 01–27, 2025, doi: 10.63125/mbbfw637.
H.-R. Lou, X. Wang, Y. Gao, and Q. Zeng, “Comparison of ARIMA model, DNN model and LSTM model in predicting disease burden of occupational pneumoconiosis in Tianjin, China,” BMC Public Health, vol. 22, no. 1, pp. 2167, 2022, doi: 10.1186/s12889-022-14642-3.
Y. Zhao, “E-Commerce Demand Forecasting Using SARIMA Model and K-Means Clustering Analysis,” J. Innov. Dev., vol. 7, no. 1, pp. 1–6, 2024, doi: 10.54097/ctfb0379.
M. Hadwan, B. M. Al-Maqaleh, F. N. Al-Badani, R. U. Khan, and M. A. Al-Hagery, “A Hybrid Neural Network and Box-Jenkins Models for Time Series Forecasting,” Comput. Mater. Contin., vol. 70, no. 3, pp. 4829–4845, 2022, doi: 10.32604/cmc.2022.017824.
Y. Chen, X. Zhang, L. Wang, and Z. Li, “Development of a Time Series E-Commerce Sales Prediction Method for Short-Shelf-Life Products Using GRU-LightGBM,” Appl. Sci., vol. 14, no. 2, pp. 866, 2024, doi: 10.3390/app14020866.
V. I. Kontopoulou, A. D. Panagopoulos, I. Kakkos, and G. K. Matsopoulos, “A Review of ARIMA vs. Machine Learning Approaches for Time Series Forecasting in Data Driven Networks,” Futur. Internet, vol. 15, no. 8, pp. 255, 2023, doi: 10.3390/fi15080255.
K. T. Kizgin, S. Alp, N. Aydin, and H. Yu, “Machine learning-based sales forecasting during crises: Evidence from a Turkish women’s clothing retailer,” Sci. Prog., vol. 108, no. 1, pp. 1–18, 2025, doi: 10.1177/00368504241307719.
S. Punia, “Medium‐ to Long‐Term Demand Forecasting in Retail and Manufacturing Organizations: Integration of Machine Learning, Human Judgment, and Interval Variable,” J. Forecast., vol. 45, no. 1, pp. 122–134, 2025, doi: 10.1002/for.70030.
L. Sun, “A Comparative Study of Traditional and Machine Learning Approaches for E-Commerce Sales Forecasting,” Adv. Econ. Manag. Polit. Sci., vol. 135, no. 1, pp. 46–51, 2024, doi: 10.54254/2754-1169/2024.18610.
J. Tang, “Unlocking Retail Insights: Predictive Modeling and Customer Segmentation Through Data Analytics,” J. Theor. Appl. Electron. Commer. Res., vol. 20, no. 2, pp. 59, 2025, doi: 10.3390/jtaer20020059.
T. T. H. Nguyen, A. Bekrar, T. M. Le, M. Abed, and A. Kantasa-Ard, “Toward a Smart Forecasting Model in Supply Chain Management: A Case Study of Coffee in Vietnam,” J. Forecast., vol. 44, no. 1, pp. 173–199, 2024, doi: 10.1002/for.3189.
T. N. Nguyen, H. P. Tran, M. T. Le, and A. L. Pham, “Product Demand Forecasting with Neural Networks and Macroeconomic Indicators: A Comparative Study Among Product Categories,” J. Bus. Manag. Stud., vol. 6, no. 2, pp. 170–175, 2024, doi: 10.32996/jbms.2024.6.2.17.
Downloads
Published
Issue
Section
License
Authors who publish with IJIIS : International Journal on Informatics and Information Systems agree to the following terms: Authors retain copyright and grant the IJIIS : International Journal on Informatics and Information Systems right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (CC BY-SA 4.0) that allows others to share (copy and redistribute the material in any medium or format) and adapt (remix, transform, and build upon the material) the work for any purpose, even commercially with an acknowledgement of the work's authorship and initial publication in IJIIS : International Journal on Informatics and Information Systems. 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 acknowledgement of its initial publication in IJIIS : International Journal on Informatics and Information Systems. 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).

