Welcome to Francis Academic Press

Academic Journal of Computing & Information Science, 2026, 9(8); doi: 10.25236/AJCIS.2026.090810.

An Enhanced LightGBM Framework for E-commerce Purchase Prediction

Author(s)

Zhiyuan Zhu1, Kunlin Li2, Ziteng Wang3, Xinwen Lyu4

Corresponding Author:
Zhiyuan Zhu
Affiliation(s)

1Edmonds College, Edmonds, 98036, Washington, United States 

2Universiti Sains Malaysia, Gelugor, Penang, 11700, Malaysia

3Shanghai International Studies University, Shanghai, 200083, China

4Wuxi Dipont School of Arts and Science, Wuxi, Jiangsu, China

Abstract

E-commerce purchase prediction is often evaluated as a classification problem, but in many business settings, the predicted probability is also used to rank customers, allocate budgets, and estimate expected returns. This study develops an Enhanced LightGBM framework to address three practical problems: limited representation of behavioral features, limited use of categorical information, and unreliable probability outputs. The framework combines 15 domain-informed derived features, leakage-free five-fold target encoding, probability averaging across multiple random seeds, isotonic probability calibration, and threshold re-optimization. Experiments were conducted on a publicly available e-commerce dataset with 100,000 records. The results show that different modules contribute in various ways. Feature expansion and target encoding provide only a small gain in discrimination, with AUC increasing from 0.7603 to 0.7636. Probability calibration has the clearest effect: the Brier Score decreases from 0.2165 to 0.1922, an improvement of 11.2%. Threshold optimization moves the operating point toward higher recall, increasing recall from 58.39% to 82.64% and producing an F1 score of 0.6801, while precision decreases to 57.77%. These results suggest that the main value of the proposed framework is not a large improvement in ranking ability. Instead, it improves the reliability of probabilities and model reproducibility, which can better support marketing decisions based on expected value.

Keywords

e-commerce purchase prediction; LightGBM; feature engineering; target encoding; probability calibration; threshold selection

Cite This Paper

Zhiyuan Zhu, Kunlin Li, Ziteng Wang, Xinwen Lyu. An Enhanced LightGBM Framework for E-commerce Purchase Prediction. Academic Journal of Computing & Information Science (2026), Vol. 9, Issue 8: 79-89. https://doi.org/10.25236/AJCIS.2026.090810.

References

[1] Esmeli, R., Bader-El-Den, M., & Abdullahi, H. (2022). An analyses of the effect of using contextual and loyalty features on early purchase prediction of shoppers in e-commerce domain. Journal of Business Research, 147, 420–434. https://doi.org/10.1016/j.jbusres.2022.04.012

[2] Silva Filho, T., Song, H., Perello-Nieto, M., Santos-Rodriguez, R., Kull, M., & Flach, P. (2023). Classifier calibration: A survey on how to assess and improve predicted class probabilities. Machine Learning, 112(9), 3211–3260. https://doi.org/10.1007/s10994-023-06336-7

[3] Grinsztajn, L., Oyallon, E., & Varoquaux, G. (2022). Why do tree-based models still outperform deep learning on typical tabular data? Advances in Neural Information Processing Systems, 35, 507–520. https://doi.org/10.52202/068431-0037

[4] Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., & Liu, T.-Y. (2017). LightGBM: A highly efficient gradient boosting decision tree. Advances in Neural Information Processing Systems, 30, 3146–3154.

[5] Suo, L., Xia, L., Chung, Y., & Kim, E. (2026). Layered feature engineering for e-commerce purchase prediction: A hierarchical evaluation on Taobao user behavior datasets. Computers, Materials & Continua, 87(1), 78. https://doi.org/10.32604/cmc.2025.076329

[6] Pargent, F., Pfisterer, F., Thomas, J., & Bischl, B. (2022). Regularized target encoding outperforms traditional methods in supervised machine learning with high cardinality features. Computational Statistics, 37(5), 2671–2692. https://doi.org/10.1007/s00180-022-01207-6

[7] Kapoor, S., & Narayanan, A. (2023). Leakage and the reproducibility crisis in machine-learning-based science. Patterns, 4(9), 100804. https://doi.org/10.1016/j.patter.2023.100804

[8] Micci-Barreca, D. (2001). A preprocessing scheme for high-cardinality categorical attributes in classification and prediction problems. ACM SIGKDD Explorations Newsletter, 3(1), 27–32. https://doi.org/10.1145/507533.507538

[9] Prokhorenkova, L., Gusev, G., Vorobev, A., Dorogush, A. V., & Gulin, A. (2018). CatBoost: Unbiased boosting with categorical features. Advances in Neural Information Processing Systems, 31, 6638–6648.

[10] Bouthillier, X., Delaunay, P., Bronzi, M., Trofimov, A., Nichyporuk, B., Szeto, J., Mohammadi Sepahvand, N., Raff, E., Madan, K., Voleti, V., Ebrahimi Kahou, S., Michalski, V., Arbel, T., Pal, C., Varoquaux, G., & Vincent, P. (2021). Accounting for variance in machine learning benchmarks. Proceedings of Machine Learning and Systems, 3, 747–769.

[11] Zadrozny, B., & Elkan, C. (2002). Transforming classifier scores into accurate multiclass probability estimates. Proceedings of the Eighth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 694–699. https://doi.org/10.1145/775047.775151

[12] Niculescu-Mizil, A., & Caruana, R. (2005). Predicting good probabilities with supervised learning. Proceedings of the 22nd International Conference on Machine Learning, 625–632. https://doi.org/10.1145/1102351.1102430

[13] Akiba, T., Sano, S., Yanase, T., Ohta, T., & Koyama, M. (2019). Optuna: A next-generation hyperparameter optimization framework. Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, 2623–2631. https://doi.org/10.1145/3292500.3330701

[14] Brier, G. W. (1950). Verification of forecasts expressed in terms of probability. Monthly Weather Review, 78(1), 1–3. https://doi.org/10.1175/1520-0493(1950)078<0001:VOFEIT>2.0.CO;2

[15] Alibaba Cloud Tianchi. (2025). Social e-commerce dataset [Data set]. Alibaba Cloud. https://tianchi.aliyun.com/dataset/215680

[16] Saito, T., & Rehmsmeier, M. (2015). The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLOS ONE, 10(3), e0118432. https://doi.org/10.1371/journal.pone.0118432