Research Article

Core Feature Screening for Imbalanced Online Purchase Intention Prediction

Kexin Gao*
The Chinese University of Hong Kong (Shenzhen)

* Corresponding author: [email protected]

Abstract

E-commerce browsing data suffers severe class imbalance, making accuracy unreliable for purchase-intention prediction. Using the Online Shoppers Purchasing Intention dataset from the University of California, Irvine (UCI) Machine Learning Repository, this paper compares Logistic Regression, K-Nearest Neighbors, Random Forest and Gradient Boosting via stratified 5-fold cross-validation without synthetic oversampling. Three feature settings are evaluated: full-feature set, Random-Forest-derived top-5 feature subset, and single PageValues. The macro-averaged F1 score (macro-F1) and the area under the precision-recall curve (PR-AUC) serve as core metrics. Class weight and sample weight adjustment are applied to handle imbalance during training. Gradient Boosting obtains the best overall performance. Under imbalance, accuracy is misleading for model comparison. PageValues exhibits strong standalone predictive power, and lightweight models using five core features retain nearly full predictive performance. The results provide practical references for feature screening and lightweight model deployment in imbalanced e-commerce purchase prediction, and demonstrate that a small number of high-signal behavioral indicators is sufficient for effective purchase-intention prediction.

Keywords: e-commerce purchase prediction; stratified 5-fold cross-validation; gradient boosting; feature importance; imbalanced classification
Published: October 20, 2026
DOI: 10.54254/2753-8818/2026.PU38028
Volume: TNS Vol.196
pp. 58-68
Download PDF

References

  1. 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. https://doi.org/10.1007/s00521-018-3640-7
  2. Kumar, D. A., Bhadrarao, M. V., Priya, P. S., Ramana, K. V., & Jyothi, M. (2024). Predicting online shopper behavior: Machine learning approaches for enhanced e-commerce insights.International Journal of Scientific Development and Research, 9(12), 21–27.
  3. Esmeli, R., Bader-El-Den, M., & Abdullahi, H. (2021). Towards early purchase intention prediction in online session based retailing systems.Electronic Markets, 31(3), 697–715. https://doi.org/10.1007/s12525-020-00448-x
  4. Chaudhuri, N., Gupta, G., Vamsi, V., & Bose, I. (2021). On the platform but will they buy? Predicting customers' purchase behavior using deep learning.Decision Support Systems, 149, 113622.
  5. Satu, M. S., & Islam, S. F. (2023). Modeling online customer purchase intention behavior applying different feature engineering and classification techniques.Discover Artificial Intelligence, 3(1), 36. https://doi.org/10.1007/s44163-023-00086-0
  6. Abdullah-All-Tanvir, Khandokar, I. A., Islam, A. K. M. M., Islam, S., & Shatabda, S. (2023). A gradient boosting classifier for purchase intention prediction of online shoppers.Heliyon, 9(4), e15163. https://doi.org/10.1016/j.heliyon.2023.e15163
  7. Wen, Z., Lin, W., & Liu, H. (2023). Machine-learning-based approach for anonymous online customer purchase intentions using clickstream data.Systems, 11(5), 255. https://doi.org/10.3390/systems11050255
  8. Yadav, S. (2023). Predicting consumer purchase intentions using machine learning.Preprints. https://doi.org/10.20944/preprints202311.0708.v1
  9. Sakar, C. O., & Kastro, Y. (2018). Online shoppers purchasing intention dataset [dataset].UCI Machine Learning Repository. https://doi.org/10.24432/C5F88Q
  10. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, E. (2011). Scikit-learn: Machine learning in Python.Journal of Machine Learning Research, 12, 2825–2830.
  11. Breiman, L., Friedman, J. H., Olshen, R. A., & Stone, C. J. (1984).Classification and regression trees. CRC Press.
  12. Friedman, J. H. (2001). Greedy function approximation: A gradient boosting machine.Annals of Statistics, 29(5), 1189–1232. https://doi.org/10.1214/aos/1013203451
  13. Strobl, C., Boulesteix, A. L., Zeileis, A., & Hothorn, T. (2007). Bias in random forest variable importance measures: Illustrations, sources and a solution.BMC Bioinformatics, 8(1), 25. https://doi.org/10.1186/1471-2105-8-25