An Interpretable Machine Learning Framework for E-Commerce Customer Churn Prediction Using SHAP
Abstract
In the digital economy, the cost of customer acquisition for e-commerce platforms has been rising steadily. Customer retention has become an essential force for achieving sustainable profitability. Although the machine learning models exhibit superior performance in predicting customer churn, the black-box nature of some models limits their interpretability in practical applications, which in turn hampers their performance in real-world scenarios. This paper proposes a hybrid framework that combines advanced ensemble learning algorithms with interpretable artificial intelligence (XAI) techniques to bridge the gap caused by this limitation in machine learning. Multiple classification models were evaluated in this paper, including Logistic Regression, Random Forest, and XGBoost, in a high-fidelity synthetic e-commerce dataset. In order to bridge the gap between the model and business utility, the Shapley Additive exPlanations (SHAP) method is adopted to interpret the output of the optimal model. The results show that the proposed system can not only achieve stable predictive performance but also reveal the key drivers of customer churn, such as "engagement score" and "days since last purchase". Hence, the system can provide actionable, data-driven business strategies for customer retention.
References
- Reichheld, F. F., & Schefter, P. (2000). E-loyalty: Your secret weapon on the web.Harvard Business Review, 78(4), 105-113.
- Neslin, S. A., Gupta, S., Kamakura, W., Lu, J., & Mason, C. H. (2006). Defection detection: Measuring and understanding the predictive accuracy of customer churn models.Journal of Marketing Research, 43(2), 204-211. https://doi.org/10.1509/jmkr.43.2.204
- Verbeke, W., Martens, D., Mues, C., & Baesens, B. (2011). Building comprehensible customer churn prediction models with advanced rule induction techniques.Expert Systems with Applications, 38(3), 2354-2364. https://doi.org/10.1016/j.eswa.2010.08.023
- Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. InAdvances in Neural Information Processing Systems, 30, 4765-4774.
- Hosmer, D. W., Lemeshow, S., & Sturdivant, R. X. (2013).Applied logistic regression (3rd ed.). Wiley. https://doi.org/10.1002/9781118548387
- Breiman, L. (2001). Random forests.Machine Learning, 45(1), 5-32. https://doi.org/10.1023/A:1010933404324
- Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. InProceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining(pp. 785-794). ACM. https://doi.org/10.1145/2939672.2939785
- Ribeiro, M. T., Singh, S., & Guestrin, C. (2016). "Why should I trust you?": Explaining the predictions of any classifier. InProceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining(pp. 1135-1144). ACM. https://doi.org/10.1145/2939672.2939778
- Lundberg, S. M., Erion, G. G., Chen, H., et al. (2020). From local explanations to global understanding with explainable AI for trees.Nature Machine Intelligence, 2, 56-67. https://doi.org/10.1038/s42256-019-0138-9
- Powers, D. M. W. (2011). Evaluation: From precision, recall and F-measure to ROC, informedness, markedness and correlation.Journal of Machine Learning Technologies, 2(1), 37-63.
- Fawcett, T. (2006). An introduction to ROC analysis.Pattern Recognition Letters, 27(8), 861-874. https://doi.org/10.1016/j.patrec.2005.10.010