A user purchase behavior prediction method based on XGBoost

Wenle WANG, Wentao XIONG, Jing WANG, Lei TAO, Shan LI, Yugen YI, Xiang ZOU, Cui LI

Research output: Contribution to journalArticlespeer-review

2 Citations (Scopus)


With the increasing use of electronic commerce, online purchasing users have been rapidly rising. Predicting user behavior has therefore become a vital issue based on the collected data. However, traditional machine learning algorithms for prediction require significant computing time and often produce unsatisfactory results. In this paper, a prediction model based on XGBoost is proposed to predict user purchase behavior. Firstly, a user value model (LDTD) utilizing multi-feature fusion is proposed to differentiate between user types based on the available user account data. The multi-feature behavior fusion is carried out to generate the user tag feature according to user behavior patterns. Next, the XGBoost feature importance model is employed to analyze multi-dimensional features and identify the model with the most significant weight value as the key feature for constructing the model. This feature, together with other user features, is then used for prediction via the XGBoost model. Compared to existing machine learning models such as K-Nearest Neighbor (KNN), Support Vector Machine (SVM), Random Forest (RF), and Back Propagation Neural Network (BPNN), the eXtreme Gradient Boosting (XGBoost) model outperforms with an accuracy of 0.9761, an F1 score of 0.9763, and a ROC value of 0.9768. Thus, the XGBoost model demonstrates superior stability and algorithm efficiency, making it an ideal choice for predicting user purchase behavior with high levels of accuracy. Copyright © 2023 by the authors.

Original languageEnglish
Article number2047
Issue number9
Publication statusPublished - Apr 2023


Wang, W., Xiong, W., Wang, J., Tao, L., Li, S., Yi, Y., Zou, X., & Li, C. (2023). A user purchase behavior prediction method based on XGBoost. Electronics, 12(9), Article 2047. https://doi.org/10.3390/electronics12092047


  • User behavior prediction
  • Feature selection
  • XGBoost model


Dive into the research topics of 'A user purchase behavior prediction method based on XGBoost'. Together they form a unique fingerprint.