Explainable machine learning models applied to predicting customer churn for e-commerce - Boukrouh, Ikhlass; Azmani, Abdellah (Institute of Advanced Engineering and Science, 2025)
Precise identification of customer churn is crucial for e-commerce companies due to the high costs associated with acquiring new customers. In this sector, where revenues are affected by customer churn, the challenge is intensified by the diversity of product choices offered on various marketplaces. Customers can easily switch from one platform to another, emphasizing the need for accurate churn classification to anticipate revenue fluctuations in e-commerce. In this context, this study proposes seven machine learning classification models to predict customer churn, including decision tree (DT), random forest (RF), support vector machine (SVM), logistic regression (LR), naïve Bayes (NB), k-nearest neighbors (K-NN), and artificial neural network (ANN). The performances of the models were evaluated using confusion matrix, accuracy, precision, recall, and F1-score. The results indicated that the ANN model achieves the highest accuracy at 92.09%, closely followed by RF at 91.21%. In contrast, the NB model performed the least favorably with an accuracy of 75.04%. Two explainable artificial intelligence (XAI) methods, shapley additive explanations (SHAP) and local interpretable model-agnostic explanations (LIME), were used to explain the models. SHAP provided global explanations for both ANN and RF models through Kernel SHAP and Tree SHAP. LIME, offering local explanations, was applied only to the ANN model which gave better accuracy.