DOI: 10.55065/intraders.1964752 ISSN: 2667-4408

Explainable Machine Learning-Based Online Purchase Intention Prediction under Class Imbalance

Erol Özçekiç
The combined challenge of class imbalance and model interpretability remains largely unaddressed in the online purchase intention literature, representing a significant methodological gap that this study aims to fill by developing an explainable machine learning framework for predicting online shopping behavior under severe class imbalance conditions. The Online Shoppers Purchasing Intention Dataset, comprising 12,330 user sessions with 17 behavioral features, was used with purchase completion as the binary target variable, and four models, namely Logistic Regression (LR), AdaBoost (AB), Random Forest (RF), and CatBoost (CB), were developed and optimized using grid search with stratified cross-validation; given the severe class imbalance in the dataset, a comprehensive set of metrics, including ROC-AUC, balanced accuracy, precision, recall, and F1-score, were computed to ensure robust evaluation. CatBoost outperformed all other models, achieving a ROC-AUC of 0.9256 and an F1-score of 0.6450, and SHAP-based interpretability analysis identified page values, seasonality, and exit rates as the dominant behavioral predictors of purchase intention. The proposed framework integrates predictive modeling with post-hoc interpretability, offering actionable insights for e-commerce conversion optimization and data-driven marketing strategy development, and addresses the identified methodological gap by jointly handling class imbalance and interpretability within a single evaluation pipeline.

More from our Archive