Predicting the demand for goods is an important aspect of inventory management and operational planning because inaccurate predictions can lead to overstock or shortages of goods. This study aims to predict the demand for goods using the Extreme Gradient Boosting (XGBoost) algorithm based on historical sales data. The dataset used contains information on the transaction date, number of sales, stock, price, and time index, which is then processed through the preprocessing and feature engineering stages, including the formation of temporal features and sales lag features. Data sharing is carried out using a time series split approach to maintain the chronological order of the data. The XGBoost model is optimized using GridSearchCV with the TimeSeriesSplit validation scheme. Model performance was evaluated using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE), and Symmetric Mean Absolute Percentage Error (SMAPE). The results showed that the model produced an MAE score of 54.13 and an RMSE of 77.60, while a SMAPE score of 43.13% showed an acceptable relative error rate in highly fluctuating sales data. Feature importance analysis shows that previous period (lag_1) sales and weekly patterns are the most dominant factors in demand predictions. These results prove that XGBoost is effectively used for historical data-driven demand prediction of goods and has the potential to support inventory management decision-making.
Copyrights © 2026