Prediction of E-Commerce Customer Purchase Intention Using a Hybrid SMOTE-XGBoost Method with Model Comparison Evaluation on an Imbalanced Dataset

  • Rafli Rahmandani Universitas Jenderal Achmad Yani, Cimahi, Indonesia
  • Fajri Rakhmat Umbara Universitas Jenderal Achmad Yani, Cimahi, Indonesia
  • Ridwan Ilyas Universitas Jenderal Achmad Yani, Cimahi, Indonesia
Keywords: E-commerce, Imbalanced Dataset, Purchase Intention, SMOTE, XGBoost.

Abstract

Class imbalance in e-commerce customer behavior data caused classification models to be biased toward the non-purchase class and made accuracy misleading. This study aimed to build and evaluate a hybrid model that combined the Synthetic Minority Oversampling Technique (SMOTE) with Extreme Gradient Boosting (XGBoost) to predict customer purchase intention on the Online Shoppers Purchasing Intention Dataset, which contained 12,330 sessions of which only 15.47% ended in a purchase. The method comprised data quality auditing, one-hot encoding, an 80:20 stratified train-test split, and standardization and oversampling placed inside the pipeline to prevent data leakage. Hyperparameters were tuned separately for the baseline and hybrid models using randomized search with stratified 5-fold cross-validation, and seven metrics were used for evaluation. The proposed model was compared with Decision Tree, Random Forest, and Support Vector Machine. On the testing data, the hybrid model achieved the highest F1-Score (0.6625) and Recall (0.6963), whereas XGBoost without oversampling obtained the best Accuracy (0.9019), Matthews Correlation Coefficient (0.5983), auROC (0.9322), and auPR (0.7493). Oversampling raised Recall by 0.1073 but lowered Precision. The hybrid model was therefore more suitable when maximizing the detection of potential buyers was the main priority, although it was not superior on every metric.

References

Andespa, R., Sadik, K., Suhaeni, C., & Soleh, A. M. (2025). Evaluating random forest and XGBoost for bank customer churn prediction on imbalanced data using SMOTE and SMOTE-ENN. Media Statistika, 18(1), 25–36.

Ariffin, S. K., Mohan, T., & Goh, Y.-N. (2018). Influence of consumers' perceived risk on consumers' online purchase intention. Journal of Research in Interactive Marketing, 12(3), 309–327.

Baati, K., & Mohsil, M. (2020). Online shopper purchase prediction using random forest. In Proceedings of the IFIP International Conference on Artificial Intelligence Applications and Innovations (pp. 43–51).

Chung, S., Kramer, T., & Wong, E. M. (2018). Do touch interface users feel more engaged? The impact of input device type on online shoppers' engagement, affect, and purchase decisions. Psychology & Marketing, 35(11), 795–806.

Fernandes, R. F., & Teixeira, C. M. (2015). Using clickstream data to analyze online purchase intentions [Master's thesis, University of Porto].

Hamami, F., & Muzakki, A. (2021). Machine learning pipeline for online shopper intention classification. AIP Conference Proceedings, 2329(1), 050014.

Kabir, M. R., Ashraf, F. B., & Ajwad, R. (2019). Predicting purchase intention from empirical data. In Proceedings of the IEEE ICCIT (pp. 1–6).

Law, M., Kwok, R. C.-W., & Ng, M. (2016). An extended online purchase intention model for middle-aged online users. Electronic Commerce Research and Applications, 20, 132–146.

Meng, C., Zhou, L., & Liu, B. (2020). A case study in credit fraud detection with SMOTE and XGBoost. Journal of Physics: Conference Series, 1601(5).

Mondal, I. A., Haque, M. E., Hassan, A.-M., & Shatabda, S. (2021). Handling imbalanced data for credit card fraud detection. In Proceedings of the IEEE ICCIT.

Prayogo, R. D., & Karimah, S. A. (2021). Feature selection for purchase intent prediction. In Proceedings of the ICAICTA (pp. 1–5).

Rayhan, F., Ahmed, S., Shatabda, S., Farid, D. M., Mousavian, Z., Dehzangi, A., & Rahman, M. S. (2017). iDTI-ESBoost: Identification of drug target interaction using evolutionary and structural features with boosting. Scientific Reports, 7(1), 1–18.

Rita, P., Oliveira, T., & Farisa, A. (2019). The impact of e-service quality and satisfaction on online shopping behavior. Heliyon, 5(10).

Saha, S., Sarker, P. S., Al Saud, A., Shatabda, S., & Newton, M. A. H. (2022). Cluster-oriented instance selection for classification problems. Information Sciences, 602, 143–158.

Sakar, C. O., Polat, S. O., Katircioglu, M., & Kastro, Y. (2019). Real-time prediction of online shoppers' purchasing intention using multilayer perceptron and LSTM recurrent neural networks. Neural Computing and Applications, 31(10), 6893–6908.

Song, P., & Liu, Y. (2020). XGBoost algorithm for predicting behavior on e-commerce. Tehnički Vjesnik, 27(5), 1467–1471.

Suchacka, G., & Chodak, G. (2017). Using association rules to assess purchase probability in online stores. Information Systems and E-Business Management, 15(3), 751–780.

Suchacka, G., Skolimowska-Kulig, M., & Potempa, A. (2015). Classification of e-customer sessions using SVM. In Proceedings of the ECMS (pp. 594–600).

Zarrad, H., & Debabi, M. (2012). Online purchasing intention: Factors and effects. International Business Management, 4(1), 37–47.

Published
2026-10-19
How to Cite
Rahmandani, R., Umbara, F. R., & Ilyas, R. (2026). Prediction of E-Commerce Customer Purchase Intention Using a Hybrid SMOTE-XGBoost Method with Model Comparison Evaluation on an Imbalanced Dataset. International Journal of Science and Society, 8(4), 393-403. https://doi.org/10.54783/ijsoc.v8i4.1702