Research Article

Explainable Machine Learning for E-Commerce Purchase Intention: From Feature Importance to Interaction Effects and User Heterogeneity

Xinyu Wang*
University of Jinan

* Corresponding author: [email protected]

Abstract

Predicting online purchase intention is critical for e-commerce revenue optimization, yet existing approaches often sacrifice interpretability for marginal accuracy gains. This study proposes an interpretable prediction framework combining Random Forest with SHAP post-hoc analysis. Using the UCI Online Shoppers Intention dataset (N=12,330 sessions), Random Forest is benchmarked against Logistic Regression, XGBoost, and LightGBM, with statistical significance validated via McNemar test. Results show that Random Forest achieves the highest classification accuracy and best probability calibration, while gradient boosting models yield marginally higher AUC-ROC and F1-score. SHAP analysis reveals two counter-intuitive findings: (1) PageValues exhibits a saturation effect where marginal contribution to purchase probability plateaus beyond a threshold of approximately 50; (2) high PageValues buffers the negative effect of high ExitRates, suggesting that value-rich content retains users who would otherwise churn. To the best of knowledge in this domain, this is the first study to systematically quantify feature interactions, identify saturation thresholds, and assess user heterogeneity using SHAP on this widely adopted benchmark dataset.

Keywords: Explainable AI; Purchase Intention Prediction; Random Forest; SHAP; E-Commerce Analytics
Published: June 23, 2026
DOI: 10.54254/2755-2721/2026.GL34621
Volume: ACE Vol.239
pp. 47-55
Download PDF

References

  1. Lemon, K. N., Verhoef, P. C. Understanding Customer Experience Throughout the Customer Journey [J]. Journal of Marketing, 80(6), 2016: 69-96.
  2. European Parliament. Regulation (EU) 2016/679 of the European Parliament and of the Council (General Data Protection Regulation) [EB/OL]. 2016. https: //eur-lex.europa.eu/eli/reg/2016/679/oj
  3. Chen, T., Guestrin, C. XGBoost: A Scalable Tree Boosting System [C]//Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2016: 785-794.
  4. Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., Liu, T.-Y. LightGBM: A Highly Efficient Gradient Boosting Decision Tree [C]//Advances in Neural Information Processing Systems, Vol. 30. Curran Associates, 2017: 3149-3157.
  5. Chen, Y., Liu, H., Wen, Z., Lin, W. How Explainable Machine Learning Enhances Intelligence in Explaining Consumer Purchase Behavior: A Random Forest Model with Anchoring Effects [J]. Systems, 11(6), 2023: 312.
  6. Dietterich, T. G. Approximate Statistical Tests for Comparing Supervised Classification Learning Algorithms [J]. Neural Computation, 10(7), 1998: 1895-1923.
  7. Hosmer, D. W., Lemeshow, S. Applied Logistic Regression [M]. 2nd ed. John Wiley & Sons, 2000.
  8. Fader, P. S., Hardie, B. G., Lee, K. L. RFM and CLV: Using Iso-Value Curves for Customer Base Analysis [J]. Journal of Marketing Research, 42(4), 2005: 415-430.
  9. Breiman, L. Random Forests [J]. Machine Learning, 45(1), 2001: 5-32.
  10. Sakar, C. O., Polat, S. O., Katircioglu, M., Kastro, Y. Real-Time Prediction of Online Shoppers’ Purchasing Intention Using Multilayer Perceptron and LSTM Recurrent Neural Networks [J]. Neural Computing and Applications, 31, 2019: 6893-6908.
  11. Lundberg, S. M., Lee, S.-I. A Unified Approach to Interpreting Model Predictions [C]//Advances in Neural Information Processing Systems, Vol. 30. Curran Associates, 2017: 4768-4777.
  12. UCI Machine Learning Repository. Online Shoppers Purchasing Intention Dataset [DB/OL]. 2018. https: //doi.org/10.24432/C5F88Q
  13. Saito, T., Rehmsmeier, M. The Precision-Recall Plot Is More Informative Than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets [J]. PLOS ONE, 10(3), 2015: e0118432.
  14. Chicco, D., Jurman, G. The Advantages of the Matthews Correlation Coefficient (MCC) over F1 Score and Accuracy in Binary Classification Evaluation [J]. BMC Genomics, 21, 2020: 6.
  15. Molnar, C. Interpretable Machine Learning: A Guide for Making Black Box Models Explainable [EB/OL]. 2nd ed.  2022. https: //christophm.github.io/interpretable-ml-book/