IJCCS (Indonesian Journal of Computing and Cybernetics Systems)
Vol 20, No 4 (2026): October

Comparison of Random Forest and XGBoost for Impulsive Buying Prediction

Adinda Bintang Oktavia (Universitas Muria Kudus)
Andy Prasetyo Utomo (Universitas Muria Kudus)
Soni Adiyono (Universitas Muria Kudus)



Article Info

Publish Date
31 Oct 2026

Abstract

This study compares Random Forest and XGBoost for predicting impulsive buying among mobile marketplace users using historical data from 2022 and questionnaire data from 2026. The research stages include preprocessing, feature and target construction, stratified data splitting, class imbalance handling using SMOTE within a pipeline, and model evaluation using Accuracy, Precision, Recall, F1-Score, and Area Under the Curve (AUC). GridSearchCV with five-fold cross-validation was used for model selection, while SHAP was employed to interpret feature contributions to predictions. On the 2022 historical data, Random Forest achieved an F1-Score of 0.8129 and an AUC of 0.8260, outperforming XGBoost, which obtained an F1-Score of 0.7922 and an AUC of 0.7933. On the 2026 questionnaire data, both algorithms achieved an F1-Score of 0.9279, while Random Forest obtained an AUC of 0.8724 compared with 0.8432 for XGBoost. SHAP analysis identified Hedonic Browsing as the feature with the greatest predictive contribution in both datasets. Overall, Random Forest achieved a higher mean cross-validation F1-Score on both datasets.

Copyrights © 2026






Journal Info

Abbrev

ijccs

Publisher

Subject

Computer Science & IT Control & Systems Engineering

Description

Indonesian Journal of Computing and Cybernetics Systems (IJCCS), a two times annually provides a forum for the full range of scholarly study . IJCCS focuses on advanced computational intelligence, including the synergetic integration of neural networks, fuzzy logic and eveolutionary computation, so ...