Skip to content
Open access

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

Aug 2026 · bit-Tech · Vol 9, pp. 495-506 · 0 citations

TL;DR

A marketplace-driven forecasting pipeline is developed that compares predictive models, applies temporal feature engineering, and deploys a decision-support prototype for raw material planning and was deployed in a Streamlit application to support production planning and inventory management.

Abstract

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.

Read PDF

Similar papers

Open access Sep 2026

Fashion Product Sales Prediction Using Random Forest Regression Algorithm Based on Historical Data

Tulip Store at Metropolitan Mall Bekasi, managed by PT Star Asia Brothers,relies on historical sales data for evaluation and target planning. However,sales volume fluctuations, ranging from 385 units in October 2025 to1,122 units in March 2026, make heuristic planning unreliable. This studybuilds a daily sales volume p...

Lusiana Situmorang, Mukhlis, Muhammad Yasir · 0 citations
Conference Aug 2026

Demand Forecasting in Supply Chain Systems Using Machine Learning

Accurate demand forecasting is central to inventory optimization and resource allocation in modern retail. While traditional Enterprise Resource Planning (ERP) systems often rely on rigid heuristic-based rules or simple moving averages, this paper presents an ERP-native framework that bridges the gap between transactio...

Ronin J. Rajmohan, Rounak Das, S. Rithvik et al. · 0 citations
Open access 2026

From Raw Data to OEE Forecasting: A Predictive Approach for Beverage Filling Lines

In beverage manufacturing, the operational efficiency of filling lines is a critical determinant of productivity and profitability. This study proposes a time-series forecasting framework for predicting Overall Equipment Effectiveness (OEE) by modeling two key sub-components, Availability and Performance, while treatin...

Vipoo Tirapaphavit, S. Amornsamankul, Wasakorn Laesanklang · 0 citations
Conference Open access Sep 2026

Machine Learning-Based Forecasting of Copra Prices Using Random Forest Regression in The Coconut Agroindustry Sector

This study aims to develop a machine learning-based forecasting model for predicting copra prices in the coconut agroindustry sector using the Random Forest Regression algorithm. Copra price fluctuations are influenced by multiple interconnected factors, including production volume, product quality, market demand, tran...

Wa Ode Dian Purnamasari, Firli Fitra Wally, N. Rahmawati et al. · 0 citations
Open access Sep 2026

Comparative Analysis of Decision Tree and Random Forest for Indonesian Food Prices

Food price fluctuations in Indonesia represent a persistent macroeconomic challenge, directly affecting national inflation and purchasing power, thereby necessitating an accurate forecasting system for risk mitigation. This study compares Decision Tree Regression and Random Forest Regression using 36,064 observations f...

Muhammad Rudyanto Arief, Rias Estriana, Ratna Praptiwi et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.