ABSTRACT Accurate product demand forecasting is essential for small internal retail units such as cooperative stores (koperasi), where manual, intuition-based stock decisions frequently cause overstock and stockouts. This study develops and compares two gradient boosting algorithms, XGBoost and LightGBM, to forecast daily product demand at KOPERASI XYZ, an internal store located in Sunter, North Jakarta. Historical transaction records from 1 January 2024 to 22 December 2025 were aggregated into daily demand series for four product categories: mineral water, tea drinks, cigarettes, and milk. A total of 37 predictive features were engineered, comprising lag features, rolling and expanding statistics, and calendar features that encode 34 Indonesian national holidays. The data were divided using a chronological (time-based) split of 60:20:20, and both models were tuned using Grid Search cross-validation with a log-transformed target. Forecasting performance was evaluated using the Root Mean Squared Error (RMSE) and the Mean Absolute Percentage Error (MAPE). The results show that LightGBM outperforms XGBoost, achieving an overall RMSE of 24.53 and a MAPE of 9.72% (highly accurate), compared with an RMSE of 27.52 and a MAPE of 11.75% for XGBoost, corresponding to improvements of 10.86% in RMSE and 17.28% in MAPE. The best model was integrated into an interactive Streamlit dashboard that visualizes forecasts and recommends monthly stock levels to support data-driven inventory planning. Keywords:Demand Forecasting, XGBoost; LightGBM, Gradient Boosting, Time Series, Inventory Management
Copyrights © 2026