Forecasting Coffee Sales Using Time-Based Features and Machine Learning Models - Yoana Sonia Wijaya; Ariel Christopher Wawolangi (International Journal of Informatics and Information Systems, 2026)
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 analytics