Perbandingan Generalized Linear Model (GLM) dan Extreme Gradient Boosting (XGBoost) dalam Prediksi Tren Penjualan Coffee Shop
Comparison of Generalized Linear Model (GLM) and Extreme Gradient Boosting (XGBoost) in Predicting Sales Trends of Coffee Shops

Date
2025Author
Akudea, Naftaly Baril
Advisor(s)
Nababan, Anandhini Medianty
Sihombing, Poltak
Metadata
Show full item recordAbstract
This study examines the performance comparison of two machine learning algorithms—Generalized Linear Model (GLM) and Extreme Gradient Boosting (XGBoost)—in predicting sales trends within the coffee shop industry. The dataset includes primary data from Hale Coffee and secondary data from another coffee shop located in Medan. The research process involves data collection, preprocessing, model training, evaluation using MSE, MAE, RMSE, and R² metrics, and comparative analysis of the prediction results. The evaluation results indicate that on primary data, XGBoost outperforms GLM with an MSE of 0.5708 and an R² score of 0.0902, while GLM yields an MSE of 0.5997 and R² of 0.0441. In contrast, on secondary data, both models perform poorly, with negative R² values (GLM = –0.3140, XGBoost = –0.3389), suggesting that neither model could adequately capture the underlying patterns of the secondary dataset. These findings highlight the importance of data volume and characteristics in affecting model accuracy and generalization. Beyond evaluating model performance, the system also provides optional discount recommendations for products with low predicted sales, which can serve as a decision support tool for marketing strategies. As such, the system is designed to support data-driven decision-making rather than serve as an automated determinant in business operations
Collections
- Undergraduate Theses [1235]