基于集成学习的电商消费者复购行为预测及可解释性分析
Prediction and Interpretability Analysis of E-Commerce Consumers’ Repurchase Behavior Based on Ensemble Learning
摘要: 随着大数据时代的到来,电商行业的发展迎来了全新的机遇和挑战,基于电商平台的海量用户行为数据,如何深入挖掘并精准预测消费者的复购行为,对电商平台提高客户忠诚度和运营效果有着重要意义。本文基于阿里巴巴天池大赛提供的电商消费者行为数据,旨在构建一个基于集成学习与SHAP解释机制的复购行为预测模型,从而对消费者复购行为进行预测与探究。在数据预处理阶段,本研究首先对原始数据集进行缺失值处理;针对数据不平衡问题,本文采用随机下采样方法对非重复购买样本进行下采样,从而提高模型对重复购买样本的识别能力。接着,通过特征提取和特征选择操作,最终选择了18个特征作为后续电商消费者复购行为预测与模型优化分析,以全面刻画用户在平台上的行为广度、多样性、活跃度与平台黏性。随后,基于梯度提升决策树(GBDT)、极致梯度提升(XGBoost)、随机森林算法(RF)、K近邻(KNN)和决策树算法(DT)这五种基分类器,采用贝叶斯优化对各模型的超参数进行自动调优,并运用Stacking集成学习策略构建最终预测模型。实验结果表明,Stacking集成模型在Accuracy (0.7750)、Recall (0.8677)、Precision (0.7824)及F1值(0.8228)指标上均优于单一模型,具有更好的泛化能力。最后,通过SHAP解释性分析识别出影响复购的关键因素:用户行为多样性特征(cat_unique、action_2_freq、item_unique)对复购预测具有显著正向影响,反映消费行为广度与深度对用户忠诚度的促进作用;用户画像特征(age_range、gender)及部分计数特征(time_count、cat_count)对预测贡献不显著。本研究为电子商务平台通过数据驱动方法优化个性化营销策略、提高客户留存率提供了具有实践指导意义的决策支持。
Abstract: With the advent of the big data era, the e-commerce industry is facing unprecedented opportunities and challenges. Leveraging massive user behavior data from e-commerce platforms, in-depth exploration and accurate prediction of consumer repurchase behavior have become crucial for enhancing customer loyalty and operational effectiveness. This study utilizes e-commerce consumer behavior data from the Alibaba Tianchi Competition to construct a repurchase prediction model based on ensemble learning and SHAP interpretability mechanisms, aiming to investigate and forecast consumer repurchase behavior. During the data preprocessing phase, the study first addresses missing values in the original dataset. To tackle the class imbalance issue, random under-sampling is applied to non-repurchase samples, thereby improving the model’s ability to identify repurchase cases. Through feature extraction and selection, 18 features are ultimately selected to comprehensively characterize users’ behavioral breadth, diversity, activity level, and platform engagement for subsequent repurchase prediction and model optimization analysis. Subsequently, based on five base classifiers—Gradient Boosting Decision Tree (GBDT), eXtreme Gradient Boosting (XGBoost), Random Forest (RF), K-Nearest Neighbors (KNN), and Decision Tree (DT)—we employed Bayesian optimization for automated hyperparameter tuning of each model and adopted a Stacking ensemble learning strategy to construct the final predictive model. Experimental results demonstrate that the Stacking ensemble model outperforms individual models across multiple evaluation metrics, including Accuracy (0.7750), Recall (0.8677), Precision (0.7824), and F1-score (0.8228), exhibiting superior generalization capability. Finally, SHAP interpretability analysis identifies key factors influencing repurchase: user behavior diversity features (cat_unique, action_2_freq, item_unique) show significant positive effects on repurchase prediction, reflecting how behavioral breadth and depth enhance customer loyalty. In contrast, demographic features (age_range, gender) and certain count-based features (time_count, cat_count) contribute minimally to prediction accuracy. This research provides e-commerce platforms with data-driven decision support for refining personalized marketing strategies and improving customer retention, offering practical guidance for business applications.
参考文献
|
[1]
|
张李义, 李一然, 文璇. 新消费者重复购买意向预测研究[J]. 数据分析与知识发现, 2018, 2(11): 10-18.
|
|
[2]
|
巫月娥. 网络品牌视角下网络消费者重复购买的营销策略[J]. 企业经济, 2013, 32(1): 105-108.
|
|
[3]
|
Li, T.T., Wu, Y.L., et al. (2025) Deep Learning-Based Analysis of E-Commerce Enterprises: User Behavior and Consumption Prediction. Journal of Organizational and End User Computing (JOEUC), 37, 1-36. [Google Scholar] [CrossRef]
|
|
[4]
|
纪守领, 李进锋, 杜天宇, 等. 机器学习模型可解释性方法、应用与安全研究综述[J]. 计算机研究与发展, 2019, 56(10): 2071-2096.
|
|
[5]
|
Liu, Y., Liu, Z., Luo, X. and Zhao, H. (2022) Diagnosis of Parkinson’s Disease Based on SHAP Value Feature Selection. Biocybernetics and Biomedical Engineering, 42, 856-869. [Google Scholar] [CrossRef]
|
|
[6]
|
Levine, D.K. (2018) Introduction to the Special Issue in Honor of Lloyd Shapley: Eight Topics in Game Theory. Games and Economic Behavior, 108, 1-12. [Google Scholar] [CrossRef]
|