EUVIMEDEUVIMED entdecken
Open Access · CC BY-SA 4.0

Implementation of XGBoost and Random Forest for Coffee Raw Material Demand Prediction in E-Commerce

Maximillian Huang, Gina Purnama Insany, Anggun Fergina

bit-Tech · 10.08.2026 · 9 (1) · 495-506

DOI: 10.32877/bt.v9i1.3925 ↗

Kurz gefasst

Fachartikel in der Zeitschrift bit-Tech, online erschienen am 10.08.2026. Verfasst von Maximillian Huang und 2 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY-SA 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Fluctuating e-commerce demand for coffee products complicates raw material planning and increases the risk of overstock and stockout. This study develops a marketplace-driven forecasting pipeline that compares predictive models, applies temporal feature engineering, and deploys a decision-support prototype for raw material planning. Historical sales transactions from PT Bogor Japutra Jaya collected through Tokopedia during 2021–2026 were processed into weekly time-series observations across nine coffee raw material categories. Because raw material usage was not directly observed, product-level sales were cleaned, classified by coffee type, aggregated weekly, and converted into gram-based raw material demand according to product composition. XGBoost and Random Forest were implemented using lag, Simple Moving Average, Exponential Moving Average, Momentum, Moving Average Convergence Divergence, and Trend features, followed by Grid Search hyperparameter tuning. The dataset was divided using an 80:20 training-testing ratio, and model performance was evaluated using MAE, RMSE, and MAPE. Results show that XGBoost produced lower errors than Random Forest in most, but not all, coffee categories, indicating category-dependent forecasting performance rather than uniform superiority. For Arabica Gayo, XGBoost achieved MAE of 355.70, RMSE of 505.35, and MAPE of 6.92%, compared with Random Forest values of 692.25, 930.35, and 13.41%, respectively. However, several categories still exhibited higher MAPE values, suggesting that forecasting accuracy varies with demand scale and volatility. The selected model generated four-week-ahead raw material forecasts and was deployed in a Streamlit application to support production planning and inventory management.

Zitieren

APA

Huang, M., Insany, G. P., & Fergina, A. (2026). Implementation of XGBoost and Random Forest for Coffee Raw Material Demand Prediction in E-Commerce. bit-Tech, 9(1), 495-506. https://doi.org/10.32877/bt.v9i1.3925

Vancouver

Huang M, Insany GP, Fergina A. Implementation of XGBoost and Random Forest for Coffee Raw Material Demand Prediction in E-Commerce. bit-Tech. 2026;9(1):495-506. doi:10.32877/bt.v9i1.3925

BibTeX
@article{Huang2026,
  author = {Huang, Maximillian and Insany, Gina Purnama and Fergina, Anggun},
  title = {Implementation of XGBoost and Random Forest for Coffee Raw Material Demand Prediction in E-Commerce},
  journal = {bit-Tech},
  year = {2026},
  volume = {9},
  number = {1},
  pages = {495--506},
  doi = {10.32877/bt.v9i1.3925}
}
Kostenlos starten →