Explainable Machine Learning for Predicting Online Purchase Intention: A Decision-Support Framework for Digital Marketing

Authors

  • Asfandyar Khan Institute of Computer Sciences & Information Technology (ICS/IT), The University of Agriculture, Peshawar, Pakistan
  • Awais Khan IBMS, University of Science & Technology Bannu, Pakistan
  • Muhammad Jehangir Institute of Business Studies and Leadership, Abdul Wali Khan University, Mardan, Pakistan
  • Majid Khan Department of Mathematics, Statistics and Computer Science, The University of Agriculture, Peshawar, Pakistan

Keywords:

Explainable AI, SHAP, Purchase Intention, E-Commerce Analytics, Digital Marketing, Ensemble Learning, Artificial Neural Networks, Conversion Prediction, Decision Support

Abstract

Predicting the likelihood that a visitor to a website will purchase during a browsing session is a core problem of digital marketing analytics, and it fuels real-time personalization, retargeting and conversion-rate-optimization decisions. In this study, we propose and empirically investigate an explainable machine learning decision-support framework for online purchase-intention prediction based on UCI/Sakar et al. Online Shoppers Intention. dataset (12,330 e-commerce sessions, 17 behavioral and technical attributes). We trained and compared four supervised learning algorithms on accuracy, precision, recall, F1-score and ROC-AUC: Random Forest, Gradient Boosting, a histogram-based gradient boosting model in the same algorithmic family as XGBoost, and an Artificial Neural Network (Multilayer Perceptron). To provide transparency of model reasoning to marketing decision-makers, Shapley Additive exPlanations (SHAP) values were computed for 120 held-out sessions per model using a Monte Carlo permutation-sampling estimator of the exact Shapley value . The SHAP values afford a global feature-importance ranking as well as instance-level, session-specific explanations. Gradient Boosting showed the best discrimination (ROC-AUC = 0.928, recall = 0.828), followed by the histogram-based gradient boosting model (AUC = 0.923), the neural network (AUC = 0.913) and Random Forest (AUC = 0.909). PageValues, a metric that measures the monetary value of the pages a visitor views, was by far the dominant driver of predicted purchase intention across all four models, followed by Month (seasonality), ExitRates and TrafficType. PageValues had a mostly monotonic, non-linear relationship with purchase probability, and high ExitRates suppressed purchase likelihood even after controlling for on-site engagement, as confirmed by SHAP dependence analysis. We show that the combination of strong ensemble and neural models with careful session-level SHAP explanations produces a decision-support artifact that is both accurate and actionable, allowing marketing teams to focus real-time interventions (e.g., dynamic incentives for high-PageValues, high-ExitRate sessions) on transparent, auditable model reasoning as opposed to opaque black-box scores.

 

 

Downloads

Published

2025-07-25

How to Cite

Asfandyar Khan, Awais Khan, Muhammad Jehangir, & Majid Khan. (2025). Explainable Machine Learning for Predicting Online Purchase Intention: A Decision-Support Framework for Digital Marketing. Journal of Management Science Research Review, 4(3), 1458–1470. Retrieved from https://jmsrr.com/index.php/Journal/article/view/773